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

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

Issue 2765063002: Introducing `IdeOptions`. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/ide_options.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;
11 import 'dart:math' show max; 11 import 'dart:math' show max;
12 12
13 import 'package:analysis_server/plugin/protocol/protocol.dart' 13 import 'package:analysis_server/plugin/protocol/protocol.dart'
14 hide AnalysisOptions, Element; 14 hide AnalysisOptions, Element;
15 import 'package:analysis_server/src/analysis_logger.dart'; 15 import 'package:analysis_server/src/analysis_logger.dart';
16 import 'package:analysis_server/src/channel/channel.dart'; 16 import 'package:analysis_server/src/channel/channel.dart';
17 import 'package:analysis_server/src/computer/computer_highlights.dart'; 17 import 'package:analysis_server/src/computer/computer_highlights.dart';
18 import 'package:analysis_server/src/computer/computer_highlights2.dart'; 18 import 'package:analysis_server/src/computer/computer_highlights2.dart';
19 import 'package:analysis_server/src/computer/computer_outline.dart'; 19 import 'package:analysis_server/src/computer/computer_outline.dart';
20 import 'package:analysis_server/src/computer/new_notifications.dart'; 20 import 'package:analysis_server/src/computer/new_notifications.dart';
21 import 'package:analysis_server/src/context_manager.dart'; 21 import 'package:analysis_server/src/context_manager.dart';
22 import 'package:analysis_server/src/domains/analysis/navigation.dart'; 22 import 'package:analysis_server/src/domains/analysis/navigation.dart';
23 import 'package:analysis_server/src/domains/analysis/navigation_dart.dart'; 23 import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
24 import 'package:analysis_server/src/domains/analysis/occurrences.dart'; 24 import 'package:analysis_server/src/domains/analysis/occurrences.dart';
25 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart'; 25 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
26 import 'package:analysis_server/src/ide_options.dart';
26 import 'package:analysis_server/src/operation/operation.dart'; 27 import 'package:analysis_server/src/operation/operation.dart';
27 import 'package:analysis_server/src/operation/operation_analysis.dart'; 28 import 'package:analysis_server/src/operation/operation_analysis.dart';
28 import 'package:analysis_server/src/operation/operation_queue.dart'; 29 import 'package:analysis_server/src/operation/operation_queue.dart';
29 import 'package:analysis_server/src/plugin/notification_manager.dart'; 30 import 'package:analysis_server/src/plugin/notification_manager.dart';
30 import 'package:analysis_server/src/plugin/server_plugin.dart'; 31 import 'package:analysis_server/src/plugin/server_plugin.dart';
31 import 'package:analysis_server/src/protocol_server.dart' as server; 32 import 'package:analysis_server/src/protocol_server.dart' as server;
32 import 'package:analysis_server/src/server/diagnostic_server.dart'; 33 import 'package:analysis_server/src/server/diagnostic_server.dart';
33 import 'package:analysis_server/src/services/correction/namespace.dart'; 34 import 'package:analysis_server/src/services/correction/namespace.dart';
34 import 'package:analysis_server/src/services/index/index.dart'; 35 import 'package:analysis_server/src/services/index/index.dart';
35 import 'package:analysis_server/src/services/search/search_engine.dart'; 36 import 'package:analysis_server/src/services/search/search_engine.dart';
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 static final String VERSION = '1.18.0'; 105 static final String VERSION = '1.18.0';
105 106
106 /** 107 /**
107 * The number of milliseconds to perform operations before inserting 108 * The number of milliseconds to perform operations before inserting
108 * a 1 millisecond delay so that the VM and dart:io can deliver content 109 * a 1 millisecond delay so that the VM and dart:io can deliver content
109 * to stdin. This should be removed once the underlying problem is fixed. 110 * to stdin. This should be removed once the underlying problem is fixed.
110 */ 111 */
111 static int performOperationDelayFrequency = 25; 112 static int performOperationDelayFrequency = 25;
112 113
113 /** 114 /**
115 * IDE options for this server instance.
116 */
117 IdeOptions ideOptions;
118
119 /**
114 * The options of this server instance. 120 * The options of this server instance.
115 */ 121 */
116 AnalysisServerOptions options; 122 AnalysisServerOptions options;
117 123
118 /** 124 /**
119 * The channel from which requests are received and to which responses should 125 * The channel from which requests are received and to which responses should
120 * be sent. 126 * be sent.
121 */ 127 */
122 final ServerCommunicationChannel channel; 128 final ServerCommunicationChannel channel;
123 129
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 searchEngine = new SearchEngineImpl2(driverMap.values); 460 searchEngine = new SearchEngineImpl2(driverMap.values);
455 } else if (index != null) { 461 } else if (index != null) {
456 searchEngine = new SearchEngineImpl(index, getAstProvider); 462 searchEngine = new SearchEngineImpl(index, getAstProvider);
457 } 463 }
458 Notification notification = new ServerConnectedParams(VERSION, io.pid, 464 Notification notification = new ServerConnectedParams(VERSION, io.pid,
459 sessionId: instrumentationService.sessionId) 465 sessionId: instrumentationService.sessionId)
460 .toNotification(); 466 .toNotification();
461 channel.sendNotification(notification); 467 channel.sendNotification(notification);
462 channel.listen(handleRequest, onDone: done, onError: error); 468 channel.listen(handleRequest, onDone: done, onError: error);
463 handlers = serverPlugin.createDomains(this); 469 handlers = serverPlugin.createDomains(this);
470 ideOptions = new IdeOptionsImpl();
464 } 471 }
465 472
466 /** 473 /**
467 * Return the [AnalysisContext]s that are being used to analyze the analysis 474 * Return the [AnalysisContext]s that are being used to analyze the analysis
468 * roots. 475 * roots.
469 */ 476 */
470 Iterable<AnalysisContext> get analysisContexts => 477 Iterable<AnalysisContext> get analysisContexts =>
471 contextManager.analysisContexts; 478 contextManager.analysisContexts;
472 479
473 /** 480 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 return _onAnalysisStartedController.stream; 529 return _onAnalysisStartedController.stream;
523 } 530 }
524 531
525 /** 532 /**
526 * The stream that is notified when contexts are added or removed. 533 * The stream that is notified when contexts are added or removed.
527 */ 534 */
528 Stream<ContextsChangedEvent> get onContextsChanged => 535 Stream<ContextsChangedEvent> get onContextsChanged =>
529 _onContextsChangedController.stream; 536 _onContextsChangedController.stream;
530 537
531 /** 538 /**
532 * The stream that is notified when a single file has been analyzed.
533 */
534 Stream get onFileAnalyzed => _onFileAnalyzedController.stream;
535
536 /**
537 * The stream that is notified when a single file has been added. This exists 539 * The stream that is notified when a single file has been added. This exists
538 * as a temporary stopgap for plugins, until the official plugin API is 540 * as a temporary stopgap for plugins, until the official plugin API is
539 * complete. 541 * complete.
540 */ 542 */
541 Stream get onFileAdded => _onFileAddedController.stream; 543 Stream get onFileAdded => _onFileAddedController.stream;
542 544
543 /** 545 /**
546 * The stream that is notified when a single file has been analyzed.
547 */
548 Stream get onFileAnalyzed => _onFileAnalyzedController.stream;
549
550 /**
544 * The stream that is notified when a single file has been changed. This 551 * The stream that is notified when a single file has been changed. This
545 * exists as a temporary stopgap for plugins, until the official plugin API is 552 * exists as a temporary stopgap for plugins, until the official plugin API is
546 * complete. 553 * complete.
547 */ 554 */
548 Stream get onFileChanged => _onFileChangedController.stream; 555 Stream get onFileChanged => _onFileChangedController.stream;
549 556
550 /** 557 /**
551 * The stream that is notified when priority sources change. 558 * The stream that is notified when priority sources change.
552 */ 559 */
553 Stream<PriorityChangeEvent> get onPriorityChange => 560 Stream<PriorityChangeEvent> get onPriorityChange =>
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2299 /** 2306 /**
2300 * The [PerformanceTag] for time spent in server request handlers. 2307 * The [PerformanceTag] for time spent in server request handlers.
2301 */ 2308 */
2302 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 2309 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
2303 2310
2304 /** 2311 /**
2305 * The [PerformanceTag] for time spent in split store microtasks. 2312 * The [PerformanceTag] for time spent in split store microtasks.
2306 */ 2313 */
2307 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2314 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2308 } 2315 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/ide_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698