Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to modify metaclass from SysML
How to modify metaclass from SysML [message #1602508] Thu, 05 February 2015 16:08 Go to next message
Adrien Lefevre is currently offline Adrien LefevreFriend
Messages: 27
Registered: January 2015
Junior Member
Good afternoon,

In stead of creating stereotypes on UML profiles to extend metaclasses, I would like to modify these metaclasses.

For instance, I would like to add attributes on class Requirement provided by SysML and also some new links ("ParameteredBy/ParametredFrom" like "derivedFrom" and "derived"from Requirement). How can I modify the metaclasses such as Requirement? Do I have to use other softwares?

Thank you in advance,

Adrien.
Re: How to modify metaclass from SysML [message #1602657 is a reply to message #1602508] Thu, 05 February 2015 18:17 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
To define new metaclasses you might need to have a look at a model of metaclasses. Check MOF models. You can see classes with the applied stereotype <<metaclass>>. This is how you can define metaclasses.

However just applying metaclass stereotype to a class does not imply that you will suddenly have a new modeling element type in the Palette of Papyrus or factories, which can be used in Java code. That needs to be programmed separately. if that is your aim.
Re: How to modify metaclass from SysML [message #1602954 is a reply to message #1602657] Thu, 05 February 2015 22:54 Go to previous messageGo to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
Adrien,

Could be a typo, but Requirement is not a Metaclass. It is a SysML defined stereotype of the <<metaclass>> Class.
Requirements support ownedAttributes, but I guess you want to structurally define a new "kind of Requirement".
Creating a new Profile with your own "MyRequirement" stereotype and a generalization link to SysML's Requirement stereotype could do the job.
Be careful, there are some points to be aware about. See for instance bug #435276.

On the other hand, of course Furkan's reply is fully valid. Some additional work is needed on the tooling support.
Unfortunately, I don't have relevant experience on that part.
Re: How to modify metaclass from SysML [message #1603677 is a reply to message #1602954] Fri, 06 February 2015 10:16 Go to previous messageGo to next message
Adrien Lefevre is currently offline Adrien LefevreFriend
Messages: 27
Registered: January 2015
Junior Member
Good morning,

Where can I find these metaclass model files? You told me in MOF models but where are they? I would like to know the path to get there.

Thank you,

Adrien
Re: How to modify metaclass from SysML [message #1604216 is a reply to message #1603677] Fri, 06 February 2015 18:15 Go to previous message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
MOF Models can be downloaded from OMG's website. They have xml extension but can be opened in an Eclipse UML editor.

However, as OMG organisation such models using the MagicDraw (not a freeware) tool and because the old fashioned (we must admit that) UML specs do not define a standard for the diagram settings serialisation format, one needs to throw away all the MagicDraw related garbage from the files.

A better and easier way is the check the contents of your own eclipse installation: <eclipse>/plugins/org.eclipse.uml2.source.<versionnum>.jar/model/MOF.xmi
Which is apparently the EMOF (Essential MOF) specs, but it itself does not make use of <<metaclass>> stereotype but is a plain UML model.

This tells the difference between the theory and practice. If I were you, I would not take the pain to do something in that direction and deploy some order of hierarchy of building/modelling based on interdependencies.

-o-

Off-topic but I felt like noting:

Regarding UML not defining a standard for the diagram serialisation format:

I think this is the best thing Papyrus does. It is really the best part of Papyrus, separating artefacts for "THE INFORMATION" and "the visual stuff".

No commercial tools pay attention on that. They throw their tool specific garbage on to your data model. It is funny that OMG uses one of those.

[Updated on: Fri, 06 February 2015 18:16]

Report message to a moderator

Previous Topic:Hyperlink between 2 models
Next Topic:Registering a context help file
Goto Forum:
  


Current Time: Thu Jul 09 09:31:08 GMT 2020

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

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

Back to the top