Skip to main content



      Home
Home » Modeling » MoDisco » Running modisco discover on save action
Running modisco discover on save action [message #1417404] Fri, 05 September 2014 06:43 Go to next message
Eclipse UserFriend
Hi,

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();
				javaResource.setURI(uri);
				javaResource.save(null);

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


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?

~Alex
Re: Running modisco discover on save action [message #1417430 is a reply to message #1417404] Fri, 05 September 2014 08:07 Go to previous message
Eclipse UserFriend
Hello,

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.
Previous Topic:Developer Setup
Next Topic:Creating a new discoverer
Goto Forum:
  


Current Time: Thu May 22 22:48:06 EDT 2025

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

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

Back to the top