Package com.google.dart.engine.context

Examples of com.google.dart.engine.context.ChangeSet


    if (analysisContext == null) {
      analysisContext = new SdkAnalysisContext();
      SourceFactory factory = new SourceFactory(new DartUriResolver(this));
      analysisContext.setSourceFactory(factory);
      String[] uris = getUris();
      ChangeSet changeSet = new ChangeSet();
      for (String uri : uris) {
        changeSet.addedSource(factory.forUri(uri));
      }
      analysisContext.applyChanges(changeSet);
    }
    return analysisContext;
  }
View Full Code Here


    cache.put(source, info);
  }

  @Override
  public void applyAnalysisDelta(AnalysisDelta delta) {
    ChangeSet changeSet = new ChangeSet();
    for (Entry<Source, AnalysisLevel> entry : delta.getAnalysisLevels().entrySet()) {
      Source source = entry.getKey();
      if (entry.getValue() == AnalysisLevel.NONE) {
        changeSet.removedSource(source);
      } else {
        changeSet.addedSource(source);
      }
    }
    applyChanges(changeSet);
  }
View Full Code Here

    }
    return ourDirectoryBasedDartSdk;
  }

  private void applyChangeSet(final AnalysisContext context, final VirtualFile annotatedFile) {
    final ChangeSet changeSet = new ChangeSet();

    final DartFileBasedSource source = myFileToSourceMap.get(annotatedFile);
    if (source != null) {
      handleDeletedAndOutOfDateSources(changeSet, source);
    }

    handleDeletedAndOutOfDateSources(changeSet, context.getLibrarySources());
    handleDeletedAndOutOfDateSources(changeSet, context.getHtmlSources());

    synchronized (myCreatedFiles) {
      for (VirtualFile file : myCreatedFiles) {
        changeSet.addedSource(DartFileBasedSource.getSource(myProject, file));
      }
    }

    context.applyChanges(changeSet);
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.context.ChangeSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.