eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[ecore] Import EAnnotation should be fully resolved #1742

Closed eclipse-ocl-bot closed 2 hours ago

eclipse-ocl-bot commented 2 hours ago

| --- | --- | | Bugzilla Link | 502352 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Sep 28, 2016 01:39 EDT | | Modified | Sep 28, 2016 13:54 EDT | | Reporter | Ed Willink |

Description

The Import EAnnotation supports the use of package alias names within embedded OCL expressions. Following normal import policy the imported name is resolved with respect to the importing resource.

However when the importing resource is Java generated its name is http:/... and unsuitable for resolving import locations. Ecore2AS and QVTd's EcoreURIAdapter endeavour to provide an nsURI to original Ecore file name to remedy the missing information. When these fail or are just not configured a nested import failure occurs that is not properly logged in the importing Resource.errors and is completely ignored by each invoking ES2AS.

If the importing generated resource use the CG, the imports are all resolved by the CG so the Import EAnnotation could/should be stripped by the CG, or could/should be ignored by the ES2AS.

If the imported generated resource uses delegates, the Import EAnnotation is required and ideally would be resolved to a platform:/... reference by the generator, but the generator is the standard EMF generator.

?? the reference in the Import EAnnotation should always be fully qualified ??

The OCLInEcore CS2AS can convert to fully qualified and AS2CS deresolve for readability.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 28, 2016 01:48

(In reply to Ed Willink from comment #0)

When these fail or are just not configured a nested import failure occurs that is not properly logged in the importing Resource.errors and is completely ignored by each invoking ES2AS.

See Bug 467690#c1

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 28, 2016 13:54

(In reply to Ed Willink from comment #0)

If the importing generated resource use the CG, the imports are all resolved by the CG so the Import EAnnotation could/should be stripped by the CG, or could/should be ignored by the ES2AS.

Stripping the Import EAnnotation is really easy.

35a4554b0a590e25acf0c447bb2f8c97870a5ce5 pushed to master for M3.

Delegate and OCLinEcore usage unaffected.


Residual issues in Bug 502475.