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

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

Issue 2949103003: Remove more dead code from analysis server (Closed)
Patch Set: Created 3 years, 5 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
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 import 'dart:async'; 5 import 'dart:async';
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 */ 84 */
85 void scheduleNotificationOperations( 85 void scheduleNotificationOperations(
86 AnalysisServer server, 86 AnalysisServer server,
87 Source source, 87 Source source,
88 String file, 88 String file,
89 LineInfo lineInfo, 89 LineInfo lineInfo,
90 AnalysisContext context, 90 AnalysisContext context,
91 CompilationUnit parsedDartUnit, 91 CompilationUnit parsedDartUnit,
92 CompilationUnit resolvedDartUnit, 92 CompilationUnit resolvedDartUnit,
93 List<AnalysisError> errors) { 93 List<AnalysisError> errors) {
94 // TODO(brianwilkerson) The `containingContext` will always be `null`. If this
95 // check is still useful, we should re-write it to use drivers.
96 //
94 // If the file belongs to any analysis root, check whether we're in it now. 97 // If the file belongs to any analysis root, check whether we're in it now.
95 AnalysisContext containingContext = server.getContainingContext(file); 98 // AnalysisContext containingContext = server.getContainingContext(file);
96 if (containingContext != null && context != containingContext) { 99 // if (containingContext != null && context != containingContext) {
97 return; 100 // return;
98 } 101 // }
99 // Dart 102 // Dart
100 CompilationUnit dartUnit = resolvedDartUnit ?? parsedDartUnit; 103 CompilationUnit dartUnit = resolvedDartUnit ?? parsedDartUnit;
101 if (resolvedDartUnit != null) { 104 if (resolvedDartUnit != null) {
102 if (server.hasAnalysisSubscription( 105 if (server.hasAnalysisSubscription(
103 protocol.AnalysisService.HIGHLIGHTS, file)) { 106 protocol.AnalysisService.HIGHLIGHTS, file)) {
104 server.scheduleOperation( 107 server.scheduleOperation(
105 new _DartHighlightsOperation(context, file, resolvedDartUnit)); 108 new _DartHighlightsOperation(context, file, resolvedDartUnit));
106 } 109 }
107 if (server.hasAnalysisSubscription( 110 if (server.hasAnalysisSubscription(
108 protocol.AnalysisService.NAVIGATION, file)) { 111 protocol.AnalysisService.NAVIGATION, file)) {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 abstract class _SingleFileOperation extends SourceSensitiveOperation { 539 abstract class _SingleFileOperation extends SourceSensitiveOperation {
537 final String file; 540 final String file;
538 541
539 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 542 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
540 543
541 @override 544 @override
542 bool shouldBeDiscardedOnSourceChange(Source source) { 545 bool shouldBeDiscardedOnSourceChange(Source source) {
543 return source.fullName == file; 546 return source.fullName == file;
544 } 547 }
545 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698