Community
Participate
Working Groups
The use of a naming convention for importURI may have seemed like a good idea but unfortunately it fails to provide complete functionality and inhibits editor assistance. I migrated from, 'importedNamespace' to 'importedURI'. Oops wrong spelling; no help. Once I find the mistake and correct global bindings, it loads but it does not work as a reference. If import URI was signalled by a URI type for the reference 'identifier' rather than a special spelling of the target feature as in: terminal NON_FRAGMENT_URI returns ecoreUtils::URI : ...; terminal FRAGMENT_URI returns ecoreUtils::URI : ...; importURIatRoot=[MyResource|NON_FRAGMENT_URI] importURIofFragment=[MyElement|FRAGMENT_URI] the meta-model would have a resolved reference, importURI would not be a special spelling, and the generator could provide plausible default bindings.
There is a possibility to customize the convention for each dsl in the corresponding RuntimeModule to e.g. "namespace". @Override public void configure(Binder binder) { super.configure(binder); binder.bindConstant().annotatedWith(Names.named(ImportUriResolver.IMPORT_URI_FEATURE)).to("namespace"); } Of course it does not solve the problem that the Grammar / Metamodel has to follow conventions but you can introduce your own one.