Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312377

Summary: classpath-URLs in generated ecore file
Product: [Modeling] TMF Reporter: Eckle <xx.eckle>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: M7   
Hardware: All   
OS: All   
Whiteboard:

Description Eckle CLA 2010-05-11 04:07:52 EDT
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
Comment 1 Sebastian Zarnekow CLA 2010-05-11 04:11:30 EDT
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
Comment 2 Sebastian Zarnekow CLA 2010-05-11 04:11:49 EDT

*** This bug has been marked as a duplicate of bug 305424 ***
Comment 3 Eckle CLA 2010-05-11 04:25:39 EDT
okay, thanks. i havn't seen the other ticket on the fly.