Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Using UML2 Profile to change Property MetaClass default
Using UML2 Profile to change Property MetaClass default [message #628224] Wed, 10 February 2010 12:33 Go to next message
Ronan B is currently offline Ronan B
Messages: 248
Registered: July 2009
Senior Member
Hi,
I have a UML Profile with a Stereotype. The Stereotype has a property base_Property whose type is <<metaclass>> <Class> Property. I would like to be able to change the default value for the isReadOnly property on <<metaclass>> <Class> Property by using my Stereotype. The use-case for this is that every UML Property in my model that has this Stereotype applied should have the isReadOnly value set to true by default. Is this possible to define in UML2?
Thanks,
Ronan
Re: Using UML2 Profile to change Property MetaClass default [message #628226 is a reply to message #628224] Wed, 10 February 2010 13:59 Go to previous message
Christian W. Damus is currently offline Christian W. Damus
Messages: 809
Registered: July 2009
Senior Member
--=-cdc/ElwVu97TbmUvCI+D
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Ronan,

No, a stereotype cannot change the default values of the attributes of
the elements that they extend.

However, your stereotype can define a well-formedness constraint (an
"invariant") that requires the isReadOnly attribute of the extended
property to be true. The model checker/validator in your tool should be
able to evaluate that constraint (I'm fairly certain that the Eclipse
UML2 sample UML editor can do it). Additionally, your application can
set the isReadOnly attribute of any new property on which this
stereotype is applied.

HTH,

Christian


On Wed, 2010-02-10 at 07:33 -0500, Ronan wrote:

> Hi,
> I have a UML Profile with a Stereotype. The Stereotype has a property base_Property whose type is <<metaclass>> <Class> Property. I would like to be able to change the default value for the isReadOnly property on <<metaclass>> <Class> Property by using my Stereotype. The use-case for this is that every UML Property in my model that has this Stereotype applied should have the isReadOnly value set to true by default. Is this possible to define in UML2?
> Thanks,
> Ronan

--=-cdc/ElwVu97TbmUvCI+D
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Ronan,<BR>
<BR>
No, a stereotype cannot change the default values of the attributes of the elements that they extend.<BR>
<BR>
However, your stereotype can define a well-formedness constraint (an &quot;invariant&quot;) that requires the isReadOnly attribute of the extended property to be true.&nbsp; The model checker/validator in your tool should be able to evaluate that constraint (I'm fairly certain that the Eclipse UML2 sample UML editor can do it).&nbsp; Additionally, your application can set the isReadOnly attribute of any new property on which this stereotype is applied.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Wed, 2010-02-10 at 07:33 -0500, Ronan wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,
I have a UML Profile with a Stereotype. The Stereotype has a property base_Property whose type is &lt;&lt;metaclass&gt;&gt; &lt;Class&gt; Property. I would like to be able to change the default value for the isReadOnly property on &lt;&lt;metaclass&gt;&gt; &lt;Class&gt; Property by using my Stereotype. The use-case for this is that every UML Property in my model that has this Stereotype applied should have the isReadOnly value set to true by default. Is this possible to define in UML2?
Thanks,
Ronan
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-cdc/ElwVu97TbmUvCI+D--
Previous Topic:finish button remains disabled on select an object to create page
Next Topic:Using UML2 Profile to change Property MetaClass default
Goto Forum:
  


Current Time: Fri Oct 31 05:51:32 GMT 2014

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

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