Exemplo n.º 1
0
 @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;
 }
Exemplo n.º 2
0
 @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;
 }
Exemplo n.º 3
0
 @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;
 }