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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java

Issue 12593009: Don't cast to NodeElement where not needed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 7 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java
index 7592e7313442c90aeb9ab4e86c90af489aae0872..439c8451ddfcc6d0a22550781205d832db84b91e 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java
@@ -75,7 +75,6 @@ import com.google.dart.compiler.resolver.LibraryElement;
import com.google.dart.compiler.resolver.LibraryPrefixElement;
import com.google.dart.compiler.resolver.MethodElement;
import com.google.dart.compiler.resolver.MethodNodeElement;
-import com.google.dart.compiler.resolver.NodeElement;
import com.google.dart.compiler.resolver.Scope;
import com.google.dart.compiler.resolver.VariableElement;
import com.google.dart.compiler.type.FunctionAliasType;
@@ -685,7 +684,7 @@ public class CompletionEngine {
return elements;
}
- private void add(NodeElement element) {
+ private void add(Element element) {
if (filter(element.getName())) {
elements.add(element);
}
@@ -3274,7 +3273,7 @@ public class CompletionEngine {
private void proposeInlineFunction(DartMethodInvocation completionNode) {
// Argument: locals, params, fields, statics, globals; if arg type is fn, construct it
- NodeElement nodeElem = completionNode.getElement();
+ Element nodeElem = completionNode.getElement();
if (nodeElem != null) {
Type nodeType = nodeElem.getType();
if (nodeType != null) {

Powered by Google App Engine
This is Rietveld 408576698