I have followed the instructions above to successfully export a profile as a plugin. I was also able to add this plugin to another Eclipse instance from an update site.
The problem is that on the second Eclipse instance I am unable to use this profile. For instance, when creating a new Papyrus model, it does not appear in the profile application menu. Do I need to do something else to access the profile?
For runtime (nested) Eclipse instances, this should work fine, since they don't package the plug-ins as Jar archives. However, if you build and install the plug-in, you should make sure that the profile is actually included into the Jar. This is declared in the "build.properties" file of the plug-in: the "binary build" should contain all your resources (e.g. folder model/ or resources/)
I modified the plugin project as you suggested: moved all the files into the resources folder and updated the plugin.xml file accordingly. The behaviour is essentially the same: no problems exporting the feature to the update site and neither installing the plugin in the target instance, but in the end the profile is no where to find.
What if the problem is on the target instance? I am searching for it using the Apply Profile... dialogue, accessed through Properties window > Profile tab > plus (+) icon. Is this the correct way of doing it?
Ok, so this was really an issue on the target instance, or more precisely with the user of the target instance. To access registered profiles one has to press the plug-in icon, the second from the right in the image below (not the green plus):
This may seem obvious to everyone, but it wasn't for me. It might be possible the plugin had been functioning properly all along, but in any case I recommend the scheme proposed by Johan.
Thank you all for the replies, and apologies for taking your time this way.
I followed all the steps but I couldn't register my profile
This is what I did:
- I converted the project that contains the profile (Papyrus project) into Plugin project.
- I added these extension points:
(I just filled the name of the extension point, in my case "aws")
- I selected files and folders in build.properties
- I exported the plugin then I installed it.
But when I created a new Paypyrus model and cliked on "apply registerd profile", I didn't find my profile in the list
You will need dependencies to the UML, EMF and Papyrus plug-ins which define these extension points. The simplest way is, when adding a new extension, to uncheck "Show only extension points from the required plug-ins". Eclipse will show you all avaible extension points, and will automatically add the required dependencies afterwards.
Thank you again..
I didn't find this extension point: org.eclipse.papyrus.uml.extensionpoints.UMLProfile
I found that: org.eclipse.papyrus.uml.extensionpoints.UMLMetamodel
I don't know if they are the same thing or not? but i added it.
Then, I installed the plugin, created a new papyrus model, tried to apply my profile, but i didn't find it in registered profiles
I don't know where is the problem? is it the build.properties or is what i did in the first step is wrong? (converting a papyrus project that contains the profile to plugin project)
I did right click-->configure-->convert to plugin projects
is there a better soution to bundle the profile into a plugin?
I'm sorry for my last message, maybe I didn't pay attention but I found the extension point "org.eclipse.papyrus.uml.extensionpoints.UMLProfile"
I finally found my profile among registered profiles, but the problem is when I click on it and validate, nothing happens! The window "Choose profile to apply" where I must check my profile didn't appear!! I have a doubt about the attribute "path" of "org.eclipse.papyrus.uml.extensionpoints.UMLProfile" extension point.
Please, what should I put to fill these extension points??