cashew-s-editor
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CASHeW-s-Editor] Change to the model....


From: Andrew John Hughes
Subject: Re: [CASHeW-s-Editor] Change to the model....
Date: Sat, 26 Feb 2005 00:01:26 +0000

On Fri, 2005-02-25 at 11:22 +0000, Ravish Bhagdev wrote:
> Hi,
> 
> Roger, I have tried updating my local copy from CVS and its working fine. 

Good to hear.

>  But the problem is you have duplicated the properties in the base class
> and subclasses in the models.  The main reason for creating the base class
> is to reuse the common functionalities.

Exactly.

>   This needs some tweaking.  I am writing the toStrings for all the 
> persistable
> classes but it would not make sense to write same details in base and sub 
> classes.
> 

Good -- for serialization, if all you want is a temporary text
representation, it may be worth looking at java.beans.XMLEncoder, as we
discussed.  In writing the toString() methods, you may find it useful to
use getClass().getName() which returns the name of the class as a
String.

For instance, in nongnu.test.Test1, you could do (assuming one private
variable, x):

public String toString()
{
  StringBuffer buffer = new StringBuffer(getClass().getName());
  buffer.append("[x=");
  buffer.append(x);
  buffer.append("]");
  return buffer.toString();
}

> Please change it accordingly and only add patches to CVS.  There
> are also multiple versions on CVS which I told you last night.  This
> is very confusing for me.  Andrew if you can, please make sure CVS has
> only one version of our project.  And Roger please follow consistent
> names for project.  It says something like MyEllipseNode now which
> dosent make sense.
> 

Correct.  From what I've seen, at least the top-level directory Roger
created yesterday should go.  Please be more careful when committing.
Before a commit, you should ensure that you are added the correct
files/changes and that the result still (at least) compiles.  I'd also
like to see patches for the changes on list; from these commit messages,
we can't tell what it is your changes actually __do__.  With Eclipse set
up to use CVS, it is easy enough to do this with the right-click menu as
I showed you.

> - Ravish.
> _______________________________________________
> CASHeW-s-editor mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/cashew-s-editor
> 

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint)
attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

"We've all been part of the biggest beta test the world has ever known
--
Windows" 
-- Victor Wheatman, Gartner


Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]