| OLD | NEW |
| 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 |
| 11 import 'package:analysis_server/plugin/analysis/resolver_provider.dart'; | 11 import 'package:analysis_server/plugin/analysis/resolver_provider.dart'; |
| 12 import 'package:analysis_server/src/analysis_server.dart'; | 12 import 'package:analysis_server/src/analysis_server.dart'; |
| 13 import 'package:analysis_server/src/plugin/linter_plugin.dart'; | 13 import 'package:analysis_server/src/plugin/linter_plugin.dart'; |
| 14 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 14 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
| 15 import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
n.dart'; |
| 15 import 'package:analysis_server/src/server/http_server.dart'; | 16 import 'package:analysis_server/src/server/http_server.dart'; |
| 16 import 'package:analysis_server/src/server/stdio_server.dart'; | 17 import 'package:analysis_server/src/server/stdio_server.dart'; |
| 17 import 'package:analysis_server/src/socket_server.dart'; | 18 import 'package:analysis_server/src/socket_server.dart'; |
| 18 import 'package:analysis_server/starter.dart'; | 19 import 'package:analysis_server/starter.dart'; |
| 19 import 'package:analyzer/file_system/physical_file_system.dart'; | 20 import 'package:analyzer/file_system/physical_file_system.dart'; |
| 20 import 'package:analyzer/instrumentation/file_instrumentation.dart'; | 21 import 'package:analyzer/instrumentation/file_instrumentation.dart'; |
| 21 import 'package:analyzer/instrumentation/instrumentation.dart'; | 22 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 22 import 'package:analyzer/src/generated/engine.dart'; | 23 import 'package:analyzer/src/generated/engine.dart'; |
| 23 import 'package:analyzer/src/generated/incremental_logger.dart'; | 24 import 'package:analyzer/src/generated/incremental_logger.dart'; |
| 24 import 'package:analyzer/src/generated/java_io.dart'; | 25 import 'package:analyzer/src/generated/java_io.dart'; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL]; | 403 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL]; |
| 403 // | 404 // |
| 404 // Process all of the plugins so that extensions are registered. | 405 // Process all of the plugins so that extensions are registered. |
| 405 // | 406 // |
| 406 ServerPlugin serverPlugin = new ServerPlugin(); | 407 ServerPlugin serverPlugin = new ServerPlugin(); |
| 407 List<Plugin> plugins = <Plugin>[]; | 408 List<Plugin> plugins = <Plugin>[]; |
| 408 plugins.add(serverPlugin); | 409 plugins.add(serverPlugin); |
| 409 plugins.addAll(_userDefinedPlugins); | 410 plugins.addAll(_userDefinedPlugins); |
| 410 plugins.add(linterPlugin); | 411 plugins.add(linterPlugin); |
| 411 plugins.add(linterServerPlugin); | 412 plugins.add(linterServerPlugin); |
| 413 plugins.add(dartCompletionPlugin); |
| 412 | 414 |
| 413 // Defer to the extension manager in AE for plugin registration. | 415 // Defer to the extension manager in AE for plugin registration. |
| 414 AnalysisEngine.instance.userDefinedPlugins = plugins; | 416 AnalysisEngine.instance.userDefinedPlugins = plugins; |
| 415 // Force registration. | 417 // Force registration. |
| 416 AnalysisEngine.instance.taskManager; | 418 AnalysisEngine.instance.taskManager; |
| 417 | 419 |
| 418 // | 420 // |
| 419 // Create the sockets and start listening for requests. | 421 // Create the sockets and start listening for requests. |
| 420 // | 422 // |
| 421 socketServer = new SocketServer(analysisServerOptions, defaultSdk, service, | 423 socketServer = new SocketServer(analysisServerOptions, defaultSdk, service, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 */ | 591 */ |
| 590 static void _rollLogFiles(String path, int numOld) { | 592 static void _rollLogFiles(String path, int numOld) { |
| 591 for (int i = numOld - 1; i >= 0; i--) { | 593 for (int i = numOld - 1; i >= 0; i--) { |
| 592 try { | 594 try { |
| 593 String oldPath = i == 0 ? path : '$path.$i'; | 595 String oldPath = i == 0 ? path : '$path.$i'; |
| 594 new File(oldPath).renameSync('$path.${i+1}'); | 596 new File(oldPath).renameSync('$path.${i+1}'); |
| 595 } catch (e) {} | 597 } catch (e) {} |
| 596 } | 598 } |
| 597 } | 599 } |
| 598 } | 600 } |
| OLD | NEW |