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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2539753003: Update to make Extract/Inline local and Extract Method refactorings work. (Closed)
Patch Set: Created 4 years 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
« 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 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 } 794 }
795 return null; 795 return null;
796 } 796 }
797 797
798 /** 798 /**
799 * Return a [Future] that completes with the resolved [CompilationUnit] for 799 * Return a [Future] that completes with the resolved [CompilationUnit] for
800 * the Dart file with the given [path], or with `null` if the file is not a 800 * the Dart file with the given [path], or with `null` if the file is not a
801 * Dart file or cannot be resolved. 801 * Dart file or cannot be resolved.
802 */ 802 */
803 Future<CompilationUnit> getResolvedCompilationUnit(String path) async { 803 Future<CompilationUnit> getResolvedCompilationUnit(String path) async {
804 if (options.enableNewAnalysisDriver) {
805 nd.AnalysisResult result = await getAnalysisResult(path);
806 return result?.unit;
807 }
804 ContextSourcePair contextSource = getContextSourcePair(path); 808 ContextSourcePair contextSource = getContextSourcePair(path);
805 AnalysisContext context = contextSource.context; 809 AnalysisContext context = contextSource.context;
806 if (context == null) { 810 if (context == null) {
807 return null; 811 return null;
808 } 812 }
809 return runWithActiveContext(context, () { 813 return runWithActiveContext(context, () {
810 Source unitSource = contextSource.source; 814 Source unitSource = contextSource.source;
811 List<Source> librarySources = context.getLibrariesContaining(unitSource); 815 List<Source> librarySources = context.getLibrariesContaining(unitSource);
812 for (Source librarySource in librarySources) { 816 for (Source librarySource in librarySources) {
813 return context.resolveCompilationUnit2(unitSource, librarySource); 817 return context.resolveCompilationUnit2(unitSource, librarySource);
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 /** 2061 /**
2058 * The [PerformanceTag] for time spent in server request handlers. 2062 * The [PerformanceTag] for time spent in server request handlers.
2059 */ 2063 */
2060 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 2064 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
2061 2065
2062 /** 2066 /**
2063 * The [PerformanceTag] for time spent in split store microtasks. 2067 * The [PerformanceTag] for time spent in split store microtasks.
2064 */ 2068 */
2065 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2069 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2066 } 2070 }
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