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.
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)"
Finally, it worked. I was making a mistake in the name of the plugin.
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.