Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Graphical Editor Selection of Edit Part
Graphical Editor Selection of Edit Part [message #854005] Mon, 23 April 2012 15:01 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 516
Registered: June 2011
Senior Member
Hi,

I am working with Graphical Editor and i have multiple modelobjects/editpart/figures.
I want to create a command which should be activated on specific model object selction. When i make any selection then selection says it has Editpart as selection which is connected to desired object. Why i get EditPart in selection instead of model object?

thanks!

Cheers,
Re: Graphical Editor Selection of Edit Part [message #854902 is a reply to message #854005] Tue, 24 April 2012 10:45 Go to previous messageGo to next message
Eclipse User
You can get a model object from an edit part by calling EditPart#getModel()

On 04/23/2012 05:01 PM, ModelGeek Mising name wrote:
> Hi,
>
> I am working with Graphical Editor and i have multiple
> modelobjects/editpart/figures.
> I want to create a command which should be activated on specific model
> object selction. When i make any selection then selection says it has
> Editpart as selection which is connected to desired object. Why i get
> EditPart in selection instead of model object?
>
> thanks!
>
> Cheers,
>
Re: Graphical Editor Selection of Edit Part [message #855108 is a reply to message #854902] Tue, 24 April 2012 14:26 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 516
Registered: June 2011
Senior Member
Hi,

yes i can but i want to define few declartive commands and i want to activate them when specific model object is selected.
Actually i want to have some generic functionality. Currently, i am working on one
editor but in future there can be multiple editors working with same model objects and showing them in different ways. I want to create a generic delete command so it
is activated when specific model object is selected regardless of editor and editorpart representing the object.

I hope i am able to explain the problem.

thanks for assistance.

cheers!
Re: Graphical Editor Selection of Edit Part [message #871562 is a reply to message #855108] Mon, 14 May 2012 12:24 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 516
Registered: June 2011
Senior Member
Hi,

I have been trying to find the solution for this problem but i have not found anything yet, if you have any idea then please describe,

Regards,
Re: Graphical Editor Selection of Edit Part [message #888811 is a reply to message #871562] Mon, 18 June 2012 16:54 Go to previous message
Jan Krakora is currently offline Jan Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
What are you trying to do? Do you want to create a handler with declarative enableWhen expression? If you do, then you can crate a property tester for the selected editPart.
Previous Topic:Zest 1 to Zest 2 migration: GraphModelEntityFactory filtering behaviour
Next Topic:Labels on Figure not showing up
Goto Forum:
  


Current Time: Sat Oct 25 01:38:05 GMT 2014

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

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