Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Executing feature on object select
Executing feature on object select [message #1808603] Thu, 27 June 2019 16:40 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 543
Registered: November 2009
Senior Member
When I switch selection from one object to another I'd like to execute a feature to show Properties View. For this I employ CustomFeature that does this and also implements hasDoneChanges() to return false so that editor does not get dirty. This works, but in such a away that I need to select object and then select again for DefaultToolBehaviorProvider.getSingleClickFeature() to fire. From user perspective this is action of two clicks: select and the click.

DefaultToolBehaviorProvider.getSelection() looks like a good place to call my single click feature, but is it the right way to do it and if it how can I generate ICustomContext to call my feature?
Re: Executing feature on object select [message #1808684 is a reply to message #1808603] Fri, 28 June 2019 14:10 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1910
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

hm, providing property sheets using a Graphiti feature sounds rather complicated to me. Not sure if there is a specific reason for you to go that way. Have you seen the property sheets example in the tutorial project. There we provide a tabbed property sheet for EClasses that is hooked in vie the plugin.xml extension mechanism.

Does that help?

Michael
Re: Executing feature on object select [message #1808689 is a reply to message #1808684] Fri, 28 June 2019 15:25 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 543
Registered: November 2009
Senior Member
Thanks Michael.

Yes I've referenced the examples when implementing property sheets for my diagram objects. What does not work, and what I am trying to implement is force focus on Properties View. So if current view in focus is Console View and user clicks on, let's say EClass object as in tutorial, then Properties View should gain focus on EClass object selection.

Thanks,
Alex
Re: Executing feature on object select [message #1808694 is a reply to message #1808689] Fri, 28 June 2019 16:53 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 543
Registered: November 2009
Senior Member
After further debugging my code I saw the reason for dirty state was update of the model during displaying properties of the object. After refactoring that code my use case works as expected.
Previous Topic:Graphiti 0.16 - getMoveShapeFeature() for single element no longer works
Next Topic:SVG export tutorial example not working
Goto Forum:
  


Current Time: Fri Aug 23 14:02:20 GMT 2019

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

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

Back to the top