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

Side by Side 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, 2 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 826
827 /** 827 /**
828 * Returns [Element]s of the given [nodes]. 828 * Returns [Element]s of the given [nodes].
829 * 829 *
830 * May be empty if not resolved, but not `null`. 830 * May be empty if not resolved, but not `null`.
831 */ 831 */
832 List<Element> getElementsOfNodes(List<AstNode> nodes, int offset) { 832 List<Element> getElementsOfNodes(List<AstNode> nodes, int offset) {
833 List<Element> elements = <Element>[]; 833 List<Element> elements = <Element>[];
834 for (AstNode node in nodes) { 834 for (AstNode node in nodes) {
835 if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
836 node = node.parent;
837 }
838 if (node is LibraryIdentifier) {
839 node = node.parent;
840 }
835 Element element = ElementLocator.locateWithOffset(node, offset); 841 Element element = ElementLocator.locateWithOffset(node, offset);
836 if (node is SimpleIdentifier && element is PrefixElement) { 842 if (node is SimpleIdentifier && element is PrefixElement) {
837 element = getImportElement(node); 843 element = getImportElement(node);
838 } 844 }
839 if (element != null) { 845 if (element != null) {
840 elements.add(element); 846 elements.add(element);
841 } 847 }
842 } 848 }
843 return elements; 849 return elements;
844 } 850 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 // send the notification 960 // send the notification
955 channel.sendNotification( 961 channel.sendNotification(
956 new ServerErrorParams( 962 new ServerErrorParams(
957 true, 963 true,
958 exceptionString, 964 exceptionString,
959 stackTraceString).toNotification()); 965 stackTraceString).toNotification());
960 } 966 }
961 } 967 }
962 968
963 typedef void OptionUpdater(AnalysisOptionsImpl options); 969 typedef void OptionUpdater(AnalysisOptionsImpl options);
OLDNEW
« 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