Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to recognize what has changed before saving a Papyrus model?
How to recognize what has changed before saving a Papyrus model? [message #653581] Thu, 10 February 2011 10:36 Go to next message
Wladimir Schamai is currently offline Wladimir SchamaiFriend
Messages: 53
Registered: May 2010
Member
Hi all,

I generate code from Papyrus UML-based models. Now, I would like to do it incrementally, i.e., each time the user changes the model and saves it I would like to determine which UML classes are affected by changes and regenerate code only for these classes.
Here is my question: is it possible to know what has changed before Papyrus saves the model? I am especially interested in structural model changes, not the diagrams.

Thanks for your support!
Wladimir
Re: How to recognize what has changed before saving a Papyrus model? [message #653592 is a reply to message #653581] Thu, 10 February 2011 11:04 Go to previous message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
Yes it is possible you can connect a listener that can listenr all action in the model.
you have to implement a org.eclipse.papyrus.core.listenerservice.IPapyrusListener
and fill the extension point org.eclipse.papyrus.core.modelListener


for example in org.eclipse.papyrus.diagram.common plugin:
<extension
point="org.eclipse.papyrus.core.modelListener">
<listener
description="This listener listens for profile (un)applications to update the palette"
name="PaletteProfileApplicationListener"
realization=" org.eclipse.papyrus.diagram.common.service.PaletteProfileApp licationListener ">
</listener>
</extension>

Patrick
Previous Topic:modeling projects by reverse engineering in future releases ?
Next Topic:StateMachine Diagram: Drawing of state transition problem
Goto Forum:
  


Current Time: Sun May 12 08:08:01 GMT 2024

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

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

Back to the top