Examples of HtmlEntry


Examples of com.google.dart.engine.internal.cache.HtmlEntry

            DartEntryImpl dartCopy = dartEntry.getWritableCopy();
            dartCopy.invalidateAllResolutionInformation(false);
            cache.put(source, dartCopy);
            workManager.add(source, computePriority(dartCopy));
          } else if (entry instanceof HtmlEntry) {
            HtmlEntry htmlEntry = (HtmlEntry) entry;
            HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
            htmlCopy.invalidateAllResolutionInformation(false);
            cache.put(source, htmlCopy);
            workManager.add(source, SourcePriority.HTML);
          }
        }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

      if (errors.isEmpty()) {
        return AnalysisError.NO_ERRORS;
      }
      return errors.toArray(new AnalysisError[errors.size()]);
    } else if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
      try {
        return getHtmlResolutionData(source, htmlEntry, HtmlEntry.RESOLUTION_ERRORS);
      } catch (ObsoleteSourceAnalysisException exception) {
        AnalysisEngine.getInstance().getLogger().logInformation(
            "Could not compute errors",
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

  @Override
  public AngularApplication getAngularApplicationWithHtml(Source htmlSource) {
    SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource);
    if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
      AngularApplication application = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
      if (application != null) {
        return application;
      }
      return htmlEntry.getValue(HtmlEntry.ANGULAR_ENTRY);
    }
    return null;
  }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

      DartEntry dartEntry = (DartEntry) sourceEntry;
      return new AnalysisErrorInfoImpl(
          dartEntry.getAllErrors(),
          dartEntry.getValue(SourceEntry.LINE_INFO));
    } else if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
      return new AnalysisErrorInfoImpl(
          htmlEntry.getAllErrors(),
          htmlEntry.getValue(SourceEntry.LINE_INFO));
    }
    return new AnalysisErrorInfoImpl(AnalysisError.NO_ERRORS, null);
  }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

  @Override
  public Source[] getLibrariesReferencedFromHtml(Source htmlSource) {
    SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource);
    if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
      return htmlEntry.getValue(HtmlEntry.REFERENCED_LIBRARIES);
    }
    return Source.EMPTY_ARRAY;
  }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

  @Override
  public HtmlUnit getResolvedHtmlUnit(Source htmlSource) {
    SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource);
    if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
      return htmlEntry.getValue(HtmlEntry.RESOLVED_UNIT);
    }
    return null;
  }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

                statistics.putCacheItemInLibrary(dartEntry, librarySource, DartEntry.HINTS);
              }
            }
          }
        } else if (sourceEntry instanceof HtmlEntry) {
          HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;
          statistics.putCacheItem(htmlEntry, SourceEntry.LINE_INFO);
          statistics.putCacheItem(htmlEntry, HtmlEntry.PARSE_ERRORS);
          statistics.putCacheItem(htmlEntry, HtmlEntry.PARSED_UNIT);
          statistics.putCacheItem(htmlEntry, HtmlEntry.RESOLUTION_ERRORS);
          statistics.putCacheItem(htmlEntry, HtmlEntry.RESOLVED_UNIT);
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

   * @throws AnalysisException if data could not be returned because the source could not be parsed
   */
  @SuppressWarnings("unchecked")
  private <E> E getHtmlParseData(Source source, DataDescriptor<E> descriptor, E defaultValue)
      throws AnalysisException {
    HtmlEntry htmlEntry = getReadableHtmlEntry(source);
    if (htmlEntry == null) {
      return defaultValue;
    }
    htmlEntry = cacheHtmlParseData(source, htmlEntry, descriptor);
    if (descriptor == HtmlEntry.PARSED_UNIT) {
      accessedAst(source);
      return (E) htmlEntry.getAnyParsedUnit();
    }
    return htmlEntry.getValue(descriptor);
  }
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

   * @throws AnalysisException if data could not be returned because the source could not be
   *           resolved
   */
  private <E> E getHtmlResolutionData(Source source, DataDescriptor<E> descriptor, E defaultValue)
      throws AnalysisException {
    HtmlEntry htmlEntry = getReadableHtmlEntry(source);
    if (htmlEntry == null) {
      return defaultValue;
    }
    try {
      return getHtmlResolutionData(source, htmlEntry, descriptor);
View Full Code Here

Examples of com.google.dart.engine.internal.cache.HtmlEntry

            }
          }
        }
      }
    } else if (sourceEntry instanceof HtmlEntry) {
      HtmlEntry htmlEntry = (HtmlEntry) sourceEntry;

      CacheState parseErrorsState = htmlEntry.getState(HtmlEntry.PARSE_ERRORS);
      if (parseErrorsState == CacheState.INVALID
          || (isPriority && parseErrorsState == CacheState.FLUSHED)) {
        return createParseHtmlTask(source, htmlEntry);
      }
      if (isPriority && parseErrorsState != CacheState.ERROR) {
        HtmlUnit parsedUnit = htmlEntry.getAnyParsedUnit();
        if (parsedUnit == null) {
          return createParseHtmlTask(source, htmlEntry);
        }
      }

      CacheState resolvedUnitState = htmlEntry.getState(HtmlEntry.RESOLVED_UNIT);
      if (resolvedUnitState == CacheState.INVALID
          || (isPriority && resolvedUnitState == CacheState.FLUSHED)) {
        return createResolveHtmlTask(source, htmlEntry);
      }
      //
      // Angular support
      //
      if (options.getAnalyzeAngular()) {
        // Try to resolve the HTML as an Angular entry point.
        CacheState angularEntryState = htmlEntry.getState(HtmlEntry.ANGULAR_ENTRY);
        if (angularEntryState == CacheState.INVALID
            || (isPriority && angularEntryState == CacheState.FLUSHED)) {
          return createResolveAngularEntryHtmlTask(source, htmlEntry);
        }
        // Try to resolve the HTML as an Angular application part.
        CacheState angularErrorsState = htmlEntry.getState(HtmlEntry.ANGULAR_ERRORS);
        if (angularErrorsState == CacheState.INVALID
            || (isPriority && angularErrorsState == CacheState.FLUSHED)) {
          return createResolveAngularComponentTemplateTask(source, htmlEntry);
        }
      }
      //
      // Polymer support
      //
      if (options.getAnalyzePolymer()) {
        // Build elements.
        CacheState polymerBuildErrorsState = htmlEntry.getState(HtmlEntry.POLYMER_BUILD_ERRORS);
        if (polymerBuildErrorsState == CacheState.INVALID
            || (isPriority && polymerBuildErrorsState == CacheState.FLUSHED)) {
          return createPolymerBuildHtmlTask(source, htmlEntry);
        }
        // Resolve references.
        CacheState polymerResolutionErrorsState = htmlEntry.getState(HtmlEntry.POLYMER_RESOLUTION_ERRORS);
        if (polymerResolutionErrorsState == CacheState.INVALID
            || (isPriority && polymerResolutionErrorsState == CacheState.FLUSHED)) {
          return createPolymerResolveHtmlTask(source, htmlEntry);
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.