Closed eclipse-ocl-bot closed 2 hours ago
By Ed Willink on Aug 05, 2010 13:14
Created attachment 175964 Eliminate qualification blindness
Problem was that the super type was only examined if unqualified, patch uses the polymorphism to accommodate qualified and unqualified types.
Add the following to LoadTests to activate the test
public void testLoad_Bug321903_oclinecore() throws IOException, InterruptedException {
doLoad("Bug321903", "oclinecore");
}
:notepad_spiral: Bug321903.patch
By Ed Willink on Aug 05, 2010 13:14
A candidate for 3.0.1.
By Ed Willink on Aug 05, 2010 13:22
Getting carried away; not RESOLVED, till committed to CVS.
By Ed Willink on Aug 17, 2010 05:11
Committed to HEAD for 3.1.0M2 and to R3_0_maintenance for 3.0.1RC2.
By Ed Willink on May 29, 2012 13:23
Closing all bugs resolved in Indigo.
| --- | --- | | Bugzilla Link | 321903 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Aug 05, 2010 13:04 EDT | | Modified | May 29, 2012 13:23 EDT | | Version | 3.0.0 | | Reporter | Ed Willink |
Description
The following comes from Fabian Brosig's mdt-ocl newsgroup message: [OCLinEcore] Resolving attributes in OCL Constraints.
-----WORKING EXAMPLE----------------------------------------------------------------------\ -- This is the working example.\ ------------------------------------------------------------------------------------------\ import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';
package tutorial : tut = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial'\ {\ class NamedElement\ {\ attribute name : String;\ }\ class Parameter extends NamedElement\ {\ property 'signature'#parameters : Signature[1];\ }\ class Signature {\ invariant parameterMustHaveUniqueNames: self.parameters->isUnique(p:Parameter | p.name); property parameters#'signature' : Parameter[0..*] { composes };\ }\ }
-----NOT WORKING----------------------------------------------------------------------\ -- This does not work. The reference p.name in the OCL constraint cannot be resolved. -- For 'name', the OCLinEcore Editor shows the following error: -- "Couldn't resolve reference to NamedElementCS 'name'".\ ------------------------------------------------------------------------------------------\ import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';
package tutorial : tut = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial'\ {\ package core : cre = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial/core' {\ class NamedElement\ {\ attribute name : String;\ } \ }\ class Parameter extends core::NamedElement\ {\ property 'signature'#parameters : Signature[1];\ }\ class Signature {\ invariant parameterMustHaveUniqueNames: self.parameters->isUnique(p:Parameter | p.name); property parameters#'signature' : Parameter[0..*] { composes };\ }\ }