Package com.google.dart.engine.sdk

Examples of com.google.dart.engine.sdk.DartSdk


   */
  protected AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
    if (factory == null) {
      return new AnalysisCache(new CachePartition[] {privatePartition});
    }
    DartSdk sdk = factory.getDartSdk();
    if (sdk == null) {
      return new AnalysisCache(new CachePartition[] {privatePartition});
    }
    return new AnalysisCache(new CachePartition[] {
        AnalysisEngine.getInstance().getPartitionManager().forSdk(sdk), privatePartition});
View Full Code Here


  @Override
  protected AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
    if (factory == null) {
      return super.createCacheFromSourceFactory(factory);
    }
    DartSdk sdk = factory.getDartSdk();
    if (sdk == null) {
      throw new IllegalArgumentException(
          "The source factory for an SDK analysis context must have a DartUriResolver");
    }
    return new AnalysisCache(
View Full Code Here

  private boolean checkForExportInternalLibrary(ExportDirective node, ExportElement exportElement) {
    if (isInSystemLibrary) {
      return false;
    }
    // should be private
    DartSdk sdk = currentLibrary.getContext().getSourceFactory().getDartSdk();
    String uri = exportElement.getUri();
    SdkLibrary sdkLibrary = sdk.getSdkLibrary(uri);
    if (sdkLibrary == null) {
      return false;
    }
    if (!sdkLibrary.isInternal()) {
      return false;
View Full Code Here

  private boolean checkForImportInternalLibrary(ImportDirective node, ImportElement importElement) {
    if (isInSystemLibrary) {
      return false;
    }
    // should be private
    DartSdk sdk = currentLibrary.getContext().getSourceFactory().getDartSdk();
    String uri = importElement.getUri();
    SdkLibrary sdkLibrary = sdk.getSdkLibrary(uri);
    if (sdkLibrary == null) {
      return false;
    }
    if (!sdkLibrary.isInternal()) {
      return false;
View Full Code Here

  @DartBlockBody({"throw new AnalysisException(\"Could not resolve dart:core\");"})
  public static void missingCoreLibrary(AnalysisContext analysisContext, Source coreLibrarySource)
      throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("ErrorNoCoreLibrary");
    try {
      DartSdk sdk = analysisContext.getSourceFactory().getDartSdk();
      if (sdk == null) {
        instrumentation.data("sdkPath", "--null--");
      } else if (sdk instanceof DirectoryBasedDartSdk) {
        File directory = ((DirectoryBasedDartSdk) sdk).getDirectory();
        if (directory == null) {
View Full Code Here

TOP

Related Classes of com.google.dart.engine.sdk.DartSdk

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.