Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » OCL expression problem extending UML2 editor
OCL expression problem extending UML2 editor [message #191975] Tue, 10 June 2008 18:45 Go to next message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

Hi,
I'm trying to build a customized/extended composite structure editor for my middleweight-extension of UML.
My model contains a specialized Port (in addition to the regular Port from UML) which shall be displayed differently.
I copied the Port Node Mapping entry from the compositeStructures.gmfmap and adapted it to fit the new Port.
While the editor works as expected with the regular UML Ports, I have a problem with the feature initializers of the new
Port. For example, there is one OCL feature initializer saying that feature "aggregation" should be
"AggregationKind::composite". When I create a new Port in the editor, I get the following error:

Expression problem:Unknown type ([AggregationKind, composite])body:AggregationKind::composite

Any ideas why that is?
Thanks

Joel
Re: OCL expression problem extending UML2 editor [message #191994 is a reply to message #191975] Tue, 10 June 2008 21:14 Go to previous message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

Hi Christian,
I already suspected it had to do with the metamodel namespace.
Now it works!

Thanks for the quick reply

Joel


Christian W. Damus wrote:
> Hi, Joel,
>
> If the context classifier of your OCL init expression isn't in the UML
> metamodel namespace, then you will have to fully qualify your enumeration:
>
> uml::AggregationKind::composite
>
> HTH,
>
> Christian
>
>
> On Tue, 2008-06-10 at 20:45 +0200, Joel Greenyer wrote:
>> Hi,
>> I'm trying to build a customized/extended composite structure editor for my middleweight-extension of UML.
>> My model contains a specialized Port (in addition to the regular Port from UML) which shall be displayed differently.
>> I copied the Port Node Mapping entry from the compositeStructures.gmfmap and adapted it to fit the new Port.
>> While the editor works as expected with the regular UML Ports, I have a problem with the feature initializers of the new
>> Port. For example, there is one OCL feature initializer saying that feature "aggregation" should be
>> "AggregationKind::composite". When I create a new Port in the editor, I get the following error:
>>
>> Expression problem:Unknown type ([AggregationKind, composite])body:AggregationKind::composite
>>
>> Any ideas why that is?
>> Thanks
>>
>> Joel
Previous Topic:[Announce] GMF 2.1.0RC4 is available
Next Topic:EclipseCon 2007 GMF Best Practices
Goto Forum:
  


Current Time: Thu Apr 25 11:46:41 GMT 2024

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

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

Back to the top