Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Proposed criteria for editing property subsets and element redefinitions
Proposed criteria for editing property subsets and element redefinitions [message #477402] Mon, 19 May 2008 18:31 Go to next message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
With org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog, the UML
Editor could have user-friendly support for editing property subsets and
element redefinitions where applicable.

To be effective, this would need reasonable queries to identify
all of the possible elements that could be subsetted or redefined
respectively.

What do you think of the following criteria for selecting property subsets?

context uml::Property : Bag(uml::Property)
body:
let cls:Bag(uml::Classifier)=self.featuringClassifier
.oclAsType(uml::Classifier) in
let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
let prop:Bag(uml::Feature)=cls.allFeatures()
->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
->collect(oclAsType(uml::Feature)))->excluding(self)
->select(oclIsKindOf(uml::Property)) in
prop->select(let p:uml::Property=oclAsType(uml::Property) in
self.type.conformsTo(p.type))

What do you think of the following criteria for selecting element
redefinitions?

context uml::RedefinableElement : Bag(uml::RedefinableElement)
body:

if self.oclIsKindOf(uml::Property) then
let cls:Bag(uml::Classifier)=self.featuringClassifier
.oclAsType(uml::Classifier) in
let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
let redefProp:Bag(uml::Feature)=parents.allFeatures()
->select(f|
f.oclIsKindOf(uml::Property) and
self.type.conformsTo(f.oclAsType(uml::Property).type))->asBag()
->intersection(parents.ownedMember
->select(oclIsKindOf(uml::Property))
->collect(oclAsType(uml::Property))
->excluding(self.oclAsType(uml::Property))
->asBag())
in redefProp

else

if self.oclIsKindOf(uml::Operation) then
let cls:Bag(uml::Classifier)=self.featuringClassifier
.oclAsType(uml::Classifier) in
let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
let redefOp:Bag(uml::Feature)=parents.allFeatures()
->select(o|
o.oclIsKindOf(uml::Operation) and
self.type.conformsTo(o.oclAsType(uml::Operation).type))->asBag()
->intersection(parents.ownedMember
->select(oclIsKindOf(uml::Operation))
->collect(oclAsType(uml::Operation)
->excluding(self.oclAsType(uml::Operation))
->asBag())
in redefOp

else

Set{}

endif

endif

-- Nicolas.
Re: Proposed criteria for editing property subsets and element redefinitions [message #477413 is a reply to message #477402] Tue, 20 May 2008 22:26 Go to previous messageGo to next message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Errata.

For editing property subsets, the OCL query to find the subsettable
candidates should start from the subsetting classifier context instead of
the featuring classifier, i.e.,:

context uml::Property : Bag(uml::Property)
body: let cls:Bag(uml::Classifier)=self.subsettingContext()
.oclAsType(uml::Classifier) in
let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
let prop:Bag(uml::Feature)=cls.allFeatures()
->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
->collect(oclAsType(uml::Feature)))->excluding(self)
->select(oclIsKindOf(uml::Property)) in
prop->select(let p:uml::Property=oclAsType(uml::Property) in
self.type.conformsTo(p.type))
Re: Proposed criteria for editing property subsets and element redefinitions [message #477493 is a reply to message #477402] Mon, 09 June 2008 16:20 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Nicolas,

Sorry the delayed response; I think James and I were both waiting for the
other to repond.

Yes, the selecton dialog could be improved, as it could for many other
features in UML, by taking information about the intended semantics into
consideration. This hasn't been done in the past because the open source
editor is really just a sample. However, feel free to open an enhancement
request for this.

Note that the list of candidate features for both subsets and redefinitions
should take into account which features have been redefined, so it's
probably better to make use of the 'member' property (instead of
'ownedMember') to look for them...

Kenn
"Nicolas Rouquette" <nicolas.f.rouquette@jpl.nasa.gov> wrote in message
news:ccb16f169d45122b6886ec8bc857dce9$1@www.eclipse.org...
> With org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog, the UML
> Editor could have user-friendly support for editing property subsets and
> element redefinitions where applicable.
>
> To be effective, this would need reasonable queries to identify
> all of the possible elements that could be subsetted or redefined
> respectively.
>
> What do you think of the following criteria for selecting property
> subsets?
>
> context uml::Property : Bag(uml::Property)
> body: let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
> let prop:Bag(uml::Feature)=cls.allFeatures()
> ->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
> ->collect(oclAsType(uml::Feature)))->excluding(self)
> ->select(oclIsKindOf(uml::Property)) in
> prop->select(let p:uml::Property=oclAsType(uml::Property) in
> self.type.conformsTo(p.type))
>
> What do you think of the following criteria for selecting element
> redefinitions?
>
> context uml::RedefinableElement : Bag(uml::RedefinableElement)
> body:
>
> if self.oclIsKindOf(uml::Property) then
> let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in let
> parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in let
> redefProp:Bag(uml::Feature)=parents.allFeatures()
> ->select(f|
> f.oclIsKindOf(uml::Property) and
> self.type.conformsTo(f.oclAsType(uml::Property).type))->asBag()
> ->intersection(parents.ownedMember
> ->select(oclIsKindOf(uml::Property))
> ->collect(oclAsType(uml::Property))
> ->excluding(self.oclAsType(uml::Property))
> ->asBag())
> in redefProp
>
> else
>
> if self.oclIsKindOf(uml::Operation) then
> let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in let
> redefOp:Bag(uml::Feature)=parents.allFeatures()
> ->select(o|
> o.oclIsKindOf(uml::Operation) and
> self.type.conformsTo(o.oclAsType(uml::Operation).type))->asBag()
> ->intersection(parents.ownedMember
> ->select(oclIsKindOf(uml::Operation))
> ->collect(oclAsType(uml::Operation)
> ->excluding(self.oclAsType(uml::Operation))
> ->asBag())
> in redefOp
> else
>
> Set{}
>
> endif
>
> endif
>
> -- Nicolas.
>
Re: Proposed criteria for editing property subsets and element redefinitions [message #477494 is a reply to message #477413] Mon, 09 June 2008 16:20 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Agreed.

Kenn

"Nicolas Rouquette" <nicolas.f.rouquette@jpl.nasa.gov> wrote in message
news:5a53c42d33b216c73b2fd2cace749931$1@www.eclipse.org...
> Errata.
>
> For editing property subsets, the OCL query to find the subsettable
> candidates should start from the subsetting classifier context instead of
> the featuring classifier, i.e.,:
>
> context uml::Property : Bag(uml::Property)
> body: let cls:Bag(uml::Classifier)=self.subsettingContext()
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
> let prop:Bag(uml::Feature)=cls.allFeatures()
> ->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
> ->collect(oclAsType(uml::Feature)))->excluding(self)
> ->select(oclIsKindOf(uml::Property)) in
> prop->select(let p:uml::Property=oclAsType(uml::Property) in
> self.type.conformsTo(p.type))
>
Re: Proposed criteria for editing property subsets and element redefinitions [message #626595 is a reply to message #477402] Tue, 20 May 2008 22:26 Go to previous message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Errata.

For editing property subsets, the OCL query to find the subsettable
candidates should start from the subsetting classifier context instead of
the featuring classifier, i.e.,:

context uml::Property : Bag(uml::Property)
body: let cls:Bag(uml::Classifier)=self.subsettingContext()
.oclAsType(uml::Classifier) in
let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
let prop:Bag(uml::Feature)=cls.allFeatures()
->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
->collect(oclAsType(uml::Feature)))->excluding(self)
->select(oclIsKindOf(uml::Property)) in
prop->select(let p:uml::Property=oclAsType(uml::Property) in
self.type.conformsTo(p.type))
Re: Proposed criteria for editing property subsets and element redefinitions [message #626683 is a reply to message #477402] Mon, 09 June 2008 16:20 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Nicolas,

Sorry the delayed response; I think James and I were both waiting for the
other to repond.

Yes, the selecton dialog could be improved, as it could for many other
features in UML, by taking information about the intended semantics into
consideration. This hasn't been done in the past because the open source
editor is really just a sample. However, feel free to open an enhancement
request for this.

Note that the list of candidate features for both subsets and redefinitions
should take into account which features have been redefined, so it's
probably better to make use of the 'member' property (instead of
'ownedMember') to look for them...

Kenn
"Nicolas Rouquette" <nicolas.f.rouquette@jpl.nasa.gov> wrote in message
news:ccb16f169d45122b6886ec8bc857dce9$1@www.eclipse.org...
> With org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog, the UML
> Editor could have user-friendly support for editing property subsets and
> element redefinitions where applicable.
>
> To be effective, this would need reasonable queries to identify
> all of the possible elements that could be subsetted or redefined
> respectively.
>
> What do you think of the following criteria for selecting property
> subsets?
>
> context uml::Property : Bag(uml::Property)
> body: let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
> let prop:Bag(uml::Feature)=cls.allFeatures()
> ->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
> ->collect(oclAsType(uml::Feature)))->excluding(self)
> ->select(oclIsKindOf(uml::Property)) in
> prop->select(let p:uml::Property=oclAsType(uml::Property) in
> self.type.conformsTo(p.type))
>
> What do you think of the following criteria for selecting element
> redefinitions?
>
> context uml::RedefinableElement : Bag(uml::RedefinableElement)
> body:
>
> if self.oclIsKindOf(uml::Property) then
> let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in let
> parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in let
> redefProp:Bag(uml::Feature)=parents.allFeatures()
> ->select(f|
> f.oclIsKindOf(uml::Property) and
> self.type.conformsTo(f.oclAsType(uml::Property).type))->asBag()
> ->intersection(parents.ownedMember
> ->select(oclIsKindOf(uml::Property))
> ->collect(oclAsType(uml::Property))
> ->excluding(self.oclAsType(uml::Property))
> ->asBag())
> in redefProp
>
> else
>
> if self.oclIsKindOf(uml::Operation) then
> let cls:Bag(uml::Classifier)=self.featuringClassifier
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in let
> redefOp:Bag(uml::Feature)=parents.allFeatures()
> ->select(o|
> o.oclIsKindOf(uml::Operation) and
> self.type.conformsTo(o.oclAsType(uml::Operation).type))->asBag()
> ->intersection(parents.ownedMember
> ->select(oclIsKindOf(uml::Operation))
> ->collect(oclAsType(uml::Operation)
> ->excluding(self.oclAsType(uml::Operation))
> ->asBag())
> in redefOp
> else
>
> Set{}
>
> endif
>
> endif
>
> -- Nicolas.
>
Re: Proposed criteria for editing property subsets and element redefinitions [message #626684 is a reply to message #477413] Mon, 09 June 2008 16:20 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Agreed.

Kenn

"Nicolas Rouquette" <nicolas.f.rouquette@jpl.nasa.gov> wrote in message
news:5a53c42d33b216c73b2fd2cace749931$1@www.eclipse.org...
> Errata.
>
> For editing property subsets, the OCL query to find the subsettable
> candidates should start from the subsetting classifier context instead of
> the featuring classifier, i.e.,:
>
> context uml::Property : Bag(uml::Property)
> body: let cls:Bag(uml::Classifier)=self.subsettingContext()
> .oclAsType(uml::Classifier) in
> let parents:Bag(uml::Classifier)=cls->union(cls.allParents()) in
> let prop:Bag(uml::Feature)=cls.allFeatures()
> ->intersection(parents.ownedMember->select(oclIsKindOf(uml::Feature))
> ->collect(oclAsType(uml::Feature)))->excluding(self)
> ->select(oclIsKindOf(uml::Property)) in
> prop->select(let p:uml::Property=oclAsType(uml::Property) in
> self.type.conformsTo(p.type))
>
Previous Topic:Is it possible to alias types
Next Topic:[Announce] MDT UML2 2.2.0RC4 is available
Goto Forum:
  


Current Time: Wed Apr 01 06:08:59 GMT 2020

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

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

Back to the top