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

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

Issue 1398033004: One extension manager (to bind them all). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Unstage pubspec. Created 5 years, 2 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/pubspec.yaml » ('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 driver; 5 library driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:math'; 9 import 'dart:math';
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 AnalysisEngine.instance.instrumentationService = service; 395 AnalysisEngine.instance.instrumentationService = service;
396 // 396 //
397 // Enable the new task model, if appropriate. 397 // Enable the new task model, if appropriate.
398 // 398 //
399 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL]; 399 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL];
400 // 400 //
401 // Process all of the plugins so that extensions are registered. 401 // Process all of the plugins so that extensions are registered.
402 // 402 //
403 ServerPlugin serverPlugin = new ServerPlugin(); 403 ServerPlugin serverPlugin = new ServerPlugin();
404 List<Plugin> plugins = <Plugin>[]; 404 List<Plugin> plugins = <Plugin>[];
405 plugins.addAll(AnalysisEngine.instance.supportedPlugins);
406 plugins.add(serverPlugin); 405 plugins.add(serverPlugin);
407 plugins.addAll(_userDefinedPlugins); 406 plugins.addAll(_userDefinedPlugins);
408 plugins.add(linterPlugin); 407 plugins.add(linterPlugin);
409 ExtensionManager manager = new ExtensionManager(); 408
410 manager.processPlugins(plugins); 409 // Defer to the extension manager in AE for plugin registration.
410 AnalysisEngine.instance.userDefinedPlugins = plugins;
411 // Force registration.
412 AnalysisEngine.instance.taskManager;
413
411 // 414 //
412 // Create the sockets and start listening for requests. 415 // Create the sockets and start listening for requests.
413 // 416 //
414 socketServer = new SocketServer(analysisServerOptions, defaultSdk, service, 417 socketServer = new SocketServer(analysisServerOptions, defaultSdk, service,
415 serverPlugin, packageResolverProvider); 418 serverPlugin, packageResolverProvider);
416 httpServer = new HttpAnalysisServer(socketServer); 419 httpServer = new HttpAnalysisServer(socketServer);
417 stdioServer = new StdioAnalysisServer(socketServer); 420 stdioServer = new StdioAnalysisServer(socketServer);
418 socketServer.userDefinedPlugins = _userDefinedPlugins; 421 socketServer.userDefinedPlugins = _userDefinedPlugins;
419 422
420 if (serve_http) { 423 if (serve_http) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 uuidFile.parent.createSync(recursive: true); 568 uuidFile.parent.createSync(recursive: true);
566 uuidFile.writeAsStringSync(uuid); 569 uuidFile.writeAsStringSync(uuid);
567 } catch (exception, stackTrace) { 570 } catch (exception, stackTrace) {
568 service.logPriorityException(exception, stackTrace); 571 service.logPriorityException(exception, stackTrace);
569 // Slightly alter the uuid to indicate it was not persisted 572 // Slightly alter the uuid to indicate it was not persisted
570 uuid = 'temp-$uuid'; 573 uuid = 'temp-$uuid';
571 } 574 }
572 return uuid; 575 return uuid;
573 } 576 }
574 } 577 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698