Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Run task after any modification
Run task after any modification [message #1237001] Tue, 28 January 2014 15:50 Go to next message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 14
Registered: July 2012
Junior Member
Hello!
How to run a task after each business modification ? (modification on a emf object).
I want run an automatic validation on my diagram.

Thanks!
Re: Run task after any modification [message #1237013 is a reply to message #1237001] Tue, 28 January 2014 16:10 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi,

did you see the Eclipse builders extension point? It might be what you are
looking for:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_core_resources_builders.html

Michael
Re: Run task after any modification [message #1237279 is a reply to message #1237001] Wed, 29 January 2014 09:36 Go to previous messageGo to next message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 14
Registered: July 2012
Junior Member
Sorry, but i don't see what extension take to resolve my problem.

In eclipse rcp "classic", i think i set a resource change listener on a DiagramEditor or a file to run a validation in a transaction.
But with graphiti and his features, what is the recommended way?

[Updated on: Wed, 29 January 2014 09:38]

Report message to a moderator

Re: Run task after any modification [message #1239171 is a reply to message #1237279] Mon, 03 February 2014 14:58 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi,

the extension point you could use is "org.eclipse.core.resources.builders".
It add's a builder that could be used to react to resource changes and do
any stuff that is needed, e.g. trigger validation.

I'm not into the implementation but I'd guess it internally uses resource
change listeners...

Michael
Re: Run task after any modification [message #1239990 is a reply to message #1239171] Wed, 05 February 2014 13:29 Go to previous message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 14
Registered: July 2012
Junior Member
Thanks for this solution.

Other solution:
I launch my validation feature in ToolBehaviorProvider.postExecute.
In this case, the validation feature is launched only when a feature is executed.
Previous Topic:Dynamic description for the delete button/context menu
Next Topic:How to perform mouse hover in and out in graphiti elements
Goto Forum:
  


Current Time: Sun Aug 09 06:00:11 GMT 2020

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

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

Back to the top