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

Unified Diff: dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/error/ErrorReporter.java

Issue 66253002: Version 0.8.10.9 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 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: dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/error/ErrorReporter.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/error/ErrorReporter.java (revision 30098)
+++ dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/error/ErrorReporter.java (working copy)
@@ -14,6 +14,7 @@
package com.google.dart.engine.internal.error;
import com.google.dart.engine.ast.ASTNode;
+import com.google.dart.engine.element.Element;
import com.google.dart.engine.error.AnalysisError;
import com.google.dart.engine.error.AnalysisErrorListener;
import com.google.dart.engine.error.AnalysisErrorWithProperties;
@@ -101,6 +102,17 @@
* Report an error with the given error code and arguments.
*
* @param errorCode the error code of the error to be reported
+ * @param element the element which name should be used as the location of the error
+ * @param arguments the arguments to the error, used to compose the error message
+ */
+ public void reportError(ErrorCode errorCode, Element element, Object... arguments) {
+ reportError(errorCode, element.getNameOffset(), element.getDisplayName().length(), arguments);
+ }
+
+ /**
+ * Report an error with the given error code and arguments.
+ *
+ * @param errorCode the error code of the error to be reported
* @param offset the offset of the location of the error
* @param length the length of the location of the error
* @param arguments the arguments to the error, used to compose the error message

Powered by Google App Engine
This is Rietveld 408576698