mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[xtext][ui] Fix: LinkingErrorFixes have to use the value converter service
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=361509
This commit is contained in:
parent
675b31c24a
commit
3ee879ab6d
1 changed files with 4 additions and 5 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EDataType;
|
|||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.EReference;
|
||||
import org.eclipse.emf.ecore.EStructuralFeature;
|
||||
import org.eclipse.emf.ecore.EcorePackage;
|
||||
import org.eclipse.xtext.nodemodel.BidiIterator;
|
||||
import org.eclipse.xtext.nodemodel.ICompositeNode;
|
||||
|
@ -412,12 +413,10 @@ public class GrammarUtil {
|
|||
|
||||
// TODO replace me by compiled grammar model
|
||||
public static EReference getReference(CrossReference ref, EClass referenceOwner) {
|
||||
final List<EReference> references = referenceOwner.getEAllReferences();
|
||||
final String feature = GrammarUtil.containingAssignment(ref).getFeature();
|
||||
for (EReference reference : references) {
|
||||
if (!reference.isContainment() && reference.getName().equals(feature))
|
||||
return reference;
|
||||
}
|
||||
EStructuralFeature result = referenceOwner.getEStructuralFeature(feature);
|
||||
if (result instanceof EReference && !((EReference) result).isContainment())
|
||||
return (EReference) result;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue