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

Unified Diff: pkg/analysis_server/tool/spec/generate_all.dart

Issue 1431683002: Refactor analysis server code generation to re-use logic from analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « pkg/analysis_server/tool/spec/from_html.dart ('k') | pkg/analysis_server/tool/spec/html_tools.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/generate_all.dart
diff --git a/pkg/analysis_server/tool/spec/generate_all.dart b/pkg/analysis_server/tool/spec/generate_all.dart
index 00489bda37c3b65d209e694b310e072f6b4b1d32..74d4307763e9bf5687101df379bce08c3fa98a89 100644
--- a/pkg/analysis_server/tool/spec/generate_all.dart
+++ b/pkg/analysis_server/tool/spec/generate_all.dart
@@ -6,6 +6,7 @@ library generate.all;
import 'dart:io';
+import 'package:analyzer/src/codegen/tools.dart';
import 'package:path/path.dart';
import 'codegen_analysis_server.dart' as codegen_analysis_server;
@@ -13,10 +14,18 @@ import 'codegen_dart_protocol.dart' as codegen_dart_protocol;
import 'codegen_inttest_methods.dart' as codegen_inttest_methods;
import 'codegen_java_types.dart' as codegen_java_types;
import 'codegen_matchers.dart' as codegen_matchers;
-import 'codegen_tools.dart';
import 'to_html.dart' as to_html;
/**
+ * Generate all targets
+ */
+main() {
+ String script = Platform.script.toFilePath(windows: Platform.isWindows);
+ String pkgPath = normalize(join(dirname(script), '..', '..'));
+ GeneratedContent.generateAll(pkgPath, allTargets);
+}
+
+/**
* Get a list of all generated targets.
*/
List<GeneratedContent> get allTargets {
@@ -29,14 +38,3 @@ List<GeneratedContent> get allTargets {
targets.add(to_html.target);
return targets;
}
-
-/**
- * Generate all targets
- */
-main() {
- String script = Platform.script.toFilePath(windows: Platform.isWindows);
- Directory.current = new Directory(dirname(script));
- for (GeneratedContent generatedContent in allTargets) {
- generatedContent.generate();
- }
-}
« no previous file with comments | « pkg/analysis_server/tool/spec/from_html.dart ('k') | pkg/analysis_server/tool/spec/html_tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698