Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to customize the palette with viewpoints?
How to customize the palette with viewpoints? [message #1761403] Wed, 10 May 2017 15:21 Go to next message
Adrian Bernal Bermejo is currently offline Adrian Bernal BermejoFriend
Messages: 10
Registered: May 2017
Junior Member
Hi all,

I have done a UML profile, I registered it and I added it to a plugin. I also maked a *.ctx file to show the profile properties in the properties view. All this work fine.

Now, I want customize the component and sequence diagram palettes in order to add the stereotyped classes to the palettes to make working with the profile easier.

I saw that extending "org.eclipse.papyrus.uml.diagram.common.paletteDefinition" extension point with a *.xml file is deprecated. And if i do this I would need to projects due to it only applies the last extension.

Then I am trying to customize the palettes with Viewpoints but I think i am doing something wrong because I have some problems.

1. I am trying to customize the palette configuring the "Custom Palette" property of the diagram with a *.xml file. I am not sure if a can put a .xml file there or I need to put a .paletteConfiguration file, but I don't know how to create it. I think I have to do it writting the file directly but I don't know where I can read documentation about it.
I got the xml file customizing the palette with papyrus and searching the file in the papyrus folder.

2. I saw in "https://help.eclipse.org/neon/topic/org.eclipse.papyrus.infra.viewpoints.doc/target/generated-eclipse-help/viewpoints.html?cp=66_1_0_3_1#Walkthrough" that giving an URI of the form platform:/plugin/my.plugin.name/path/myconfig.configuration is a good practice but it doesn't work and I have to put "forder/file.xml".

3. I have the same problem with the URIs in the diagram properties. I tried to configure "Custom Palette", "Icon" and "Custom Style" diagram properties but I don't know how to put the correct uri to my project files.
- When I write "platform:/plugin/my.plugin.name/path/myfile" I get an exception "java.io.IOException: Unable to resolve plug-in"
- When I write "folder/file" I get "java.io.FileNotFoundException: folder/file (The system can't found the path)"

Can somebody tell me if I am in the correct way

Thank you very much in advance!

Regars,
Adrián
Re: How to customize the palette with viewpoints? [message #1763392 is a reply to message #1761403] Mon, 15 May 2017 07:53 Go to previous message
Adrian Bernal Bermejo is currently offline Adrian Bernal BermejoFriend
Messages: 10
Registered: May 2017
Junior Member
Finally, it worked. I was making a mistake in the name of the plugin. Rolling Eyes

Then:

1. I used the *.xml created by papyrus customizing the palette directly from the model editor and taking the file from the "workspace/.metadata/.plugins/org.eclipse.papyrus.uml.diagram.common" folder. It works fine. I saw some example where they use a .paletteConfiguration file but I still don't know how to create it neither if there is any difference.

2. If you include the folder in the binary build properties and you type correctly the name of the plugin, it should work. According to the documentation it is the best way to do it.

3. Finally solved. Only taking care typing the name of the plugin.

Regards,

Adrián.
Previous Topic:Activity diagram preferences
Next Topic:"Repair stereotypes" after creating model from template with applied profile
Goto Forum:
  


Current Time: Fri Jun 22 18:24:45 GMT 2018

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

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

Back to the top