[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.amalgam] Re: DSL Book - problems with java code pg 81

Hello Dave,

You should use the example code found in the Amalgam project location, not
GMF: 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.amalgam/examples/org.ec
lipse.amalgam.examples.mindmap.diagram/src/org/eclipse/amalgam/examples/mind
map/diagram/edit/parts/TopicEditPart.java?root=Modeling_Project&view=markup

I have no errors in my workspace.  The Rectangle to import is
org.eclipse.draw2d.geometry.Rectangle;

HTH, 
Rich

On 7/11/09 12:14 PM, in article
4ea4cdb92834db5a818ff7f67a2c2860$1@xxxxxxxxxxxxxxx, "Dave Milham"
<dave1@xxxxxxxxxxxxxxxx> wrote:

> I am steadily working my way through the DSL Toolkit book and have got to
> a point on pg 81 where I need a clue as to what to do next
> I am using the Amalgam downloaded DSL toolkit and JAVA 6.
> 
> I have made the changes to the constructor Public TopicFigure() - middle
> page 81 and also to createContents() - top page 82 and the java editor
> flags errors.
> 
> I searched the examples and I think th correct code  is in:
> 
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/examples/org.eclipse.
> gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit
> /parts/TopicEditPart.java?root=Modeling_Project&view=markup
> 
> However this look quite different from the book.
> The specifc erro I get with the code in the book is that the parser cannot
> resolve the name Rectangle and the import
> import java.util.List;
> 
> marks Rectangle as not used.
> 
> I can partially resolve the porblme by using a full name like
> 
> I can resolve some of the errors by using the full path name
> org.eclipse.draw2d.geometry.Rectangle but get error with Child.
> Looking at the import I see that it has markers that some imports are not
> used such as 
> import org.eclipse.swt.graphics.Rectangle
> 
> however using this path name does not resolve the errors
> 
> What would be useful is
> 1. confirmation that the code on Pg 81 and 82 works
> 2. that the URL for the example code above is the correct one and if not
> where the correct code can be found.
> 
> 
> many thanks
> 
> Dave M
>   
> 

-- 
Thanks,
Rich