Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to programmatically create temporary Papyrus diagrams?
How to programmatically create temporary Papyrus diagrams? [message #1774172] Wed, 11 October 2017 09:37 Go to next message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

I would like to programmatically create and populate temporary Papyrus-diagrams, e.g. diagrams that are not added to any .notation resource.

Actually I would like to avoid adding a new diagram to the content list for the diagram resource returned by the NotationUtils.getNotationResourceForDiagram()-method.
But any attempt to do that fails in a ServiceNotFoundException.

Is it possible to create Papyrus diagrams without adding it to a resource and if so, could someone give me a hint on how to do that.

I would like to achieve something like the "browse-diagram" capabilities available in some other modeling tools.





Thomas Wiman
MetaModelAgent Product Manager
Re: How to programmatically create temporary Papyrus diagrams? [message #1774184 is a reply to message #1774172] Wed, 11 October 2017 12:26 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Thomas,

Many parts of the diagrams or tooling rely on the current resource set to find services. So if the current diagram is not located in any resource, it doesn't have access to the ResourceSet/ModelSet, and services can't be found.

One option could be to add the diagrams to a resource that won't be saved (e.g. read-only), but is still known to the model set, so services can't still be retrieve.

HTH,
Camille


Camille Letavernier
Re: How to programmatically create temporary Papyrus diagrams? [message #1774197 is a reply to message #1774184] Wed, 11 October 2017 14:32 Go to previous message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

Thank you Camille for a very quick answer.

I will try your suggestion and experiment with adding the diagram to another resource that will not be saved.

/Thomas


Thomas Wiman
MetaModelAgent Product Manager
Previous Topic:Papyrus Development Environment - Compilation errors
Next Topic:Extend existing diagram
Goto Forum:
  


Current Time: Tue Apr 16 22:21:29 GMT 2024

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

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

Back to the top