Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Adding a Profile to a Plugin
Adding a Profile to a Plugin [message #1194167] Mon, 18 November 2013 11:20 Go to next message
Bruce Collie is currently offline Bruce CollieFriend
Messages: 3
Registered: November 2013
Junior Member
I have a profile that I would like to bundle with a plugin so that it appears as a registered package.

What XML do I have to add to my plugin.xml to get this to work?

Thanks
Re: Adding a Profile to a Plugin [message #1194405 is a reply to message #1194167] Mon, 18 November 2013 13:51 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Bruce,


You need to fill in the following extension points:

- org.eclipse.emf.ecore.generated_package
- org.eclipse.uml2.uml.generated_package
- org.eclipse.papyrus.uml.extensionpoints.UMLProfile

Note that if you didn't convert your profile to Ecore, you need to replace "generated_package" with "dynamic_package".

The first two extension points are required to produce pure-UML profiles. The last one if for Papyrus integration ("Registered Package")


Regards,
Camille


Camille Letavernier
Re: Adding a Profile to a Plugin [message #1216124 is a reply to message #1194405] Thu, 28 November 2013 10:26 Go to previous messageGo to next message
Johan Hardy is currently offline Johan HardyFriend
Messages: 47
Registered: December 2012
Member

Here is an example for a profile :

   <extension
         point="org.eclipse.emf.ecore.uri_mapping">
      <mapping
            source="pathmap://resources/Functional_C/"
            target="platform:/plugin/com.spacebel.papyrus.profile.functional_C/resources/Functional_C/">
      </mapping>
   </extension>
   <extension
         point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
      <profile
            description="UML profile for functional C"
            iconpath="icons/Profile.gif"
            name="Functional C"
            path="pathmap://resources/Functional_C/functional_C.profile.uml"
            provider="Spacebel SA">
      </profile>
   </extension>
Re: Adding a Profile to a Plugin [message #1404703 is a reply to message #1216124] Tue, 05 August 2014 07:38 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Dear all,

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?

Thank you.

[Updated on: Tue, 05 August 2014 07:38]

Report message to a moderator

Re: Adding a Profile to a Plugin [message #1404764 is a reply to message #1404703] Tue, 05 August 2014 14:42 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Luis,

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/)

See https://wiki.eclipse.org/Papyrus/Code_Standards#Plug-ins for what should be included in your "build.properties" (And what shouldn't)

Regards,
Camille


Camille Letavernier
Re: Adding a Profile to a Plugin [message #1404784 is a reply to message #1194167] Tue, 05 August 2014 18:02 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi Camille, thank you for the swift reply.

Below goes a screen capture of my build.properties file as portrayed by the GUI. I have all the Papyrus files selected, as so the CSS.

index.php/fa/18786/0/

Thank you.
Re: Adding a Profile to a Plugin [message #1405412 is a reply to message #1404784] Thu, 07 August 2014 09:46 Go to previous messageGo to next message
Johan Hardy is currently offline Johan HardyFriend
Messages: 47
Registered: December 2012
Member

Use the code below and put all your DSL3S files into the directory "MyPluginName/resources/DSL3S" like:

MyPluginName/resources/DSL3S/DSL3S.profile.di
MyPluginName/resources/DSL3S/DSL3S.profile.profile.notation
MyPluginName/resources/DSL3S/DSL3S.profile.profile.uml
MyPluginName/resources/DSL3S/DSL3S.css

(I personally put my papyrus project inside resources)

   <extension
         point="org.eclipse.emf.ecore.uri_mapping">
      <mapping
            source="pathmap://resources/DSL3S/"
            target="platform:/plugin/MyPluginName/resources/DSL3S/">
      </mapping>
   </extension>
   <extension
         point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
      <profile
            description="UML profile DSL3S"
            name="DSL3S"
            path="pathmap://resources/DSL3S/DSL3S.profile.uml"
            provider="My friend Luis">
      </profile>
   </extension>


Ensure that you have selected all the resources necessary for your profile in the build.properties.
It should work with that otherwise you missed something.
Re: Adding a Profile to a Plugin [message #1405602 is a reply to message #1405412] Thu, 07 August 2014 18:48 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi Johan, thank you for the reply.

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?

Thank you.
Re: Adding a Profile to a Plugin [message #1405608 is a reply to message #1405602] Thu, 07 August 2014 19:06 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
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):

index.php/fa/18825/0/

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.

Best.
Re: Adding a Profile to a Plugin [message #1405781 is a reply to message #1405608] Fri, 08 August 2014 07:00 Go to previous messageGo to next message
Johan Hardy is currently offline Johan HardyFriend
Messages: 47
Registered: December 2012
Member

Yes if the profile is registered through an extension you should select the plugin icon Smile

[Updated on: Fri, 08 August 2014 07:00]

Report message to a moderator

Re: Adding a Profile to a Plugin [message #1424914 is a reply to message #1405781] Tue, 16 September 2014 15:44 Go to previous messageGo to next message
Walid Ban is currently offline Walid BanFriend
Messages: 53
Registered: January 2013
Member
Hi all,
I followed all the steps but I couldn't register my profile Sad
This is what I did:
- I converted the project that contains the profile (Papyrus project) into Plugin project.
- I added these extension points:
- org.eclipse.emf.ecore.generated_package
- org.eclipse.uml2.uml.generated_package
- org.eclipse.papyrus.uml.extensionpoints.UMLProfile
(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 Crying or Very Sad

Please help me, what should I do??
  • Attachment: tof1.png
    (Size: 26.36KB, Downloaded 383 times)
  • Attachment: tof2.png
    (Size: 18.30KB, Downloaded 378 times)
  • Attachment: tof3.png
    (Size: 56.20KB, Downloaded 368 times)
Re: Adding a Profile to a Plugin [message #1424921 is a reply to message #1424914] Tue, 16 September 2014 15:50 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Walid,

You need to use the "Extension" tab (i.e. contribution), not the "Extension point" tab (i.e. declaration)

Regards,
Camille


Camille Letavernier
Re: Adding a Profile to a Plugin [message #1424937 is a reply to message #1424921] Tue, 16 September 2014 16:27 Go to previous messageGo to next message
Walid Ban is currently offline Walid BanFriend
Messages: 53
Registered: January 2013
Member
Thank you Camille for the quick answer..
I used the extension tab, and i tried to add those extension points, but when i wrote the name of the extension point, nothing was displayed!

Should I add dependencies in the dependencies tab?
  • Attachment: tof4.png
    (Size: 59.91KB, Downloaded 350 times)
Re: Adding a Profile to a Plugin [message #1424953 is a reply to message #1424937] Tue, 16 September 2014 16:57 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

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.

The required dependencies are:

- org.eclipse.emf.ecore
- org.eclipse.uml2.uml
- org.eclipse.papyrus.uml.extensionpoints

Regards,
Camille


Camille Letavernier
Re: Adding a Profile to a Plugin [message #1424981 is a reply to message #1424953] Tue, 16 September 2014 17:48 Go to previous messageGo to next message
Walid Ban is currently offline Walid BanFriend
Messages: 53
Registered: January 2013
Member
Hi,
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 Confused
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?
  • Attachment: tof5.png
    (Size: 15.55KB, Downloaded 343 times)
  • Attachment: tof6.png
    (Size: 22.72KB, Downloaded 312 times)
  • Attachment: tof7.png
    (Size: 20.05KB, Downloaded 310 times)
Re: Adding a Profile to a Plugin [message #1425128 is a reply to message #1424981] Tue, 16 September 2014 22:47 Go to previous messageGo to next message
Walid Ban is currently offline Walid BanFriend
Messages: 53
Registered: January 2013
Member
Hi,
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??


  • Attachment: path.png
    (Size: 29.48KB, Downloaded 360 times)
  • Attachment: URI1.png
    (Size: 24.61KB, Downloaded 303 times)
  • Attachment: URI2.png
    (Size: 24.41KB, Downloaded 374 times)
Re: Adding a Profile to a Plugin [message #1425380 is a reply to message #1425128] Wed, 17 September 2014 08:16 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

The path should be a valid EMF URI indicating the location of the UML Profile file:

platform:/plugin/<pluginID>/path/to/the/profile.uml

e.g.:

platform:/plugin/org.eclipse.papyrus.sysml/model/SysML.profile.uml

Regards,
Camille


Camille Letavernier
Re: Adding a Profile to a Plugin [message #1425398 is a reply to message #1425380] Wed, 17 September 2014 08:51 Go to previous messageGo to next message
Walid Ban is currently offline Walid BanFriend
Messages: 53
Registered: January 2013
Member
Hi,
Thank you so much for your advices!! Finally it worked!
here's the path I put: platform:/plugin/org.eclipse.papyrus.AWS_Profile/aws.profile.uml

Best regards
Re: Adding a Profile to a Plugin [message #1785630 is a reply to message #1425398] Tue, 17 April 2018 15:14 Go to previous messageGo to next message
angelina  default is currently offline angelina defaultFriend
Messages: 3
Registered: April 2018
Junior Member
hello
i have a profile and i am trying to bundel it to a plugin .
i did right clic configure->pluginproject .I added this extensions:

-org.eclipse.emf.ecore.dynamic_package
- org.eclipse.uml2.uml.dynamic_package
- org.eclipse.papyrus.uml.extensionpoints.UMLProfile

I selected files and folders in build.properties
Then, I did run configuration, the plugin is installed, but when i created a new papyrus model in the plugin, i tried to apply my profile, but i didn't find it in registered profiles.
Please can you help me.it is so important for my project to finish correctly this step.

angelina
Re: Adding a Profile to a Plugin [message #1785676 is a reply to message #1785630] Wed, 18 April 2018 09:10 Go to previous messageGo to next message
angelina  default is currently offline angelina defaultFriend
Messages: 3
Registered: April 2018
Junior Member
I have a profile that I would like to bundle with a plugin so that it appears as a registered package.
i did right clik -> configure -> plugin project
I added this extensions:
- org.eclipse.emf.ecore.dynamic_package
- org.eclipse.uml2.uml.dynamic_package
- org.eclipse.papyrus.uml.extensionpoints.UMLProfile

- I selected files and folders in build.properties
then i did right clic ->run as -> run configuration
a new instance of papyrus appeared with the name of the project (the plugin)
but when i created a new papyrus project -> sysML 1.4 ( in the instance plugin ) i didn't find my profile in the list .

Please help me, what should I do??
I have to do this step correctly to continue my project
heeeeelppp
Angelina
Re: Adding a Profile to a Plugin [message #1828266 is a reply to message #1194167] Fri, 05 June 2020 08:51 Go to previous message
Esteban Gutierrez is currently offline Esteban GutierrezFriend
Messages: 4
Registered: June 2020
Junior Member
Hello,

I made a sysml 1.4 profile that i want to add in a plugin.
I followed the steps presented on this topic, but when I try to select my profile in the plugin the message "The selected file doesn't exist" appears.
I think the problem comes from the extensions but i can't tell where

Thank you in advance.
Esteban
Previous Topic:Error Guard must be set for Combined Fragment
Next Topic:"String value(s) can't be resolved" error in table import
Goto Forum:
  


Current Time: Fri Mar 29 10:35:50 GMT 2024

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

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

Back to the top