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

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

Issue 2525693002: Use single unit/node/element. (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
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 operation.analysis; 5 library operation.analysis;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/computer/computer_highlights.dart'; 8 import 'package:analysis_server/src/computer/computer_highlights.dart';
9 import 'package:analysis_server/src/computer/computer_highlights2.dart'; 9 import 'package:analysis_server/src/computer/computer_highlights2.dart';
10 import 'package:analysis_server/src/computer/computer_outline.dart'; 10 import 'package:analysis_server/src/computer/computer_outline.dart';
(...skipping 17 matching lines...) Expand all
28 */ 28 */
29 runWithActiveContext(AnalysisContext context, f()) { 29 runWithActiveContext(AnalysisContext context, f()) {
30 if (context is InternalAnalysisContext && !context.isActive) { 30 if (context is InternalAnalysisContext && !context.isActive) {
31 context.isActive = true; 31 context.isActive = true;
32 try { 32 try {
33 return f(); 33 return f();
34 } finally { 34 } finally {
35 context.isActive = false; 35 context.isActive = false;
36 } 36 }
37 } else { 37 } else {
38 f(); 38 return f();
39 } 39 }
40 } 40 }
41 41
42 scheduleImplementedNotification( 42 scheduleImplementedNotification(
43 AnalysisServer server, Iterable<String> files) async { 43 AnalysisServer server, Iterable<String> files) async {
44 SearchEngine searchEngine = server.searchEngine; 44 SearchEngine searchEngine = server.searchEngine;
45 if (searchEngine == null) { 45 if (searchEngine == null) {
46 return; 46 return;
47 } 47 }
48 for (String file in files) { 48 for (String file in files) {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 abstract class _SingleFileOperation extends SourceSensitiveOperation { 536 abstract class _SingleFileOperation extends SourceSensitiveOperation {
537 final String file; 537 final String file;
538 538
539 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 539 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
540 540
541 @override 541 @override
542 bool shouldBeDiscardedOnSourceChange(Source source) { 542 bool shouldBeDiscardedOnSourceChange(Source source) {
543 return source.fullName == file; 543 return source.fullName == file;
544 } 544 }
545 } 545 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698