Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Amalgam » DSL Book - problems with java code pg 81
DSL Book - problems with java code pg 81 [message #525194] Sat, 11 July 2009 12:14 Go to next message
Dave Milham is currently offline Dave Milham
Messages: 4
Registered: July 2009
Junior Member
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/exa mples/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclip se/gmf/examples/mindmap/diagram/edit/parts/TopicEditPart.jav a?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
Re: DSL Book - problems with java code pg 81 [message #525195 is a reply to message #525194] Mon, 13 July 2009 09:08 Go to previous messageGo to next message
Richard Gronback is currently offline Richard Gronback
Messages: 605
Registered: July 2009
Senior Member
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/amalg am/examples/mind
map/diagram/edit/parts/TopicEditPart.java?root=Modeling_Proj ect&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@www.eclipse.org, "Dave Milham"
<dave1@davemilham.co.uk> 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/exa mples/org.eclipse
> gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mi ndmap/diagram/edit
> /parts/TopicEditPart.java?root=Modeling_Project&view=mar kup
>
> 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
Re: DSL Book - problems with java code pg 81 [message #525196 is a reply to message #525195] Tue, 14 July 2009 05:58 Go to previous message
Dave Milham is currently offline Dave Milham
Messages: 4
Registered: July 2009
Junior Member
Richard,
Appreciate your prompt feedback and the hint. I'll see if I can make
progress now. Good thing is that making mistakes helps the learning
process. I did suspect I had the wrong file on the amalgam site

BTW we have meet once when I was meeting with Bill Hinge and Ian Buchanen
in Bibbway. I am very much enjoying working through your book.

Best regards
Dave M
Re: DSL Book - problems with java code pg 81 [message #577502 is a reply to message #525194] Mon, 13 July 2009 09:08 Go to previous message
Richard Gronback is currently offline Richard Gronback
Messages: 605
Registered: July 2009
Senior Member
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/amalg am/examples/mind
map/diagram/edit/parts/TopicEditPart.java?root=Modeling_Proj ect&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@www.eclipse.org, "Dave Milham"
<dave1@davemilham.co.uk> 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/exa mples/org.eclipse
> gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mi ndmap/diagram/edit
> /parts/TopicEditPart.java?root=Modeling_Project&view=mar kup
>
> 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
Re: DSL Book - problems with java code pg 81 [message #577524 is a reply to message #525195] Tue, 14 July 2009 05:58 Go to previous message
Dave Milham is currently offline Dave Milham
Messages: 4
Registered: July 2009
Junior Member
Richard,
Appreciate your prompt feedback and the hint. I'll see if I can make
progress now. Good thing is that making mistakes helps the learning
process. I did suspect I had the wrong file on the amalgam site

BTW we have meet once when I was meeting with Bill Hinge and Ian Buchanen
in Bibbway. I am very much enjoying working through your book.

Best regards
Dave M
Previous Topic:DSL Book - problems with java code pg 81
Next Topic:DSL book - tabbed.propertySections
Goto Forum:
  


Current Time: Mon Sep 01 19:46:33 EDT 2014

Powered by FUDForum. Page generated in 0.04500 seconds