Package com.google.dart.engine.internal.cache

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


            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


  private TaskData createParseHtmlTask(Source source, HtmlEntry htmlEntry) {
    if (htmlEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) {
      return createGetContentTask(source, htmlEntry);
    }
    CharSequence content = htmlEntry.getValue(SourceEntry.CONTENT);
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(SourceEntry.CONTENT, CacheState.FLUSHED);
    htmlCopy.setState(HtmlEntry.PARSE_ERRORS, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(
        new ParseHtmlTask(this, source, htmlCopy.getModificationTime(), content),
        false);
  }
View Full Code Here

   */
  private TaskData createPolymerBuildHtmlTask(Source source, HtmlEntry htmlEntry) {
    if (htmlEntry.getState(HtmlEntry.RESOLVED_UNIT) != CacheState.VALID) {
      return createResolveHtmlTask(source, htmlEntry);
    }
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(HtmlEntry.POLYMER_BUILD_ERRORS, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(new PolymerBuildHtmlTask(
        this,
        source,
        htmlCopy.getModificationTime(),
        htmlEntry.getValue(SourceEntry.LINE_INFO),
        htmlCopy.getValue(HtmlEntry.RESOLVED_UNIT)), false);
  }
View Full Code Here

   */
  private TaskData createPolymerResolveHtmlTask(Source source, HtmlEntry htmlEntry) {
    if (htmlEntry.getState(HtmlEntry.RESOLVED_UNIT) != CacheState.VALID) {
      return createResolveHtmlTask(source, htmlEntry);
    }
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(HtmlEntry.POLYMER_RESOLUTION_ERRORS, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(new PolymerResolveHtmlTask(
        this,
        source,
        htmlCopy.getModificationTime(),
        htmlEntry.getValue(SourceEntry.LINE_INFO),
        htmlCopy.getValue(HtmlEntry.RESOLVED_UNIT)), false);
  }
View Full Code Here

    if (htmlEntry.getState(HtmlEntry.RESOLVED_UNIT) != CacheState.VALID) {
      return createResolveHtmlTask(source, htmlEntry);
    }
    AngularApplication application = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
    AngularComponentElement component = htmlEntry.getValue(HtmlEntry.ANGULAR_COMPONENT);
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(new ResolveAngularComponentTemplateTask(
        this,
        source,
        htmlCopy.getModificationTime(),
        htmlCopy.getValue(HtmlEntry.RESOLVED_UNIT),
        component,
        application), false);
  }
View Full Code Here

   */
  private TaskData createResolveAngularEntryHtmlTask(Source source, HtmlEntry htmlEntry) {
    if (htmlEntry.getState(HtmlEntry.RESOLVED_UNIT) != CacheState.VALID) {
      return createResolveHtmlTask(source, htmlEntry);
    }
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(HtmlEntry.ANGULAR_ENTRY, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(new ResolveAngularEntryHtmlTask(
        this,
        source,
        htmlCopy.getModificationTime(),
        htmlCopy.getValue(HtmlEntry.RESOLVED_UNIT)), false);
  }
View Full Code Here

   */
  private TaskData createResolveHtmlTask(Source source, HtmlEntry htmlEntry) {
    if (htmlEntry.getState(HtmlEntry.PARSED_UNIT) != CacheState.VALID) {
      return createParseHtmlTask(source, htmlEntry);
    }
    HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
    htmlCopy.setState(HtmlEntry.RESOLVED_UNIT, CacheState.IN_PROCESS);
    cache.put(source, htmlCopy);
    return new TaskData(new ResolveHtmlTask(
        this,
        source,
        htmlCopy.getModificationTime(),
        htmlCopy.getValue(HtmlEntry.PARSED_UNIT)), false);
  }
View Full Code Here

   * @return the source information object that was created
   */
  private SourceEntry createSourceEntry(Source source, boolean explicitlyAdded) {
    String name = source.getShortName();
    if (AnalysisEngine.isHtmlFileName(name)) {
      HtmlEntryImpl htmlEntry = new HtmlEntryImpl();
      htmlEntry.setModificationTime(getModificationStamp(source));
      htmlEntry.setExplicitlyAdded(explicitlyAdded);
      cache.put(source, htmlEntry);
      return htmlEntry;
    } else {
      DartEntryImpl dartEntry = new DartEntryImpl();
      dartEntry.setModificationTime(getModificationStamp(source));
View Full Code Here

    MapIterator<Source, SourceEntry> iterator = privatePartition.iterator();
    while (iterator.moveNext()) {
      Source source = iterator.getKey();
      SourceEntry sourceEntry = iterator.getValue();
      if (sourceEntry instanceof HtmlEntry) {
        HtmlEntryImpl htmlCopy = ((HtmlEntry) sourceEntry).getWritableCopy();
        htmlCopy.invalidateAllResolutionInformation(invalidateUris);
        iterator.setValue(htmlCopy);
        workManager.add(source, SourcePriority.HTML);
      } else if (sourceEntry instanceof DartEntry) {
        DartEntry dartEntry = (DartEntry) sourceEntry;
        oldPartMap.put(source, dartEntry.getValue(DartEntry.INCLUDED_PARTS));
View Full Code Here

      if (angularElement instanceof AngularHasTemplateElement) {
        AngularHasTemplateElement hasTemplate = (AngularHasTemplateElement) angularElement;
        Source templateSource = hasTemplate.getTemplateSource();
        if (templateSource != null) {
          HtmlEntry htmlEntry = getReadableHtmlEntry(templateSource);
          HtmlEntryImpl htmlCopy = htmlEntry.getWritableCopy();
          htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, null);
          htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, null);
          htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
          cache.put(templateSource, htmlCopy);
          workManager.add(templateSource, SourcePriority.HTML);
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.internal.cache.HtmlEntryImpl

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.