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 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 results[NEW_ANALYSIS_DRIVER_LOG]; | 407 results[NEW_ANALYSIS_DRIVER_LOG]; |
408 | 408 |
409 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); | 409 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); |
410 | 410 |
411 // | 411 // |
412 // Process all of the plugins so that extensions are registered. | 412 // Process all of the plugins so that extensions are registered. |
413 // | 413 // |
414 ServerPlugin serverPlugin = new ServerPlugin(); | 414 ServerPlugin serverPlugin = new ServerPlugin(); |
415 List<Plugin> plugins = <Plugin>[]; | 415 List<Plugin> plugins = <Plugin>[]; |
416 plugins.addAll(AnalysisEngine.instance.requiredPlugins); | 416 plugins.addAll(AnalysisEngine.instance.requiredPlugins); |
417 plugins.add(AnalysisEngine.instance.commandLinePlugin); | |
418 plugins.add(serverPlugin); | 417 plugins.add(serverPlugin); |
419 plugins.add(dartCompletionPlugin); | 418 plugins.add(dartCompletionPlugin); |
420 plugins.addAll(_userDefinedPlugins); | 419 plugins.addAll(_userDefinedPlugins); |
421 ExtensionManager manager = new ExtensionManager(); | 420 ExtensionManager manager = new ExtensionManager(); |
422 manager.processPlugins(plugins); | 421 manager.processPlugins(plugins); |
423 linter.registerLintRules(); | 422 linter.registerLintRules(); |
424 | 423 |
425 String defaultSdkPath; | 424 String defaultSdkPath; |
426 if (results[SDK_OPTION] != null) { | 425 if (results[SDK_OPTION] != null) { |
427 defaultSdkPath = results[SDK_OPTION]; | 426 defaultSdkPath = results[SDK_OPTION]; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 */ | 654 */ |
656 static void _rollLogFiles(String path, int numOld) { | 655 static void _rollLogFiles(String path, int numOld) { |
657 for (int i = numOld - 1; i >= 0; i--) { | 656 for (int i = numOld - 1; i >= 0; i--) { |
658 try { | 657 try { |
659 String oldPath = i == 0 ? path : '$path.$i'; | 658 String oldPath = i == 0 ? path : '$path.$i'; |
660 new File(oldPath).renameSync('$path.${i+1}'); | 659 new File(oldPath).renameSync('$path.${i+1}'); |
661 } catch (e) {} | 660 } catch (e) {} |
662 } | 661 } |
663 } | 662 } |
664 } | 663 } |
OLD | NEW |