[xtext] Fix: IOOBE for heavily broken Xtext grammars, e.g. with unclosed EPackage URIs

This commit is contained in:
Sebastian Zarnekow 2011-11-07 19:46:14 +01:00
parent c1b3cbf737
commit dc7a65287f

View file

@ -222,6 +222,8 @@ public class XtextLinkingService extends DefaultLinkingService {
return null;
if (uri.fragment() == null) {
Resource resource = resourceSet.getResource(uri, true);
if (resource.getContents().isEmpty())
return null;
EPackage result = (EPackage) resource.getContents().get(0);
return result;
}