Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » [UMLX] Problem lookingup ambiguous classifiers qualified with its EPackage name
[UMLX] Problem lookingup ambiguous classifiers qualified with its EPackage name [message #608065] Mon, 08 October 2007 14:02
Eclipse UserFriend
Originally posted by:

Hi Ed,

Taking a look to your implementation of classifier 's lookup, i have
detected some problems.

QVTEnvironment has a method which detects the ambiguity in the classifier
lookup, is tryLookupMetaModelClassifier, which delegates the search to the
method lookupMetaModelClassifiers. The problem is that this method only find
unqualified classifiers, or classifiers qualified by a metaModel ID, but It
does not take into account that a classifier could be qualified by package

The problem is partly solved because try lookupMetaModelClassifier would
fail, and a classifier would be found in a normal
EcoreEnvironment.lookupClassifier. But ambiguous classifiers qualified by
its package name would not be detected. For example:







If we lookup comonPackageName::AClassifier we have an undetected ambiguity
of classifier's names.

Besides, when qualifying with a metaModel ID which represents a set of
packages, you could not find a nested package name, since the
QVTEnvironment.getPackagedClassifier implementation is not as complete as
EcoreEnvironment.lookupClassifier implementation is. Instead of having a map
<metaModelID, EPackages> (in QVTrTopLevelEnvironment or
QVTrTransformationEnvironment) and functions (lookupMetamodelClassifier,
getMetaModelContents, etc) to manage them, I encourage you to use
environments (QVTrTransformationEnvironments nest QVTrMetaModelEnvironments
which nest a set of QVTEnvironment which have a package context associated)
and exploit the use of EcoreEnvironment.lookupClassifier.

I have implemented a hierarchical set of environments for my QVTo
implementation, that perhaps it could be applied at a QVTEnvironment and
QVTrEnvironment abstraction level and shared for all QVTo, QVTr, QVTc
implementation to have a better classifier's lookup.


Previous Topic:[TCS - Transformations Outside Eclipse ]
Next Topic:[TCS] "Unable to determine generatted class" error
Goto Forum:

Current Time: Wed Jun 20 21:26:53 GMT 2018

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

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

Back to the top