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

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

Issue 10828389: Enhance 'Create Method' Quick Fix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 Element element) { 1636 Element element) {
1637 String name = node.getFunctionNameString(); 1637 String name = node.getFunctionNameString();
1638 ElementKind kind = ElementKind.of(element); 1638 ElementKind kind = ElementKind.of(element);
1639 DartNode errorNode = node.getFunctionName(); 1639 DartNode errorNode = node.getFunctionName();
1640 switch (kind) { 1640 switch (kind) {
1641 case NONE: 1641 case NONE:
1642 switch (ElementKind.of(classOrLibrary)) { 1642 switch (ElementKind.of(classOrLibrary)) {
1643 case CLASS: 1643 case CLASS:
1644 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_CLAS S, name, 1644 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_CLAS S, name,
1645 classOrLibrary.getName()); 1645 classOrLibrary.getName());
1646 node.getFunctionName().markResolutionAlreadyReportedThatTheMethodC ouldNotBeFound();
1646 break; 1647 break;
1647 case LIBRARY: 1648 case LIBRARY:
1648 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_LIBR ARY, name, 1649 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_LIBR ARY, name,
1649 classOrLibrary.getName()); 1650 classOrLibrary.getName());
1650 break; 1651 break;
1651 default: 1652 default:
1652 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD, name); 1653 onError(errorNode, ResolverErrorCode.CANNOT_RESOLVE_METHOD, name);
1653 } 1654 }
1654 1655
1655 break; 1656 break;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 ClassElement currentClass = (ClassElement) constructor.getEnclosingEle ment(); 2228 ClassElement currentClass = (ClassElement) constructor.getEnclosingEle ment();
2228 if (nextClass == currentClass) { 2229 if (nextClass == currentClass) {
2229 return (ConstructorNodeElement) nextConstructorElement; 2230 return (ConstructorNodeElement) nextConstructorElement;
2230 } 2231 }
2231 } 2232 }
2232 } 2233 }
2233 } 2234 }
2234 return null; 2235 return null;
2235 } 2236 }
2236 } 2237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698