mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[grammar][serializer] Use the EString from the resource set
This commit is contained in:
parent
c2dd4765a6
commit
6ffb896586
2 changed files with 2 additions and 3 deletions
|
@ -10,7 +10,6 @@ package org.eclipse.xtext.xtext;
|
|||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EStructuralFeature;
|
||||
import org.eclipse.emf.ecore.EcorePackage;
|
||||
import org.eclipse.xtext.AbstractMetamodelDeclaration;
|
||||
import org.eclipse.xtext.AbstractRule;
|
||||
import org.eclipse.xtext.CrossReference;
|
||||
|
@ -54,7 +53,7 @@ public class XtextTransientValueService extends DefaultTransientValueService {
|
|||
}
|
||||
} else if (rule instanceof TerminalRule) {
|
||||
final TypeRef returnType = rule.getType();
|
||||
return ((TerminalRule) rule).isFragment() || returnType == null || EcorePackage.eINSTANCE.getEString().equals(rule.getType().getClassifier());
|
||||
return ((TerminalRule) rule).isFragment() || returnType == null || GrammarUtil.findEString(GrammarUtil.getGrammar(owner)).equals(rule.getType().getClassifier());
|
||||
}
|
||||
}
|
||||
else if (feature == XtextPackage.eINSTANCE.getCrossReference_Terminal()) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class XtextTransientValueService2 extends TransientValueService {
|
|||
return YES;
|
||||
}
|
||||
}
|
||||
if (EcorePackage.eINSTANCE.getEString().equals(rule.getType().getClassifier()))
|
||||
if (GrammarUtil.findEString(GrammarUtil.getGrammar(owner)).equals(rule.getType().getClassifier()))
|
||||
return PREFERABLY;
|
||||
return NO;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue