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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 619223002: Fix for starting 'Rename LibraryElement' refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 3900965f771ea774b3ffae21fa17504b703e0ee5..43a30915361ef059e0c5e8ca70524bb447547148 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -832,6 +832,12 @@ class AnalysisServer {
List<Element> getElementsOfNodes(List<AstNode> nodes, int offset) {
List<Element> elements = <Element>[];
for (AstNode node in nodes) {
+ if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
+ node = node.parent;
+ }
+ if (node is LibraryIdentifier) {
+ node = node.parent;
+ }
Element element = ElementLocator.locateWithOffset(node, offset);
if (node is SimpleIdentifier && element is PrefixElement) {
element = getImportElement(node);
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698