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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1787623005: Add more debugging code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | pkg/analyzer/lib/src/task/dart.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 34f0db9b983a6780972254b06ba90b80e0d8d13a..15e75ebe6d220b0c1a1677a51e3a5804715ed151 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1987,6 +1987,27 @@ abstract class ElementImpl implements Element {
}
/**
+ * Append to the given [buffer] a comma-separated list of the names of the
+ * types of this element and every enclosing element.
+ */
+ void appendPathTo(StringBuffer buffer) {
+ Element element = this;
+ while (element != null) {
+ if (element != this) {
+ buffer.write(', ');
+ }
+ buffer.write(element.runtimeType);
+ String name = element.name;
+ if (name != null) {
+ buffer.write(' (');
+ buffer.write(name);
+ buffer.write(')');
+ }
+ element = element.enclosingElement;
+ }
+ }
+
+ /**
* Append a textual representation of this element to the given [buffer].
*/
void appendTo(StringBuffer buffer) {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | pkg/analyzer/lib/src/task/dart.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698