Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » DataType?
DataType? [message #1738911] Tue, 26 July 2016 05:57 Go to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hello,
what exactly is a DataType in Papyrus 2.0 and how exactly do you use it?
Re: DataType? [message #1738964 is a reply to message #1738911] Tue, 26 July 2016 11:07 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

The semantics of DataType are defined by the UML. I'd suggest you read
up about it in any good UML book or tutorial. The specification at OMG
is a start, if not actually light reading:

http://www.uml.org/

HTH,

Christian

On 2016-07-26 05:58:02 +0000, Philippe de Rochambeau said:

> Hello,
> what exactly is a DataType in Papyrus 2.0 and how exactly do you use it?
Re: DataType? [message #1738970 is a reply to message #1738964] Tue, 26 July 2016 11:44 Go to previous messageGo to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hi Christian,
when I originally posted the question, I wasn't sure how to extend a DataType. For instance, I wanted to create a Money DataType extending a UML Real, but wasn't sure how to do it (there isn't a "subclass x" field in the DataType UML Properties Tab, for example.)
Then Ed Willink suggested, in a different thread, that I apply the OCLforUML to my model, and apply the OCLforUML Real stereotype to Money.
Re: DataType? [message #1739240 is a reply to message #1738970] Thu, 28 July 2016 17:31 Go to previous messageGo to next message
Sebastien Gerard is currently offline Sebastien GerardFriend
Messages: 121
Registered: July 2009
Senior Member
Hi,

if you want to extend the DataType concept of UML, you can either do it by creating your new data type and model a generalization relatonship from your new data type and the Real data type of the UML standard.
You could also create a stereotype that extend the UML DataType Concept.


Best,
Seb.
Re: DataType? [message #1739713 is a reply to message #1739240] Thu, 04 August 2016 08:44 Go to previous messageGo to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hi Sebastien,
how do you graphically "model a generalization relatonship from your new data type and the Real data type of the UML standard" in Papyrus? The Papyrus Node Palette doesn't contain an UML Standard Data Type to which you could connect, say, a custom Money Data Type, with a Generalization Edge.
  • Attachment: uml_real.png
    (Size: 16.57KB, Downloaded 144 times)

[Updated on: Thu, 04 August 2016 09:01]

Report message to a moderator

Re: DataType? [message #1739755 is a reply to message #1739713] Thu, 04 August 2016 10:38 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6754
Registered: July 2009
Senior Member
Hi Philippe

I don't think that Sebastian's comment was really that helpful.

IMHO a PrimitiveType is an escape mechanism for something that is not
possible to model sensibly. It just happens that there are some common
concepts such as Boolean, String, Integer etc for which we understand
their behaviour even if we have no idea about their representation.

Adding new escape mechanisms is fine but you must intend to provide a
complete set of tools that support the new escapes. Papyrus may work out
of the box, some tools may allow the new escapes to be declared and
modelled in a tool-specific language, possibly OCL or Java, but others
may require a major coding intervention.

Extending the escapes runs the risk that you break tools whose handling
of the escapes is not compatible with your extension. I doubt that many
code generators could handle a multiple inheritance of Boolean and Real.
I'm pretty sure that Eclipse OCL would malfunction.

DataTypes on the other hand represent new modelling. Use them for your
data types.

Regards

Ed Willink


On 04/08/2016 09:44, Philippe de Rochambeau wrote:
> Hi Sebastian,
> how do you graphically "model a generalization relatonship from your new
> data type and the Real data type of the UML standard" in Papyrus? There
> isn't any UML Standard Data Type icon in the Papyrus Node Palette, which
> you could connect a, say, Money Data Type, using a Generalization Edge.
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Previous Topic:Label Positioning in NEON
Next Topic:Actions and Object Nodes
Goto Forum:
  


Current Time: Thu Jul 02 10:32:53 GMT 2020

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

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

Back to the top