Closed eclipse-ocl-bot closed 1 month ago
By Christian Damus on Mar 13, 2006 17:57
Don't know why it was originally done this way, but it should be fixed. The lookupOperation() API needs to be customizable by implementors of the Environment interface just as the other lookups are. The current static method will remain the default implementation of a new polymorphic look-up.
By Christian Damus on Apr 05, 2006 15:15
Now all of the Environment lookup*() methods are polymorphic, as they should be. Some of the default EcoreEnvironment implementations are factored out into utility methods.
This also enabled an improvement to the operation signature matching algorithm, to better support generic type parameters (such as in the OCL Standard Library operations) and to fix some problem in type conformance checking in Collection operations.
By Ed Willink on Apr 18, 2006 02:23
These improvements are great. They enable me to get rid of some stupid workarounds, but the improvements are not consistent.
The problem is that ValidationVisitor accesses the operation validation methods in TypeUtil directly rather than via Environment.
So, I can parse QVT with its extra helper functions provided by the derived Environment.lookupOperation, but I then get a validation failure that I can only cure with a horrible workaround of inserting phantom operations in to the Ecore model so that the validation code finds them but the Ecore save code doesn't.
Please ensure that Environment acts as the polymorphic interface for all non-trivial TypeUtil methods.
(It's not even possible to derive a fixed validation.)
The ValidationVisitor constructor must have an Environment parameter, so caching a 'singleton' must be done by user code (or by Environment.getValidationVisitor()).
By Christian Damus on Apr 18, 2006 09:19
Hi, Ed,
You have anticipated an observation already identified as bug 136778, that the validation visitor requires the Environment in order to be correct.
I shall ensure that your additional points about the direct access to TypeUtil are accounted for in that work.
This bug has been marked as a duplicate of 136778
By Ed Willink on May 27, 2011 02:46
Closing after over 18 months in resolved state.
| --- | --- | | Bugzilla Link | 125627 | | Status | CLOSED DUPLICATE of bug 136778 | | Importance | P3 normal | | Reported | Jan 28, 2006 12:20 EDT | | Modified | May 27, 2011 02:46 EDT | | Version | 1.0.0 | | Reporter | Ed Willink |
Description
Why is EcoreEnvironment.lookupOperation when e.g. lookupAttribute is dynamic via Environment?