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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 9703096: Remove Element.getNode() method (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for review comments Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.annotations.VisibleForTesting; 7 import com.google.common.annotations.VisibleForTesting;
8 import com.google.common.collect.Lists; 8 import com.google.common.collect.Lists;
9 import com.google.common.collect.Sets; 9 import com.google.common.collect.Sets;
10 import com.google.dart.compiler.DartCompilationPhase; 10 import com.google.dart.compiler.DartCompilationPhase;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 /** 120 /**
121 * Main entry point for IDE. Resolves a member (method or field) 121 * Main entry point for IDE. Resolves a member (method or field)
122 * incrementally in the given context. 122 * incrementally in the given context.
123 * 123 *
124 * @param classElement the class enclosing the member. 124 * @param classElement the class enclosing the member.
125 * @param member the member to resolve. 125 * @param member the member to resolve.
126 * @param context a resolution context corresponding to classElement. 126 * @param context a resolution context corresponding to classElement.
127 */ 127 */
128 public void resolveMember(ClassElement classElement, Element member, Resolutio nContext context) { 128 public void resolveMember(ClassNodeElement classElement, NodeElement member, R esolutionContext context) {
129 ResolveElementsVisitor visitor; 129 ResolveElementsVisitor visitor;
130 if(member == null) { 130 if(member == null) {
131 return; 131 return;
132 } 132 }
133 switch (member.getKind()) { 133 switch (member.getKind()) {
134 case CONSTRUCTOR: 134 case CONSTRUCTOR:
135 case METHOD: 135 case METHOD:
136 ResolutionContext methodContext = context.extend(member.getName()); 136 ResolutionContext methodContext = context.extend(member.getName());
137 visitor = new ResolveElementsVisitor(methodContext, classElement, 137 visitor = new ResolveElementsVisitor(methodContext, classElement,
138 (MethodElement) member); 138 (MethodElement) member);
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 ClassElement nextClass = (ClassElement) nextConstructorElement.getEnclos ingElement(); 1842 ClassElement nextClass = (ClassElement) nextConstructorElement.getEnclos ingElement();
1843 ClassElement currentClass = (ClassElement) constructor.getEnclosingEleme nt(); 1843 ClassElement currentClass = (ClassElement) constructor.getEnclosingEleme nt();
1844 if (nextClass == currentClass) { 1844 if (nextClass == currentClass) {
1845 return (ConstructorNodeElement) nextConstructorElement; 1845 return (ConstructorNodeElement) nextConstructorElement;
1846 } 1846 }
1847 } 1847 }
1848 } 1848 }
1849 return null; 1849 return null;
1850 } 1850 }
1851 } 1851 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698