Skip to main content



      Home
Home » Modeling » Papyrus » Creating an attribute stereotype
Creating an attribute stereotype [message #1728402] Mon, 04 April 2016 04:30 Go to next message
Eclipse UserFriend
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 04:31] by Moderator

Re: Creating an attribute stereotype [message #1728571 is a reply to message #1728402] Tue, 05 April 2016 09:39 Go to previous messageGo to next message
Eclipse UserFriend
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 08:09 Go to previous message
Eclipse UserFriend
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 08:10] by Moderator

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


Current Time: Sat Jul 05 17:27:20 EDT 2025

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

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

Back to the top