mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[490871] Reverted previous change and applied a more local fix
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
172da110b6
commit
40188da996
3 changed files with 11 additions and 1 deletions
|
@ -101,7 +101,6 @@ import org.eclipse.xtext.xtext.generator.ui.projectWizard.SimpleProjectWizardFra
|
|||
SimpleProjectWizardFragment2 newProjectWizardForEclipse = new SimpleProjectWizardFragment2
|
||||
|
||||
new() {
|
||||
addReferencedResource("platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel")
|
||||
try {
|
||||
class.classLoader.loadClass("org.eclipse.xtext.xbase.XbaseRuntimeModule")
|
||||
addReferencedResource("platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel")
|
||||
|
|
|
@ -138,6 +138,8 @@ class TypeReference {
|
|||
private static def getQualifiedName(EClass clazz, ResourceSet resourceSet) {
|
||||
if (clazz.EPackage.nsURI == 'http://www.eclipse.org/2008/Xtext')
|
||||
'org.eclipse.xtext.' + clazz.name
|
||||
else if (clazz.EPackage.nsURI == 'http://www.eclipse.org/emf/2002/Ecore')
|
||||
'org.eclipse.emf.ecore.' + clazz.name
|
||||
else
|
||||
GenModelUtil2.getGenClass(clazz, resourceSet).qualifiedInterfaceName
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.generator
|
||||
|
||||
import org.eclipse.emf.ecore.EcorePackage
|
||||
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
|
||||
import org.eclipse.xtext.xtext.generator.model.TypeReference
|
||||
import org.junit.Test
|
||||
|
||||
|
@ -100,4 +102,11 @@ class TypeReferenceTest {
|
|||
val ref = "org.example.MyType".typeRef
|
||||
assertEquals("org/example/MyType.xtend", ref.xtendPath)
|
||||
}
|
||||
|
||||
@Test
|
||||
def void testEObject() {
|
||||
val rs = new ResourceSetImpl
|
||||
val ref = new TypeReference(EcorePackage.Literals.EOBJECT, rs)
|
||||
assertEquals("org.eclipse.emf.ecore.EObject", ref.name)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue