Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How do you extend a PrimitiveType?
How do you extend a PrimitiveType? [message #1738910] Tue, 26 July 2016 05:49 Go to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
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 08:39 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7658
Registered: July 2009
Senior Member
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 08:54 Go to previous message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
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: Sat May 11 14:23:16 GMT 2024

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

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

Back to the top