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

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

Issue 325433003: Replace Map with HashMap (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
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 9
9 import 'package:analysis_server/src/analysis_logger.dart'; 10 import 'package:analysis_server/src/analysis_logger.dart';
10 import 'package:analysis_server/src/channel.dart'; 11 import 'package:analysis_server/src/channel.dart';
11 import 'package:analysis_server/src/constants.dart'; 12 import 'package:analysis_server/src/constants.dart';
12 import 'package:analysis_server/src/context_directory_manager.dart'; 13 import 'package:analysis_server/src/context_directory_manager.dart';
13 import 'package:analysis_server/src/domain_analysis.dart'; 14 import 'package:analysis_server/src/domain_analysis.dart';
14 import 'package:analysis_server/src/operation/operation_analysis.dart'; 15 import 'package:analysis_server/src/operation/operation_analysis.dart';
15 import 'package:analysis_server/src/operation/operation.dart'; 16 import 'package:analysis_server/src/operation/operation.dart';
16 import 'package:analysis_server/src/operation/operation_queue.dart'; 17 import 'package:analysis_server/src/operation/operation_queue.dart';
17 import 'package:analysis_server/src/protocol.dart'; 18 import 'package:analysis_server/src/protocol.dart';
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 List<RequestHandler> handlers; 89 List<RequestHandler> handlers;
89 90
90 /** 91 /**
91 * The current default [DartSdk]. 92 * The current default [DartSdk].
92 */ 93 */
93 DartSdk defaultSdk = SHARED_SDK; 94 DartSdk defaultSdk = SHARED_SDK;
94 95
95 /** 96 /**
96 * A table mapping [Folder]s to the [ContextDirectory]s associated with them. 97 * A table mapping [Folder]s to the [ContextDirectory]s associated with them.
97 */ 98 */
98 final Map<Folder, ContextDirectory> folderMap = <Folder, ContextDirectory>{}; 99 final Map<Folder, ContextDirectory> folderMap = new HashMap<Folder, ContextDir ectory>();
scheglov 2014/06/06 19:26:46 More than 80 characters.
Brian Wilkerson 2014/06/06 19:31:50 So are a lot of other lines in these two files, bu
99 100
100 /** 101 /**
101 * A queue of the operations to perform in this server. 102 * A queue of the operations to perform in this server.
102 * 103 *
103 * Invariant: when this queue is non-empty, there is exactly one pending call 104 * Invariant: when this queue is non-empty, there is exactly one pending call
104 * to [performOperation] on the event queue. When this list is empty, there a re 105 * to [performOperation] on the event queue. When this list is empty, there a re
105 * no calls to [performOperation] on the event queue. 106 * no calls to [performOperation] on the event queue.
106 */ 107 */
107 ServerOperationQueue operationQueue; 108 ServerOperationQueue operationQueue;
108 109
109 /** 110 /**
110 * A set of the [ServerService]s to send notifications for. 111 * A set of the [ServerService]s to send notifications for.
111 */ 112 */
112 Set<ServerService> serverServices = new Set<ServerService>(); 113 Set<ServerService> serverServices = new HashSet<ServerService>();
113 114
114 /** 115 /**
115 * A table mapping [AnalysisService]s to the file paths for which these 116 * A table mapping [AnalysisService]s to the file paths for which these
116 * notifications should be sent. 117 * notifications should be sent.
117 */ 118 */
118 Map<AnalysisService, Set<String>> analysisServices = <AnalysisService, Set<Str ing>>{}; 119 Map<AnalysisService, Set<String>> analysisServices = new HashMap<AnalysisServi ce, Set<String>>();
scheglov 2014/06/06 19:26:46 More than 80 characters.
119 120
120 /** 121 /**
121 * True if any exceptions thrown by analysis should be propagated up the call 122 * True if any exceptions thrown by analysis should be propagated up the call
122 * stack. 123 * stack.
123 */ 124 */
124 bool rethrowExceptions; 125 bool rethrowExceptions;
125 126
126 /** 127 /**
127 * Initialize a newly created server to receive requests from and send 128 * Initialize a newly created server to receive requests from and send
128 * responses to the given [channel]. 129 * responses to the given [channel].
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 sendStatusNotification(null); 251 sendStatusNotification(null);
251 } 252 }
252 } 253 }
253 } 254 }
254 255
255 /** 256 /**
256 * Send status notification to the client. The `contextId` indicates 257 * Send status notification to the client. The `contextId` indicates
257 * the current context being analyzed or `null` if analysis is complete. 258 * the current context being analyzed or `null` if analysis is complete.
258 */ 259 */
259 void sendStatusNotification(String contextId) { 260 void sendStatusNotification(String contextId) {
260 // if (contextId == lastStatusNotificationContextId) {
261 // return;
262 // }
263 // lastStatusNotificationContextId = contextId;
264 Notification notification = new Notification(NOTIFICATION_STATUS); 261 Notification notification = new Notification(NOTIFICATION_STATUS);
265 Map<String, Object> analysis = new Map(); 262 Map<String, Object> analysis = new Map();
266 if (contextId != null) { 263 if (contextId != null) {
267 analysis['analyzing'] = true; 264 analysis['analyzing'] = true;
268 // TODO(danrubel): replace contextId with real analysisTarget 265 // TODO(danrubel): replace contextId with real analysisTarget
269 analysis['analysisTarget'] = contextId; 266 analysis['analysisTarget'] = contextId;
270 } else { 267 } else {
271 analysis['analyzing'] = false; 268 analysis['analyzing'] = false;
272 } 269 }
273 notification.params['analysis'] = analysis; 270 notification.params['analysis'] = analysis;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 /** 483 /**
487 * An enumeration of the services provided by the server domain. 484 * An enumeration of the services provided by the server domain.
488 */ 485 */
489 class ServerService extends Enum2<ServerService> { 486 class ServerService extends Enum2<ServerService> {
490 static const ServerService STATUS = const ServerService('STATUS', 0); 487 static const ServerService STATUS = const ServerService('STATUS', 0);
491 488
492 static const List<ServerService> VALUES = const [STATUS]; 489 static const List<ServerService> VALUES = const [STATUS];
493 490
494 const ServerService(String name, int ordinal) : super(name, ordinal); 491 const ServerService(String name, int ordinal) : super(name, ordinal);
495 } 492 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_directory_manager.dart » ('j') | pkg/analysis_server/lib/src/resource.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698