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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java

Issue 12340077: Initial binding of RenameRefactoring service to Eclipse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java
index 740d3818103d28d6e3f99a75cad107f7dde8ed0b..95fa8439eaaf59165ad4c1a0b725e27386d8ce37 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ActionInstrumentationUtilities.java
@@ -1,6 +1,7 @@
package com.google.dart.tools.ui.actions;
import com.google.dart.compiler.ast.DartNode;
+import com.google.dart.engine.element.Element;
import com.google.dart.engine.utilities.instrumentation.InstrumentationBuilder;
import com.google.dart.tools.core.model.CompilationUnit;
import com.google.dart.tools.core.model.DartElement;
@@ -120,6 +121,19 @@ public class ActionInstrumentationUtilities {
}
+ public static void recordElement(Element element, InstrumentationBuilder instrumentation) {
+
+ if (element == null) {
+ instrumentation.metric("Element", "null");
+ return;
+ }
+
+ instrumentation.metric("Element-Class", element.getClass().toString());
+
+ instrumentation.data("Element-Name", element.getName());
+
+ }
+
/**
* Appropriately record the information in an exception Use this method for exceptions that aren't
* passed to the Eclipse Exception Handler

Powered by Google App Engine
This is Rietveld 408576698