Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Programmatically create a diagram of custom diagram kind
Programmatically create a diagram of custom diagram kind [message #1746119] Sat, 22 October 2016 10:54 Go to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Hi,

How can I create a diagram (instance) based on a custom diagramKind programmatically?

I'd like to create a diagram in the corresponding EdhitHelperAdvice when creating my ElementType.

/Patrik
Re: Programmatically create a diagram of custom diagram kind [message #1746153 is a reply to message #1746119] Mon, 24 October 2016 07:20 Go to previous messageGo to next message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Hi,

Would it help checking how this is done in Papyrus-RT? Please take a look at the org.eclipse.papyrusrt.umlrt.core.types.advice.CapsuleEditHelperAdvice and how it automatically creates the capsule structure diagram whenever the capsule is created. I am not familiar with how this works myself, but I guess it is a good example of something very similar to what you are trying to achieve.

Specifically check the getBeforeConfigureCommand() and how it returns a CreateHeadlessCapsuleStructureDiagramCommand.

Hope this helps,

/Peter Cigéhn
Re: Programmatically create a diagram of custom diagram kind [message #1747100 is a reply to message #1746153] Wed, 09 November 2016 13:17 Go to previous message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
One remark,
I advice to you set a name with the word "graphical" in this advice.
The first idea of the element type was used to customize the behavior of the semantic.
When you add graphical behavior, you melt semantic and graphical topic, So pay attention.
You can have an advice purely semantic and another advice to add graphical behavior. In this maner, if the graphical aspect change, it will be easier to manage this impact.Wink

Previous Topic:Using user-defined model library creates dangling reference?
Next Topic:how to install papyrus 2.0.1 on neon
Goto Forum:
  


Current Time: Thu Apr 18 08:05:43 GMT 2024

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

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

Back to the top