Concerning UML 1.4 ChangeabilityKind enum being replaced with the UML
2.x isReadOnly boolean
On Thu, May 29, 2008 at 4:17 PM, Michiel van der Wulp <[EMAIL PROTECTED]> wrote:
[getChangeability has been deprecated and replaced by isReadOnly]
> The problem here is, that for the 3 cases, this latter method only has 2
> answers.
>
>
> E.g. see my commit 14834; I replaced this:
> if (Model.getFacade().getChangeability(modelElement) != null) {
> if (Model.getChangeableKind().getFrozen().equals(
> Model.getFacade().getChangeability(modelElement))) {
> changeableKind = "frozen";
> }
> }
> with this:
> if (Model.getFacade().isReadOnly(modelElement)) {
> changeableKind = "frozen";
> }
That's the right change, but it might make sense to defer doing the
changes until we can address everything at once, including:
- warning users that the change is coming
- upgrading their existing models
- change the UI to use the new UML 2.x terminology
I doubt anyone is actually using ADD_ONLY since it's kind of silly
(presumably why it got removed from UML 2.x), but we should still warn
folks anyway. The real question is what is the appropriate timing for
making this change. Do we do it while we're still primarily based on
UML 1.4 or do we wait until the transition to UML 2.x.?
> But with the isReadOnly() method, there is no way anymore to find out if the
> attribute is set, i.e. if there is a value filled in. Some day, we might
> need this functionality...
I can't see us ever needing it. The UML 2.1 spec says that the
default value is "false," so if for some reason the value isn't
present, we should interpret it as false. What are you thinking we'll
need it for?
BTW, the same discussion applies to getScope vs isStatic as well as a
number of other UML 2.x migration issues and we should apply whatever
we decide to those cases as well. Until we're further along with the
eUML work though, we probably won't know the full scope of these
issues.
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]