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

Issue 9703096: Remove Element.getNode() method (Closed)

Created:
8 years, 9 months ago by scheglov
Modified:
8 years, 9 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Remove Element.getNode() method 1. Use NodeElement in CompletionEngine 2. Don't use Element.getNode() in DartElementLocator 3. New tests for DartElementLocator 4. Clean up DartC tests to use NodeElement R=brianwilkerson@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=5586

Patch Set 1 #

Total comments: 8

Patch Set 2 : Changes for review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+532 lines, -176 lines) Patch
M compiler/java/com/google/dart/compiler/ast/DartArrayAccess.java View 3 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java View 3 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartClassMember.java View 2 chunks +2 lines, -2 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartDirective.java View 1 chunk +6 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartIdentifier.java View 4 chunks +4 lines, -3 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartInvocation.java View 3 chunks +4 lines, -3 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartNewExpression.java View 4 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java View 2 chunks +2 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartRedirectConstructorInvocation.java View 3 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartSuperConstructorInvocation.java View 3 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java View 3 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Element.java View 2 chunks +0 lines, -3 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java View 1 6 chunks +39 lines, -7 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java View 20 chunks +22 lines, -21 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java View 7 chunks +10 lines, -9 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java View 6 chunks +7 lines, -16 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java View 3 chunks +26 lines, -36 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java View 1 3 chunks +1 line, -34 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/bindings/BindingUtils.java View 2 chunks +12 lines, -11 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java View 1 3 chunks +138 lines, -3 lines 0 comments Download
A editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/TestProject.java View 1 chunk +104 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui_test/META-INF/MANIFEST.MF View 1 1 chunk +1 line, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui_test/build.properties View 1 1 chunk +2 lines, -1 line 0 comments Download
A editor/tools/plugins/com.google.dart.tools.ui_test/plugin.xml View 1 1 chunk +5 lines, -0 lines 0 comments Download
A editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/Activator.java View 1 1 chunk +121 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
8 years, 9 months ago (2012-03-16 00:33:23 UTC) #1
Brian Wilkerson
https://chromiumcodereview.appspot.com/9703096/diff/1/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java File editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java (right): https://chromiumcodereview.appspot.com/9703096/diff/1/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java#newcode1384 editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java:1384: String returnTypeName = method.getReturnType().getElement().getName(); Do methods always have a ...
8 years, 9 months ago (2012-03-16 15:04:51 UTC) #2
scheglov
https://chromiumcodereview.appspot.com/9703096/diff/1/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java File editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java (right): https://chromiumcodereview.appspot.com/9703096/diff/1/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java#newcode1384 editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionEngine.java:1384: String returnTypeName = method.getReturnType().getElement().getName(); On 2012/03/16 15:04:51, Brian Wilkerson ...
8 years, 9 months ago (2012-03-16 18:25:02 UTC) #3
Brian Wilkerson
8 years, 9 months ago (2012-03-16 18:49:14 UTC) #4
LGTM

>   I can not say that I understand 100% how this class is used...

I believe that it's only used for mark occurrences, but I might be mistaken.

>   I think that we may be will remove NodeElement, and all its subtypes.
>   However I'm still not sure if we want do this completely.

Definitely a long term discussion, but I think that any information we need from
the node probably ought to be in the element itself. But you have, as usual,
some good points.

>   Keeping _minimal_ input and output for test directly in test itself is the
> only viable approach.

I'll keep that in mind.

Powered by Google App Engine
This is Rietveld 408576698