| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 } | 642 } |
| 643 | 643 |
| 644 /** | 644 /** |
| 645 * Start the server. If [profileServer] is `true`, the server will be started | 645 * Start the server. If [profileServer] is `true`, the server will be started |
| 646 * with "--observe" and "--pause-isolates-on-exit", allowing the observatory | 646 * with "--observe" and "--pause-isolates-on-exit", allowing the observatory |
| 647 * to be used. | 647 * to be used. |
| 648 */ | 648 */ |
| 649 Future start({ | 649 Future start({ |
| 650 bool checked: true, | 650 bool checked: true, |
| 651 int diagnosticPort, | 651 int diagnosticPort, |
| 652 String instrumentationLogFile, |
| 652 bool profileServer: false, | 653 bool profileServer: false, |
| 653 String sdkPath, | 654 String sdkPath, |
| 654 int servicesPort, | 655 int servicesPort, |
| 655 bool useAnalysisHighlight2: false, | 656 bool useAnalysisHighlight2: false, |
| 656 }) async { | 657 }) async { |
| 657 if (_process != null) { | 658 if (_process != null) { |
| 658 throw new Exception('Process already started'); | 659 throw new Exception('Process already started'); |
| 659 } | 660 } |
| 660 _time.start(); | 661 _time.start(); |
| 661 String dartBinary = Platform.executable; | 662 String dartBinary = Platform.executable; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 689 // Add the server executable. | 690 // Add the server executable. |
| 690 // | 691 // |
| 691 arguments.add(serverPath); | 692 arguments.add(serverPath); |
| 692 // | 693 // |
| 693 // Add server arguments. | 694 // Add server arguments. |
| 694 // | 695 // |
| 695 if (diagnosticPort != null) { | 696 if (diagnosticPort != null) { |
| 696 arguments.add('--port'); | 697 arguments.add('--port'); |
| 697 arguments.add(diagnosticPort.toString()); | 698 arguments.add(diagnosticPort.toString()); |
| 698 } | 699 } |
| 700 if (instrumentationLogFile != null) { |
| 701 arguments.add('--instrumentation-log-file=$instrumentationLogFile'); |
| 702 } |
| 699 if (sdkPath != null) { | 703 if (sdkPath != null) { |
| 700 arguments.add('--sdk=$sdkPath'); | 704 arguments.add('--sdk=$sdkPath'); |
| 701 } | 705 } |
| 702 if (useAnalysisHighlight2) { | 706 if (useAnalysisHighlight2) { |
| 703 arguments.add('--useAnalysisHighlight2'); | 707 arguments.add('--useAnalysisHighlight2'); |
| 704 } | 708 } |
| 705 // print('Launching $serverPath'); | 709 // print('Launching $serverPath'); |
| 706 // print('$dartBinary ${arguments.join(' ')}'); | 710 // print('$dartBinary ${arguments.join(' ')}'); |
| 707 // TODO(devoncarew): We could experiment with instead launching the analysis | 711 // TODO(devoncarew): We could experiment with instead launching the analysis |
| 708 // server in a separate isolate. This would make it easier to debug the | 712 // server in a separate isolate. This would make it easier to debug the |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 void populateMismatches(item, List<MismatchDescriber> mismatches); | 981 void populateMismatches(item, List<MismatchDescriber> mismatches); |
| 978 | 982 |
| 979 /** | 983 /** |
| 980 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 984 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
| 981 */ | 985 */ |
| 982 MismatchDescriber simpleDescription(String description) => | 986 MismatchDescriber simpleDescription(String description) => |
| 983 (Description mismatchDescription) { | 987 (Description mismatchDescription) { |
| 984 mismatchDescription.add(description); | 988 mismatchDescription.add(description); |
| 985 }; | 989 }; |
| 986 } | 990 } |
| OLD | NEW |