Skip to main content



      Home
Home » Modeling » UML2 » UML2 vs EMF generated code difference
UML2 vs EMF generated code difference [message #626423] Thu, 17 April 2008 15:19
Eclipse UserFriend
Hi,
I recently converted a meta model specified in EMF into a UML meta
model. When regenerating the code from the UML-ized model I noticed
changes in generated code for 'eInverseRemove' methods, and in some
cases they were completely absent.

After some investigation it turned out that UML code generator did not
generate case statements for derived features. Eventually I traced it
down to differences in GenFeatureFilter-s applied to
GenClassImpl.getEInverseRemoveGenFeatures method.

In EMF the filter's accept method looks like this:
public boolean accept(GenFeature genFeature)
{
return genFeature.isEffectiveContains() ||
(genFeature.isBidirectional() &&
(!genFeature.getReverse().isVolatile() ||
genFeature.getReverse().hasDelegateFeature())) ||
genFeature.isFeatureMapType();
}

while in UML2 it looks like this:
public boolean accept(GenFeature genFeature) {
return !genFeature.isDerived();
}

Why the different treatment of derived features in EMF and UML? Why is
it unacceptable to 'inverse remove' a derived feature in UML?

Thanks,
Vmir
Previous Topic:Resolving Elements in a different Resource
Next Topic:Resolving Elements in a different Resource
Goto Forum:
  


Current Time: Sun Aug 31 03:31:38 EDT 2025

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

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

Back to the top