OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
12 * the License. | 12 * the License. |
13 */ | 13 */ |
14 package com.google.dart.engine.internal.task; | 14 package com.google.dart.engine.internal.task; |
15 | 15 |
16 import com.google.dart.engine.context.AnalysisException; | 16 import com.google.dart.engine.context.AnalysisException; |
17 import com.google.dart.engine.element.HtmlElement; | 17 import com.google.dart.engine.element.HtmlElement; |
18 import com.google.dart.engine.error.AnalysisError; | 18 import com.google.dart.engine.error.AnalysisError; |
19 import com.google.dart.engine.html.ast.HtmlUnit; | 19 import com.google.dart.engine.html.ast.HtmlUnit; |
20 import com.google.dart.engine.internal.builder.HtmlUnitBuilder; | 20 import com.google.dart.engine.internal.builder.HtmlUnitBuilder; |
21 import com.google.dart.engine.internal.context.InternalAnalysisContext; | 21 import com.google.dart.engine.internal.context.InternalAnalysisContext; |
22 import com.google.dart.engine.internal.context.ResolvableHtmlUnit; | 22 import com.google.dart.engine.internal.context.ResolvableHtmlUnit; |
23 import com.google.dart.engine.internal.html.angular.AngularHtmlUnitResolver; | |
24 import com.google.dart.engine.source.Source; | 23 import com.google.dart.engine.source.Source; |
25 | 24 |
26 /** | 25 /** |
27 * Instances of the class {@code ResolveHtmlTask} resolve a specific source as a
n HTML file. | 26 * Instances of the class {@code ResolveHtmlTask} resolve a specific source as a
n HTML file. |
28 */ | 27 */ |
29 public class ResolveHtmlTask extends AnalysisTask { | 28 public class ResolveHtmlTask extends AnalysisTask { |
30 /** | 29 /** |
31 * The source to be resolved. | 30 * The source to be resolved. |
32 */ | 31 */ |
33 private Source source; | 32 private Source source; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 HtmlUnit unit = resolvableHtmlUnit.getCompilationUnit(); | 103 HtmlUnit unit = resolvableHtmlUnit.getCompilationUnit(); |
105 if (unit == null) { | 104 if (unit == null) { |
106 throw new AnalysisException( | 105 throw new AnalysisException( |
107 "Internal error: computeResolvableHtmlUnit returned a value without a
parsed HTML unit"); | 106 "Internal error: computeResolvableHtmlUnit returned a value without a
parsed HTML unit"); |
108 } | 107 } |
109 modificationTime = resolvableHtmlUnit.getModificationTime(); | 108 modificationTime = resolvableHtmlUnit.getModificationTime(); |
110 // build standard HTML element | 109 // build standard HTML element |
111 HtmlUnitBuilder builder = new HtmlUnitBuilder(getContext()); | 110 HtmlUnitBuilder builder = new HtmlUnitBuilder(getContext()); |
112 element = builder.buildHtmlElement(source, modificationTime, unit); | 111 element = builder.buildHtmlElement(source, modificationTime, unit); |
113 // resolve toolkit-specific features | 112 // resolve toolkit-specific features |
114 new AngularHtmlUnitResolver(getContext(), builder.getErrorListener(), source
).resolve(unit); | 113 // new AngularHtmlUnitResolver(getContext(), builder.getErrorListener(), sour
ce).resolve(unit); |
115 // record all resolution errors | 114 // record all resolution errors |
116 resolutionErrors = builder.getErrorListener().getErrors(source); | 115 resolutionErrors = builder.getErrorListener().getErrors(source); |
117 } | 116 } |
118 } | 117 } |
OLD | NEW |