Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » On diagram window focus action
On diagram window focus action [message #728257] Thu, 22 September 2011 19:46 Go to next message
janpojer is currently offline janpojer
Messages: 40
Registered: July 2011
Member
Hi,

could some one help me a bit. I am trying to run some code, when my diagram view loses focus/ gains focus. In emf editor its quite easy you only need to edit partBroughtToTop or partDeactivated in the editor code. But i cant manage to do the same for gmf .diagram.

Anyone solved this?

Thanks in advance.

Jan
Re: On diagram window focus action [message #728455 is a reply to message #728257] Fri, 23 September 2011 09:43 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 765
Registered: July 2009
Location: Grenoble, France
Senior Member
Some different ideas:
* From your generated Editor class, you can use
getGraphicalControl().addFocusListener().
* Add a listener on the EditorSite page ->
editor.getEditorSite().getPage().addPartListener(). In your
IPartListener, check that the part that sends the notification if your
editor.

However, you can still open a feature request against GMF-Runtime to
explain your use-case and suggest an improvement.

Regards,
Mickael
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: On diagram window focus action [message #728578 is a reply to message #728455] Fri, 23 September 2011 13:53 Go to previous message
janpojer is currently offline janpojer
Messages: 40
Registered: July 2011
Member
Thanks Mickael.

Will look into that.

Jan
Previous Topic:Cant delete diagram element
Next Topic:Help configuring the Taipan example in GMF tutorial
Goto Forum:
  


Current Time: Thu Oct 23 03:53:15 GMT 2014

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

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