Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Creating an attribute stereotype
Creating an attribute stereotype [message #1728402] Mon, 04 April 2016 08:30 Go to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hello,
in the Interaction Flow Modeling Language book published by Morgan Kaufman, the authors state that:

Quote:
an effective way to create a UML stereotype of the general concept of attribute or attribute group and associate the OCL contraint with such a stereotype.


I have created a Profile and a Stereotype within it called PK, within my Papyrus RootElement, then created a Class with a single attribute. Next, I have tried applying the newly create profile to the latter, but without success because it would seem as though you can only apply Stereotypes to Classes, not to attributes.

What am I doing wrong?
Many thanks.

Philippe

[Updated on: Mon, 04 April 2016 08:31]

Report message to a moderator

Re: Creating an attribute stereotype [message #1728571 is a reply to message #1728402] Tue, 05 April 2016 13:39 Go to previous messageGo to next message
Daniel Clarke is currently offline Daniel ClarkeFriend
Messages: 24
Registered: March 2016
Junior Member
Hi,

I think you have missed the step of adding an "extend" relationship to your stereotype (to the "Property" metaclass). To do this you need to create a Profile Diagram, then drag your stereotype onto the diagram. Next, use "Import Metaclass" from the palette and select "Property". Then create an extension from your stereotype to the imported metaclass (using the "Extension" element from the palette). That should fix it I think.

This document shows you in more detail: http://www.eclipse.org/papyrus/resources/PapyrusUserGuideSeries_AboutUMLProfile_v1.0.0_d20120606.pdf (page 12)

Dan
Re: Creating an attribute stereotype [message #1728682 is a reply to message #1728571] Wed, 06 April 2016 12:09 Go to previous message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hi Dan,
Many thanks for your pointers and for the hyperlink to the Papyrus User Guide. The concepts are now beginning to sink in.

[Updated on: Wed, 06 April 2016 12:10]

Report message to a moderator

Previous Topic:Requirement diagram, refine and usecase problem
Next Topic:Update site times out?
Goto Forum:
  


Current Time: Tue Jul 14 01:14:40 GMT 2020

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

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

Back to the top