Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java

Issue 11348291: Analyze Dart scripts in HTML files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Analyze in builder thread Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java
index e98b6a80986d2ebf239a4a5f33f0ddea516cdd78..f5d7d1ea8fead8107bb8961a12fc472d2fe0b4f5 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/index/AnalysisMarkerManager.java
@@ -21,6 +21,7 @@ import com.google.dart.tools.core.analysis.AnalysisError;
import com.google.dart.tools.core.analysis.AnalysisEvent;
import com.google.dart.tools.core.analysis.AnalysisListener;
import com.google.dart.tools.core.analysis.AnalysisServer;
+import com.google.dart.tools.core.html.HtmlAnalyzeHelper;
import com.google.dart.tools.core.internal.util.ResourceUtil;
import org.eclipse.core.resources.IMarker;
@@ -58,6 +59,7 @@ class AnalysisMarkerManager implements AnalysisListener {
if (file == null || error == null) {
return;
}
+ file = HtmlAnalyzeHelper.getSourceHtmlFile(file);
IResource res = ResourceUtil.getResource(file);
if (res == null || !res.exists() || !DartCore.isAnalyzed(res)) {
return;
@@ -91,11 +93,11 @@ class AnalysisMarkerManager implements AnalysisListener {
try {
IMarker marker = res.createMarker(DartCore.DART_PROBLEM_MARKER_TYPE);
marker.setAttribute(IMarker.SEVERITY, severity);
- marker.setAttribute(IMarker.MESSAGE, errMsg);
marker.setAttribute(IMarker.CHAR_START, offset);
marker.setAttribute(IMarker.CHAR_END, offset + length);
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
marker.setAttribute("errorCode", errorCodeString);
+ marker.setAttribute(IMarker.MESSAGE, errMsg);
} catch (CoreException e) {
DartCore.logError("Failed to create marker for " + res + "\n at " + offset + " message: "
+ errMsg, e);

Powered by Google App Engine
This is Rietveld 408576698