Skip to main content



      Home
Home » Modeling » Papyrus » How do you extend a PrimitiveType?
How do you extend a PrimitiveType? [message #1738910] Tue, 26 July 2016 01:49 Go to next message
Eclipse UserFriend
Hello,
I'm trying to create a Money Type derived from an UML PrimitiveType such as Real.
Can you do that in Papyrus 2.0?

Re: How do you extend a PrimitiveType? [message #1738935 is a reply to message #1738910] Tue, 26 July 2016 04:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi

You can in UML and I see no reason why it should be a problem in Papyrus.

However PrimitiveTypes are primitive and so IMHO it would be much better
to use a DataType, with a <<Real>> stereotype from OCLforUML.

Prior to OCLforUML, it was necessary for OCL tooling to try to deduce
whether an XXX::Boolean was the same type as a YYY::Boolean e.g. SysML /
UML / OCL / Ecore / ...) and so I extended the pragmatism that
CollectionType specializations are equal by local name regardless of
their namespace to treat PrimitiveTypes as equal regardless of their
namespace. Consequently your MoneyType PrimitiveType is on the way to
being equal to someone else's MoneyType PrimitiveType. Better not to use
PrimitiveTypes for non-primitive concepts.

Regards

Ed Willink


On 26/07/2016 06:50, Philippe de Rochambeau wrote:
> Hello,
> I'm trying to create a Money Type derived from an UML PrimitiveType
> such as Real.
> Can you do that in Papyrus 2.0?
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: How do you extend a PrimitiveType? [message #1738938 is a reply to message #1738935] Tue, 26 July 2016 04:54 Go to previous message
Eclipse UserFriend
I've applied the OCLforUML Profile to my model, created a Money DataType and applied the Real Stereotype to the latter. It worked. Many thanks, Ed.
Previous Topic:Papyrus test plugins update site
Next Topic:OCL List Comprehensions
Goto Forum:
  


Current Time: Sun Jul 06 23:53:17 EDT 2025

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

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

Back to the top