Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Listener on saving papyrus diagrams
Listener on saving papyrus diagrams [message #909655] Fri, 07 September 2012 10:03 Go to next message
Marc Z is currently offline Marc Z
Messages: 18
Registered: July 2012
Junior Member
Hi all,

is it possible to wirtte a listener which is activated, when a papyrus diagram is saved?
Which extention point can be used for such a purpose?


Best regards,

Marc
Re: Listener on saving papyrus diagrams [message #917778 is a reply to message #909655] Thu, 20 September 2012 08:29 Go to previous message
Goood Guy is currently offline Goood Guy
Messages: 126
Registered: September 2011
Senior Member
Maybe you could register a resource via the extension point
	<extension
		point="org.eclipse.papyrus.infra.core.model">
		<model
			classname="your.package.MyResource">
		</model>
	</extension>


MyResource.java looks like this:



public class MyResource extends AbstractBaseModel implements IModel{




	@Override
	public void loadModel(IPath fullPathWithoutExtension) {
		// do nothing
	}


	@Override
	public void createModel(IPath fullPath) {
          //do nothing
	}


	@Override
	public void saveModel() throws IOException {
           //do your stuff here
	}
}

Previous Topic:Register for Mailing List
Next Topic:Wrapped rather than Truncated Text for Use Case Names in Use Case Diagrams
Goto Forum:
  


Current Time: Wed Jul 23 10:11:17 EDT 2014

Powered by FUDForum. Page generated in 0.26438 seconds