}
}
}
}
} 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);
}
}