how get the "impl" class from an "editPart" [message #220715] |
Sat, 07 March 2009 12:08  |
Eclipse User |
|
|
|
Hello,
I'm Daniele. I would change property of a class specified in my model of
Ecore from the graphic editor generated. The idea is add a new action in
the menu clicking on a graphical item. That is to say, i want right-click
on a item and choose an action that I added with an extention point. That
action I added will change property of that object.
But there is a problem. For example, let me modify the object "box"
specified in my ecore.
If I add an extention poin to add a new submenu in the right-click menu,
in the class that specify the action I get the boxEditPart. But property
and method are specified in the boxImpl. How can i reach the impl from
the editpart? how they are related??
hope to explained quite well..
many thanks
|
|
|
|
|
Re: how get the "impl" class from an "editPart" [message #220762 is a reply to message #220721] |
Mon, 09 March 2009 05:28  |
Eclipse User |
|
|
|
Arne wrote:
> Hi,
> i think the edit parts have a "public EObject resolveSemanticElement()"
> Method. I guess this is what you are looking for
============================================================
i tried but it doesn't work...
i tried to do so:
( (boxImpl) selectedObj.resolveSemanticElement() ) . getName()
where selectedObj is the EditPart selected in the graphic editor.
but nothing..... it doesn't give any error, but it dosn't work, it dosn't
give me the name.
maybe i wrong in take the selected item.. ?!
if i rightclick on an element, and choose an action, in the class that
implements that action, how can I reach the selected item?
|
|
|
Powered by
FUDForum. Page generated in 0.37871 seconds