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

Unified Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 587553002: API proposal for the MOVE_FILE refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add MoveFileOptions.java 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/lib/src/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index 1966430871184268596fb1ce652206bef9d12d0f..8da18cf61ca1dbec94bdb8f2ba3eb8c319f75104 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -9959,6 +9959,85 @@ class InlineMethodOptions extends RefactoringOptions implements HasToJson {
return _JenkinsSmiHash.finish(hash);
}
}
+/**
+ * moveFile feedback
+ */
+class MoveFileFeedback {
+ @override
+ bool operator==(other) {
+ if (other is MoveFileFeedback) {
+ return true;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ return 438975893;
+ }
+}
+
+/**
+ * moveFile options
+ *
+ * {
+ * "newFile": FilePath
+ * }
+ */
+class MoveFileOptions extends RefactoringOptions implements HasToJson {
+ /**
+ * The new file path to which the given file is being moved.
+ */
+ String newFile;
+
+ MoveFileOptions(this.newFile);
+
+ factory MoveFileOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ String newFile;
+ if (json.containsKey("newFile")) {
+ newFile = jsonDecoder._decodeString(jsonPath + ".newFile", json["newFile"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "newFile");
+ }
+ return new MoveFileOptions(newFile);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "moveFile options");
+ }
+ }
+
+ factory MoveFileOptions.fromRefactoringParams(EditGetRefactoringParams refactoringParams, Request request) {
+ return new MoveFileOptions.fromJson(
+ new RequestDecoder(request), "options", refactoringParams.options);
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["newFile"] = newFile;
+ return result;
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is MoveFileOptions) {
+ return newFile == other.newFile;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = _JenkinsSmiHash.combine(hash, newFile.hashCode);
+ return _JenkinsSmiHash.finish(hash);
+ }
+}
/**
* rename feedback

Powered by Google App Engine
This is Rietveld 408576698