@Override public LibraryElement getLibraryElementOrNull(IFile file) { ResourceMap map = getResourceMap(file); Source source = map.getSource(file); if (source != null) { return map.getContext().getLibraryElement(source); } return null; }
@Override public SourceKind getSourceKind(IFile file) { ResourceMap map = getResourceMap(file); Source source = map.getSource(file); if (source != null) { return map.getContext().getKindOf(source); } return null; }
@Override public LibraryElement getLibraryElement(IFile file) { ResourceMap map = getResourceMap(file); Source source = map.getSource(file); if (source != null) { try { return map.getContext().computeLibraryElement(source); } catch (AnalysisException e) { DartCore.logError("Failed to compute library element: " + file, e); } } return null; }