Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Running modisco discover on save action
Running modisco discover on save action [message #1417404] Fri, 05 September 2014 10:43 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member

I am running the discoverer programmatically like it is mentioned in the forum:

	try {
			DiscoverJavaModelFromJavaProject javaDiscoverer = new DiscoverJavaModelFromJavaProject();
			if (javaDiscoverer.isApplicableTo(this.javaProject)) {

				javaDiscoverer.discoverElement(this.javaProject, new NullProgressMonitor());

				Resource javaResource = javaDiscoverer.getTargetModel();

		} catch (DiscoveryException | FileNotFoundException e) {
			// TODO Auto-generated catch block
		} catch (IOException e) {
			// TODO Auto-generated catch block

This works quit well for me. I trigger it now by using an Eclipse-Action (IEditorActionDelegate) on the
Java editor. Now I would like to do this serialization every time my java resources
are changed/saved. But I dont know how to trigger the save-events for a specific project.
Maybe someone can give me a hint where to start?

Re: Running modisco discover on save action [message #1417430 is a reply to message #1417404] Fri, 05 September 2014 12:07 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member

Thanks for using the MoDisco project and some of its components.
It seems more like an Eclipse IDE problem than a MoDisco one, so you should get more hints putting this particular post on the dedicated forum.
Anyway, maybe this page from the documentation could help you to start with.

Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
Previous Topic:Developer Setup
Next Topic:Creating a new discoverer
Goto Forum:

Current Time: Fri Mar 23 04:50:01 GMT 2018

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

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