Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » how get the "impl" class from an "editPart"
how get the "impl" class from an "editPart" [message #220715] Sat, 07 March 2009 17:08 Go to next message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
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 #220721 is a reply to message #220715] Sun, 08 March 2009 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Erazerx.gmx.de

Hi,

i think the edit parts have a "public EObject resolveSemanticElement()"
Method. I guess this is what you are looking for

daniele schrieb:
> 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 #220733 is a reply to message #220721] Sun, 08 March 2009 22:25 Go to previous messageGo to next message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
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?
Re: how get the "impl" class from an "editPart" [message #220762 is a reply to message #220721] Mon, 09 March 2009 09:28 Go to previous message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
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?
Previous Topic:[Announce] GMF 2.2.0 I200903080827 is available
Next Topic:'Selecting' nodes through IAction
Goto Forum:
  


Current Time: Wed Mar 03 06:04:52 GMT 2021

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

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

Back to the top