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

Unified Diff: pkg/analysis_server/bin/dartdeps.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/bin/fuzz.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/bin/dartdeps.dart
diff --git a/pkg/analysis_server/bin/dartdeps.dart b/pkg/analysis_server/bin/dartdeps.dart
index c0eaad4abc275399aaece9d24068615f2e8cba32..8b6ad68601c3e49fff6d96ff3396d0a59ba65753 100644
--- a/pkg/analysis_server/bin/dartdeps.dart
+++ b/pkg/analysis_server/bin/dartdeps.dart
@@ -5,21 +5,20 @@
import 'dart:async';
import 'dart:io';
-import 'package:args/args.dart';
import 'package:analysis_server/src/analysis_manager.dart';
+import 'package:args/args.dart';
/**
* Start analysis server as a separate process and use the websocket protocol
* to analyze the application specified on the command line.
*/
void main(List<String> args) {
- new _DartDependencyAnalyzer(args).run()
- .catchError((error, stack) {
- print('Analysis failed: $error');
- if (stack != null) {
- print(stack);
- }
- });
+ new _DartDependencyAnalyzer(args).run().catchError((error, stack) {
+ print('Analysis failed: $error');
+ if (stack != null) {
+ print(stack);
+ }
+ });
}
/**
@@ -65,6 +64,27 @@ class _DartDependencyAnalyzer {
_DartDependencyAnalyzer(this.args);
/**
+ * Use the given manager to perform the analysis.
+ */
+ void analyze(AnalysisManager manager) {
+ if (manager == null) {
+ return;
+ }
+ this.manager = manager;
+ print('Analyzing...');
+ }
+
+ /**
+ * Print information about how to use the server.
+ */
+ void printUsage(ArgParser parser) {
+ print('Usage: $BINARY_NAME [flags] <application_directory>');
+ print('');
+ print('Supported flags are:');
+ print(parser.usage);
+ }
+
+ /**
* Parse the command line arguments to determine the application to be
* analyzed, then launch and manage an analysis server to do the work.
*/
@@ -79,10 +99,9 @@ class _DartDependencyAnalyzer {
*/
Future<AnalysisManager> start() {
ArgParser parser = new ArgParser();
- parser.addOption(
- DART_SDK_OPTION,
- help: '[sdkPath] path to Dart SDK');
- parser.addFlag(HELP_OPTION,
+ parser.addOption(DART_SDK_OPTION, help: '[sdkPath] path to Dart SDK');
+ parser.addFlag(
+ HELP_OPTION,
help: 'print this help message without starting analysis',
defaultsTo: false,
negatable: false);
@@ -94,7 +113,7 @@ class _DartDependencyAnalyzer {
ArgResults results;
try {
results = parser.parse(args);
- } on FormatException catch(e) {
+ } on FormatException catch (e) {
print(e.message);
print('');
printUsage(parser);
@@ -154,17 +173,6 @@ class _DartDependencyAnalyzer {
}
/**
- * Use the given manager to perform the analysis.
- */
- void analyze(AnalysisManager manager) {
- if (manager == null) {
- return;
- }
- this.manager = manager;
- print('Analyzing...');
- }
-
- /**
* Stop the analysis server.
*/
void stop() {
@@ -172,14 +180,4 @@ class _DartDependencyAnalyzer {
manager.stop();
}
}
-
- /**
- * Print information about how to use the server.
- */
- void printUsage(ArgParser parser) {
- print('Usage: $BINARY_NAME [flags] <application_directory>');
- print('');
- print('Supported flags are:');
- print(parser.usage);
- }
}
« no previous file with comments | « no previous file | pkg/analysis_server/bin/fuzz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698