Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Updating the diagram files (.di) after changing the UML
Updating the diagram files (.di) after changing the UML [message #651517] Mon, 31 January 2011 14:06 Go to next message
Haffi is currently offline Haffi
Messages: 39
Registered: November 2010
Member
Hi,

I'm working on a plugin on eclipse that allows transformations (QVTo) on the underlying UML files for a diagram. If the transformation deletes an entity from the UML file, the entity is still present in the diagram with a "deleted" emblem on it. Is there any way to force the diagram to update based on the UML file?
Re: Updating the diagram files (.di) after changing the UML [message #651675 is a reply to message #651517] Tue, 01 February 2011 08:39 Go to previous messageGo to next message
Remi Schnekenburger is currently offline Remi Schnekenburger
Messages: 127
Registered: July 2009
Senior Member
Hi,

to remove the invalid views, you will find in the contextual menu of diagrams (right click on the diagram) the action "Edit" > "Clean Invalid Views ".

This will remove these invalid views from the diagram. Otherwise, in the latest versions of Papyrus, there should be a listener on model files when Papyrus is opened on the model, which ask you for reloading when the UML file is modified outside Papyrus itself. This could do also the job.

HTH
Rémi


Re: Updating the diagram files (.di) after changing the UML [message #653090 is a reply to message #651675] Tue, 08 February 2011 13:18 Go to previous messageGo to next message
Haffi is currently offline Haffi
Messages: 39
Registered: November 2010
Member
Thank you for the answer. The only problem is that I don't find the "Clean invalid views" in the "Edit" context menu.

The listener you mentioned in the newest version of Papyrus, do you (or anyone) know where this listener can be found in the code?
Re: Updating the diagram files (.di) after changing the UML [message #653299 is a reply to message #653090] Wed, 09 February 2011 09:27 Go to previous messageGo to next message
Remi Schnekenburger is currently offline Remi Schnekenburger
Messages: 127
Registered: July 2009
Senior Member
Hi,

for the listener, you should look in the plugin org.eclipse.papyrus.diagram.common, the class org.eclipse.papyrus.diagram.common.resourceupdate.ResourceUp dateService. It listens for resource modification and asks for updates when required.

HTH,
Rémi


Re: Updating the diagram files (.di) after changing the UML [message #715138 is a reply to message #653299] Fri, 12 August 2011 13:58 Go to previous messageGo to next message
vanu.am is currently offline vanu.am
Messages: 1
Registered: August 2011
Junior Member
Hi,

I'm facing the same problem as Haffi.
I programatically add/remove elements to/from underlying UML model of Papyrus diagram.
After modifications are done .uml is updated automatically and contains all the modifications as it should.
.di is updated after accepting the update suggestion from a dialog when I attempt to close the editor. But here I face the 1st problem: the updated diagram doesn't show the added elements and the removed ones are still visible with a mark (implying removed) on them.
Remi's suggestion ("Edit" > "Clean Invalid Views ") doesn't hide the removed elements.
By drag-and-drop I can finally make the diagram look the way I should but here arises the 2nd problem: the edge Realization is shown as a Dependency in .di.

Is there other then drag-and-drop way to update the .di?

Thanks!


Re: Updating the diagram files (.di) after changing the UML [message #716759 is a reply to message #715138] Thu, 18 August 2011 10:59 Go to previous messageGo to next message
Neslepaks  is currently offline Neslepaks
Messages: 37
Registered: April 2011
Member
vanu.am wrote on Fri, 12 August 2011 09:58


I programatically add/remove elements to/from underlying UML model of Papyrus diagram.




Hi,

I would be interested to see how to add elements there. Could it be possible to provide some kind of simple example code?
Re: Updating the diagram files (.di) after changing the UML [message #754553 is a reply to message #716759] Thu, 03 November 2011 09:17 Go to previous message
Sonia PC is currently offline Sonia PC
Messages: 3
Registered: October 2011
Junior Member
Hi,

I have the same problem. I'm making some m2m transformations to underlying UML model (add and remove elements) of Papyrus diagram but I don't know how to update the .di and .notation files. "Edit-> Clean Invalid Views" doesn't work.

How could I do that?
Previous Topic:Composite diagramas and port connections
Next Topic:Creating a SysML model
Goto Forum:
  


Current Time: Mon Oct 20 11:26:16 GMT 2014

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

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