/** Returns navigation targets for the given context, may be empty, but not {@code null}. */
 public static com.google.dart.server.Element[] getNavigationTargets(String file, int offset) {
   NavigationRegion[] regions = DartCore.getAnalysisServerData().getNavigation(file);
   for (NavigationRegion navigationRegion : regions) {
     if (navigationRegion.containsInclusive(offset)) {
       return navigationRegion.getTargets();
     }
   }
   return com.google.dart.server.Element.EMPTY_ARRAY;
 }
Ejemplo n.º 2
0
 @Override
 public void dispose() {
   DartCore.getAnalysisServerData().removeNavigationListener(getFile(), this);
   super.dispose();
 }
Ejemplo n.º 3
0
 public InlineLocalAction_NEW(DartEditor editor) {
   super(editor);
   DartCore.getAnalysisServerData().addNavigationListener(getFile(), this);
 }