Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Custom Diagram for DSML(Custom Diagram for DSML not working)
Custom Diagram for DSML [message #1757799] Mon, 20 March 2017 00:35 Go to next message
Tonero toneo is currently offline Tonero toneoFriend
Messages: 24
Registered: March 2017
Junior Member
I am running into some problems with my custom diagram for DSML. How do I display my custom diagram in the "Select a Diagram Kind" editor? I have implemented a viewpoint extension with a Diagram and a View Category but when I try to create a papyrus project, my custom diagram is not listed in the editor.
Re: Custom Diagram for DSML [message #1757812 is a reply to message #1757799] Mon, 20 March 2017 08:45 Go to previous messageGo to next message
Benoit Maggi is currently offline Benoit MaggiFriend
Messages: 129
Registered: March 2013
Location: Bordeaux, France
Senior Member
Hi,

You have to register a diagramcategory to the extension"org.eclipse.papyrus.infra.ui.papyrusDiagram"
Be careful, it's required that your id is the same as your category.

You may find some code sample in the training library example.
Official version in Papyrus Neon code: https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/tree/examples/library/org.eclipse.papyrus.training.library.wizard/plugin.xml?h=streams/2.0-maintenance
A clone in my github repo (easier for browsing the code) : https://github.com/bmaggi/library-training/blob/master/org.eclipse.papyrus.training.library.wizard/plugin.xml

Regards,
Benoit
Re: Custom Diagram for DSML [message #1757869 is a reply to message #1757812] Tue, 21 March 2017 00:19 Go to previous messageGo to next message
Tonero toneo is currently offline Tonero toneoFriend
Messages: 24
Registered: March 2017
Junior Member
Thanks Benoit, It worked.
Re: Custom Diagram for DSML [message #1757908 is a reply to message #1757812] Tue, 21 March 2017 16:07 Go to previous messageGo to next message
Tonero toneo is currently offline Tonero toneoFriend
Messages: 24
Registered: March 2017
Junior Member
Benoit,

I get an exception when I try to load a palette configuration from a configuration file in Papyrus.
Exception:
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (platform:/plugin/edu.uta.cse.model/resources/palettes/customDiagram.paletteconfiguration, 1, 20)

paletteconfiguration was created from the papyrus palette using the customize option.

When I select the custom diagram, I get the exception and the palette is empty.
Re: Custom Diagram for DSML [message #1757946 is a reply to message #1757908] Wed, 22 March 2017 08:49 Go to previous messageGo to next message
Benoit Maggi is currently offline Benoit MaggiFriend
Messages: 129
Registered: March 2013
Location: Bordeaux, France
Senior Member
What version of Papyrus are you using?
Can you copy/paste the palette file (or at least a part of it)?
Re: Custom Diagram for DSML [message #1758153 is a reply to message #1757946] Fri, 24 March 2017 01:18 Go to previous message
Tonero toneo is currently offline Tonero toneoFriend
Messages: 24
Registered: March 2017
Junior Member
Hi,
I was able to resolve the issue using your example palette.configuration file.

How do I get my custom stereotype images to work? I have defined an elementstypesconfiguration with the ID matching the ID in the palette configuration, yet I am unable to use the icons. I looked at your library example carefully but still cant get it to work.

I also have a theme.css with the svg files.
Previous Topic:C++ example loading fails
Next Topic:Validation problems in Papyrus
Goto Forum:
  


Current Time: Fri Oct 11 16:09:22 GMT 2024

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

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

Back to the top