Home » Modeling » Papyrus » Something strange with specialization
Something strange with specialization [message #1403097] |
Mon, 21 July 2014 11:28 |
Tomas Sandkvist Messages: 149 Registered: October 2013 |
Senior Member |
|
|
If I create two specializations of a block, aren't I supposed to be able to set the default value of a value property to different values in each specialization? And isn't that supposed to always be different from the parent's value?
Because what ever I try, the same default value pops up in both parent and childs. In this case I tries using a literalReal.
Even if I set the property of the child to redefine the property of the parent, also that setting pops up when viewing the value property of the parent (i.e. it redefines itself I guess)...
Regards,
Tomas Sandkvist
[Updated on: Mon, 21 July 2014 11:33] Report message to a moderator
|
|
|
Re: Something strange with specialization [message #1403279 is a reply to message #1403097] |
Mon, 21 July 2014 13:02 |
|
Hi, Tomas,
In UML, generally, a redefining property is able to specify a different
default value than the property that it redefines. I don't know
whether SysML defines constraints to contradict this.
But, in any case, what specifically do you mean by "pops up"? Just
that the Properties view shows the same value for the default in both
the redefining property and the redefined property? (ugh, nice
overloading of the term "property")
Probably you should raise a bugzilla with steps to reproduce.
Cheers,
Christian
On 2014-07-21 11:28:55 +0000, Tomas Sandkvist said:
> If I create two specializations of a block, aren't I supposed to be
> able to set the default value of a value property to different values
> in each specialization? And isn't that supposed to always be different
> from the parent's value?
>
> Because what ever I try, the same default value pops up in both parent
> and childs. In this case I tries using a literalReal.
>
> Regards,
> Tomas Sandkvist
|
|
|
Re: Something strange with specialization [message #1403281 is a reply to message #1403279] |
Tue, 22 July 2014 07:38 |
Marc-Florian Wendland Messages: 83 Registered: January 2013 |
Member |
|
|
Hi Tomas,
Christian is right. You have to redefine the Property contained in the
general Classifier (Block, in your case). I do not think it is worth addind
a Bugzilla, it is correct and anticipated that both the Property in the
general and specialized Block own the same default value, because they are
identical. If you create a new Property and let this Property redefine the
general Property, default values will definitely differ.
Regards,
Marc-Florian
"Christian W. Damus" wrote in message news:lqj31t$9rk$1@xxxxxxxxe.org...
Hi, Tomas,
In UML, generally, a redefining property is able to specify a different
default value than the property that it redefines. I don't know
whether SysML defines constraints to contradict this.
But, in any case, what specifically do you mean by "pops up"? Just
that the Properties view shows the same value for the default in both
the redefining property and the redefined property? (ugh, nice
overloading of the term "property")
Probably you should raise a bugzilla with steps to reproduce.
Cheers,
Christian
On 2014-07-21 11:28:55 +0000, Tomas Sandkvist said:
> If I create two specializations of a block, aren't I supposed to be able
> to set the default value of a value property to different values in each
> specialization? And isn't that supposed to always be different from the
> parent's value?
>
> Because what ever I try, the same default value pops up in both parent and
> childs. In this case I tries using a literalReal.
>
> Regards,
> Tomas Sandkvist
|
|
|
Re: Something strange with specialization [message #1403329 is a reply to message #1403279] |
Wed, 23 July 2014 04:24 |
Tomas Sandkvist Messages: 149 Registered: October 2013 |
Senior Member |
|
|
Hi Marc-Florian!
Quote:
n UML, generally, a redefining property is able to specify a different
default value than the property that it redefines. I don't know
whether SysML defines constraints to contradict this.
Well, I have been trying out making a text book trade-off analysis (from a SysML book), where the examples shows different values for different specializations of a parent, so to me it looks as if it should work the same in SysML.
Quote:
...what specifically do you mean by "pops up"? Just
that the Properties view shows the same value for the default in both
the redefining property and the redefined property? (ugh, nice
overloading of the term "property")
Yes, it appears as if it is the same instance of the value property in parent and childs, so if you show the default value in each block and change the value in one of them, you will see that the same value is shown in the other blocks.
Quote:
Probably you should raise a bugzilla with steps to reproduce.
Yes, now that I feel confident that it is an issue and not just me not understanding, I will.
Regards,
Tomas
|
|
| |
Goto Forum:
Current Time: Thu Mar 28 15:00:46 GMT 2024
Powered by FUDForum. Page generated in 0.03721 seconds
|