Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Get and create SysML subprofiles (SysML 1.4 Memtamodel)
Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1753455] Mon, 06 February 2017 16:35 Go to next message
Rineseable Eika is currently offline Rineseable EikaFriend
Messages: 8
Registered: January 2016
Junior Member
Hi,
Hi,

how can I get/create Profile Application for SysML subprofiles (Blocks, Allocations, ...) with SysML 1.4 metamodel. To sum up, what is the associated java code to acces and get for example Blocks profile application :

  <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_8Dbu0eR0EeaKr774zLalDA">
    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8Dbu0uR0EeaKr774zLalDA" source="http://www.eclipse.org/uml2/2.0.0/UML">
      <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/sysml/1.4/SysML#//blocks"/>
    </eAnnotations>
    <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML14_PROFILES/SysML.profile.uml#SysML.package_packagedElement_Blocks"/>
  </profileApplication>


The topic started here and it seems like the code That I've tried doesnt work with the metamodel sysml 1.4
Link here :

https://www.eclipse.org/forums/index.php/m/1753454/#msg_1753454

Best kinds,
Nesrine.
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1753457 is a reply to message #1753455] Mon, 06 February 2017 17:16 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 Nesrine,

There was a change in 0.10.0 in order to improve performances.

Basically, You have to reapply the profile and the sub profiles.

https://www.eclipse.org/papyrus/components/sysml/0.10.0/changes-report.html

Performance: change Package to Profile in the SysML 1.4 OMG profile :warning: The profile needs to be re-apply: - Open your Model - Select the root in the Model Explorer - Select Profile Properties view - SysML 1.4 profile is applied - Re-apply SysML 1.4 profile => All SysML 1.4 sub profile should also be applied Fixes 501077.

Please find attached an "empty" sysml.uml example, you will see that all sub profile have to be applied now. You should be able to copy/paste the text directly or re apply the profile using Papyrus.

Regards,
Benoit
  • Attachment: sysml14.uml
    (Size: 5.76KB, Downloaded 49 times)
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1753513 is a reply to message #1753457] Tue, 07 February 2017 11:12 Go to previous messageGo to next message
Rineseable Eika is currently offline Rineseable EikaFriend
Messages: 8
Registered: January 2016
Junior Member
Hi Benoit,

Thank you for the answer. So what I understand is that "programatically" I'm not able to get or apply à profile?
Let me give an example:
I'm java programing a Model to Model transformer from a model A to à target SysML 1.4 model. I want to transform a port element from model A to a FullPort port in the target SysML1.4 model. To do so, I need to create a port using UMLFactory, get the applicable stereotypes to acces the "Full port" stereotype. So, how can I transform and create a full port programatically ? I'm not supposed to do it on Papyrus IDE for instance. This is the same for the reste of SysML elements "allocation", "activities" , etc, etc, ...
Don't hesitate to ask for more specific details.
Regards,
Nesrine.
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1753535 is a reply to message #1753513] Tue, 07 February 2017 15:04 Go to previous messageGo to next message
Benoit Maggi is currently offline Benoit MaggiFriend
Messages: 129
Registered: March 2013
Location: Bordeaux, France
Senior Member
If you already managed to apply the profile with 0.9.0, it should be straightforward for 0.10.0 : you apply all the sub profiles.

Are you trying to avoid only Papyrus IDE or also the eclipse osgi Platform?
What is your source model? meta-model?
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1754766 is a reply to message #1753535] Wed, 22 February 2017 08:37 Go to previous messageGo to next message
Rineseable Eika is currently offline Rineseable EikaFriend
Messages: 8
Registered: January 2016
Junior Member
Hi Benoit,

I will try to be more specific in this posusing the code in charge of loading SysML 1.4 profile and subprofiles.
I'm using the attached SysmlResourcesUtilitites to load the profiles from the resource set etc...
In the calling class, I'm calling the load sysml profile and sub profiles as follow (the example is focused on the activities profile):

		/*
		 * Create the model
		 */
		Model model = SysmlResourcesUtilities.createSysmlModel();


		/*
		 * Create ResourceSet and load sysml profile
		 */
		ResourceSet set 			= new ResourceSetImpl();
		Profile sysmlProfile 		= SysmlResourcesUtilities.init(set);
		Profile requirementsProfile = (Profile) sysmlProfile.getNestedPackage("Activities");


(Profile) sysmlProfile.getNestedPackage("Activities"); throws a cast exception, as the getNestedPackage return a Package, not a profile.
If I check the SysML.profile.uml for SysML14, I can see that SysML14 subprofiles are absolutly not profiles (see attached image).
What is the right way to get the subprofiles ?
Don't hesitate if you have any question.

Regards,
Nesrine.

[Updated on: Wed, 22 February 2017 08:38]

Report message to a moderator

Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1783229 is a reply to message #1754766] Fri, 09 March 2018 12:29 Go to previous message
Frank Poppen is currently offline Frank PoppenFriend
Messages: 21
Registered: February 2018
Junior Member
Have you been able to make your "SysML14ResourcesUtilities.java" work? I'm trying to use Acceleros with SysML and as it seems in this context, such a functionality has been missing for many years now. Amazing that it still has not been implemented yet, as it seems. I'm trying to get this running but could use some help here.
Previous Topic:Papyrus Extensions
Next Topic:Active Object Controller Model Library
Goto Forum:
  


Current Time: Fri Sep 21 03:40:08 GMT 2018

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

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

Back to the top