Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Profile defined classes
Profile defined classes [message #1834722] Mon, 16 November 2020 20:25 Go to next message
Philipp Gia is currently offline Philipp GiaFriend
Messages: 5
Registered: September 2020
Junior Member
Hello everyone,

I wanted to ask if I am able to create profile defined classes in Papyrus. I was not able to find something in the documentation. In the image we can a see a profile defined class, would I be able to create something like that?

Furthermore, in case i can create profile defined classes, am I able to to have changeable icons based on what attribute the user adds?

Kind Regards,
Philipp
Re: Profile defined classes [message #1834801 is a reply to message #1834722] Wed, 18 November 2020 09:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Since no one else is answering....

I'm not sure what you mean by profile defined class, but Papyrus certainly supports Profiles that contain Stereotypes that are a specialized form of Class. I'm not aware of a Profile contains ordinary Class use case.

I've never used the icon customization of Stereotypes but since it is one of the goals of the Profile/Stereotype design, I would be surprised if it is not supported.

Regards

Ed Willink
Re: Profile defined classes [message #1834869 is a reply to message #1834801] Thu, 19 November 2020 12:49 Go to previous messageGo to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
Hi,
when you want to type a property by a class, normally you have to create an instance of this class. But It is not possible in UML, there is no instances only instancespecification. In our profile, you must type your property by an instanceSpecification.
Re: Profile defined classes [message #1834879 is a reply to message #1834869] Thu, 19 November 2020 15:23 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Philipp,

Yes, this almost works in Papyrus. The Class in your profile needs to be created somewhere, though, and that is in a stereotype. So you must create a composite association between some stereotype and your class. When you do that, then in the "Profile" tab in the properties, your applied stereotype expands to show the property of your class type and you can use the green "+" button on the right-hand side to create instances of the class in the stereotype application.

However, there does not appear to be a way to edit the properties of the class. This appears to be an oversight in the properties editing support for applied stereotypes. You can use the UML Editor to edit the class's properties.

I attach a screenshot showing how I create and edit instances of a "Bar" class composed in the "Foo" stereotype applied to an element in a UML model.

HTH,
Christian

index.php/fa/39344/0/
Re: Profile defined classes [message #1834929 is a reply to message #1834879] Fri, 20 November 2020 20:34 Go to previous message
Philipp Gia is currently offline Philipp GiaFriend
Messages: 5
Registered: September 2020
Junior Member
Hello,

thank you! Your answers covered me fully :)

Kind Regards,
Philipp
Previous Topic:Validation problems
Next Topic:How do I add the STD library to my project?
Goto Forum:
  


Current Time: Thu Apr 25 19:36:40 GMT 2024

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

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

Back to the top