Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Nodes with image defined at run-time
Nodes with image defined at run-time [message #1271120] Fri, 14 March 2014 10:10 Go to next message
PEREZ MEDINA Jorge Luis is currently offline PEREZ MEDINA Jorge LuisFriend
Messages: 9
Registered: January 2014
Junior Member
Hi,
I have taken the example of:
http://eclipse.org/epsilon/doc/articles/eugenia-nodes-with-runtime-images/

and i have some questions on this method

protected IFigure createNodeShape() {
primaryShape = new ComponentFigure();
Component component = (Component) ((Node)getNotationView()).getElement();
((ComponentFigure) primaryShape).setImagePath(component.getImagePath());
return primaryShape;
}

Basically the questions are about the types that should be the Node and Component.

When I imported Node as org.eclipse.draw2d.graph.Node
i cannot use the method .getElement()

Could you help me to solve it?

Thanks
Re: Nodes with image defined at run-time [message #1271133 is a reply to message #1271120] Fri, 14 March 2014 10:34 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I think that you need org.eclipse.gmf.runtime.notation.Node instead of org.eclipse.draw2d.graph.Node.

Cheers,
Dimitris
Re: Nodes with image defined at run-time [message #1271139 is a reply to message #1271133] Fri, 14 March 2014 10:40 Go to previous messageGo to next message
PEREZ MEDINA Jorge Luis is currently offline PEREZ MEDINA Jorge LuisFriend
Messages: 9
Registered: January 2014
Junior Member
Thanks Dimitris,

And for the Component type ?
Re: Nodes with image defined at run-time [message #1271142 is a reply to message #1271139] Fri, 14 March 2014 10:44 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Component is an EMF-generated class from the Component EClass in the annotated metamodel.

Cheers,
Dimitris
Previous Topic:ETL trafo plug-in - no target model visible
Next Topic:[Eugenia] Preserve property descriptions
Goto Forum:
  


Current Time: Thu Mar 28 16:55:06 GMT 2024

Powered by FUDForum. Page generated in 0.02469 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top