eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[uml] Diagnose missing Package URI #1888

Closed eclipse-ocl-bot closed 2 hours ago

eclipse-ocl-bot commented 2 hours ago

| --- | --- | | Bugzilla Link | 522256 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Sep 13, 2017 13:38 EDT | | Modified | Sep 14, 2017 08:46 EDT | | See also | 459606, 522257 | | Reporter | Ed Willink |

Description

The lack of a UML Package URI is a very frequent problem for UML users. The effects are generally obscure since EMF synthesizes an incomatible one leaving Ecore/UML inconsistent.

Most recent problem was https://www.eclipse.org/forums/index.php?t=msg&th=1088820&goto=1772618&#msg_1772618 where the UML/Ecore EnumerationLiteralId spaces were incompatible.

a) can the EnumerationLiteralId be fixed up

b) add an automatic EPackage/Package URI validation to UML validation

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 14, 2017 04:09

b) add an automatic EPackage/Package URI validation to UML validation

See Bug 459606 and Bug 522257

a) can the EnumerationLiteralId be fixed up

It's only software...

I suspect that the real problem has been a misguided attempt to ignore the profuse nsURIs and use name hierarchy as a legacy fixup. The nsURIs may be profuse but they are very useable. If we put all the nsURIs in the URI2CompletePackage map the fragile name hierarchy fixup(s) may be redundant.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 14, 2017 08:46

a) can the EnumerationLiteralId be fixed up

Most definitely. A problem was that IdManager.getEnumeration/LiteralId was called and then failed to resolve the UML-specific getPackageId. Deprecating the IdManager methods and instead locating the Package and related Ids in the AbstractIdResolver allows the UMLIdResolver to handle the UMLisms.

Pushed to master for M2.

b) add an automatic EPackage/Package URI validation to UML validation

Shouldn't be necessary; it's always been an OCL bug so far. UML might add an INFO.