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

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

Issue 539353002: Use RefactoringFeedback objects in Java. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months 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
Index: pkg/analysis_server/tool/spec/codegen_java_types.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_java_types.dart b/pkg/analysis_server/tool/spec/codegen_java_types.dart
index 423545eff01eb828d867210eb303bdf66440a3aa..49210cecb5b62d4711b8e90d2d538909a5e401c2 100644
--- a/pkg/analysis_server/tool/spec/codegen_java_types.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java_types.dart
@@ -302,7 +302,9 @@ class CodegenJavaType extends CodegenJavaVisitor {
//
// fromJson(JsonArray) factory constructor
//
- if (className != 'Outline' && className != 'RefactoringOptions') {
+ if (className != 'Outline' &&
+ className != 'RefactoringFeedback' &&
+ className != 'RefactoringOptions') {
publicMethod('fromJsonArray', () {
writeln(
'public static List<${className}> fromJsonArray(JsonArray jsonArray) {');
@@ -615,9 +617,10 @@ final GeneratedDirectory targetDir = new GeneratedDirectory(pathToGenTypes, () {
for (ImpliedType impliedType in impliedTypes.values) {
TypeDecl type = impliedType.type;
String typeNameInSpec = capitalize(impliedType.camelName);
+ bool isRefactoringFeedback = impliedType.kind == 'refactoringFeedback';
bool isRefactoringOption = impliedType.kind == 'refactoringOptions';
if (impliedType.kind == 'typeDefinition' ||
- impliedType.kind == 'refactoringFeedback' ||
+ isRefactoringFeedback ||
isRefactoringOption) {
TypeDecl type = impliedType.type;
if (type is TypeObject || type is TypeEnum) {
@@ -629,6 +632,9 @@ final GeneratedDirectory targetDir = new GeneratedDirectory(pathToGenTypes, () {
}
map['${typeNameInJava}.java'] = () {
String superclassName = null;
+ if (isRefactoringFeedback) {
+ superclassName = 'RefactoringFeedback';
+ }
if (isRefactoringOption) {
superclassName = 'RefactoringOptions';
}
« no previous file with comments | « editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698