Community
Participate
Working Groups
see http://www.eclipse.org/forums/index.php?t=msg&goto=517859& Sebastian Zarnekow wrotes: Using nsURIs in your grammar and classpath uris in your workflow file should work fine - at least it does for me. Grammar:---------------------------- ... import "http://www.eclipse.org/xtext/common/JavaVMTypes" as javatypes Foo: 'as' qualifiedClass=[javatypes::JvmDeclaredType|QID]; Workflow:--------------------------- ... fragment = types.TypesGeneratorFragment{} fragment = ecore.EcoreGeneratorFragment { referencedGenModels="classpath:/model/JavaVMTypes.genmodel"} ------------------------------------ The classpath-uri doesnt work at all, because the classpath-uri also appears in the generated ecore-file. When using a plattform uri instead ("platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel") it works when org.eclipse.xtext.common.types project is in the workspace. This is because something like <eStructuralFeatures xsi:type="ecore:EReference" name="qualifiedClass" eType="ecore:EClass ../../../../../../../org.eclipse.xtext.common.types/model/JavaVMTypes.ecore#//JvmDeclaredType"/> is generated in the ecore-file. When using the platform-uri within e.g. buckminster this workaround doesn't work any more because the org.eclipse.xtext.common.types-project is not available as source-project. This is also appearing in xtext 1.0.0 m7. reproducable: always workaround: none
If you actually have to be able to open the ecore and genmodel file in the editor you have to define a mapping, so there is actually a solution. See here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=305424
*** This bug has been marked as a duplicate of bug 305424 ***
okay, thanks. i havn't seen the other ticket on the fly.