Index: pkg/analysis_server/bin/fuzz/generated_protocol.dart |
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/bin/fuzz/generated_protocol.dart |
similarity index 98% |
copy from pkg/analysis_server/lib/src/generated_protocol.dart |
copy to pkg/analysis_server/bin/fuzz/generated_protocol.dart |
index 67eed941096b9c7ff0fad78c96c841fef6dedb62..21bc89698fdcf5d451575710e3b75bad4239da6a 100644 |
--- a/pkg/analysis_server/lib/src/generated_protocol.dart |
+++ b/pkg/analysis_server/bin/fuzz/generated_protocol.dart |
@@ -4396,12 +4396,6 @@ class AddContentOverlay implements HasToJson { |
* } |
*/ |
class AnalysisError implements HasToJson { |
- /** |
- * Returns a list of AnalysisErrors correponding to the given list of Engine |
- * errors. |
- */ |
- static List<AnalysisError> listFromEngine(engine.LineInfo lineInfo, List<engine.AnalysisError> errors) => |
- _analysisErrorListFromEngine(lineInfo, errors); |
/** |
* The severity of the error. |
@@ -4472,12 +4466,6 @@ class AnalysisError implements HasToJson { |
} |
} |
- /** |
- * Construct based on error information from the analyzer engine. |
- */ |
- factory AnalysisError.fromEngine(engine.LineInfo lineInfo, engine.AnalysisError error) => |
- _analysisErrorFromEngine(lineInfo, error); |
- |
Map<String, dynamic> toJson() { |
Map<String, dynamic> result = {}; |
result["severity"] = severity.toJson(); |
@@ -4572,13 +4560,6 @@ class AnalysisErrorFixes implements HasToJson { |
return result; |
} |
- /** |
- * Add a [Fix] |
- */ |
- void addFix(Fix fix) { |
- fixes.add(fix.change); |
- } |
- |
@override |
String toString() => JSON.encode(toJson()); |
@@ -5567,12 +5548,6 @@ class CompletionSuggestionKind { |
throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind"); |
} |
- /** |
- * Construct from an analyzer engine element kind. |
- */ |
- factory CompletionSuggestionKind.fromElementKind(engine.ElementKind kind) => |
- _completionSuggestionKindFromElementKind(kind); |
- |
@override |
String toString() => "CompletionSuggestionKind.$name"; |
@@ -5696,12 +5671,6 @@ class Element implements HasToJson { |
} |
} |
- /** |
- * Construct based on a value from the analyzer engine. |
- */ |
- factory Element.fromEngine(engine.Element element) => |
- elementFromEngine(element); |
- |
bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; |
bool get isConst => (flags & FLAG_CONST) != 0; |
bool get isFinal => (flags & FLAG_FINAL) != 0; |
@@ -5772,7 +5741,6 @@ class Element implements HasToJson { |
* LOCAL_VARIABLE |
* METHOD |
* PARAMETER |
- * PREFIX |
* SETTER |
* TOP_LEVEL_VARIABLE |
* TYPE_PARAMETER |
@@ -5808,8 +5776,6 @@ class ElementKind { |
static const PARAMETER = const ElementKind._("PARAMETER"); |
- static const PREFIX = const ElementKind._("PREFIX"); |
- |
static const SETTER = const ElementKind._("SETTER"); |
static const TOP_LEVEL_VARIABLE = const ElementKind._("TOP_LEVEL_VARIABLE"); |
@@ -5854,8 +5820,6 @@ class ElementKind { |
return METHOD; |
case "PARAMETER": |
return PARAMETER; |
- case "PREFIX": |
- return PREFIX; |
case "SETTER": |
return SETTER; |
case "TOP_LEVEL_VARIABLE": |
@@ -5883,12 +5847,6 @@ class ElementKind { |
throw jsonDecoder.mismatch(jsonPath, "ElementKind"); |
} |
- /** |
- * Construct based on a value from the analyzer engine. |
- */ |
- factory ElementKind.fromEngine(engine.ElementKind kind) => |
- _elementKindFromEngine(kind); |
- |
@override |
String toString() => "ElementKind.$name"; |
@@ -7027,30 +6985,6 @@ class Location implements HasToJson { |
} |
} |
- /** |
- * Create a Location based on an [engine.Element]. |
- */ |
- factory Location.fromElement(engine.Element element) => |
- _locationFromElement(element); |
- |
- /** |
- * Create a Location based on an [engine.SearchMatch]. |
- */ |
- factory Location.fromMatch(engine.SearchMatch match) => |
- _locationFromMatch(match); |
- |
- /** |
- * Create a Location based on an [engine.AstNode]. |
- */ |
- factory Location.fromNode(engine.AstNode node) => |
- _locationFromNode(node); |
- |
- /** |
- * Create a Location based on an [engine.CompilationUnit]. |
- */ |
- factory Location.fromUnit(engine.CompilationUnit unit, engine.SourceRange range) => |
- _locationFromUnit(unit, range); |
- |
Map<String, dynamic> toJson() { |
Map<String, dynamic> result = {}; |
result["file"] = file; |
@@ -7531,12 +7465,6 @@ class OverriddenMember implements HasToJson { |
} |
} |
- /** |
- * Construct based on an element from the analyzer engine. |
- */ |
- factory OverriddenMember.fromEngine(engine.Element member) => |
- _overriddenMemberFromEngine(member); |
- |
Map<String, dynamic> toJson() { |
Map<String, dynamic> result = {}; |
result["element"] = element.toJson(); |
@@ -7647,7 +7575,6 @@ class Position implements HasToJson { |
* EXTRACT_METHOD |
* INLINE_LOCAL_VARIABLE |
* INLINE_METHOD |
- * MOVE_FILE |
* RENAME |
* } |
*/ |
@@ -7664,8 +7591,6 @@ class RefactoringKind { |
static const INLINE_METHOD = const RefactoringKind._("INLINE_METHOD"); |
- static const MOVE_FILE = const RefactoringKind._("MOVE_FILE"); |
- |
static const RENAME = const RefactoringKind._("RENAME"); |
final String name; |
@@ -7686,8 +7611,6 @@ class RefactoringKind { |
return INLINE_LOCAL_VARIABLE; |
case "INLINE_METHOD": |
return INLINE_METHOD; |
- case "MOVE_FILE": |
- return MOVE_FILE; |
case "RENAME": |
return RENAME; |
} |
@@ -8436,12 +8359,6 @@ class SearchResult implements HasToJson { |
} |
} |
- /** |
- * Construct based on a value from the search engine. |
- */ |
- factory SearchResult.fromMatch(engine.SearchMatch match) => |
- searchResultFromMatch(match); |
- |
Map<String, dynamic> toJson() { |
Map<String, dynamic> result = {}; |
result["location"] = location.toJson(); |
@@ -8561,12 +8478,6 @@ class SearchResultKind { |
throw jsonDecoder.mismatch(jsonPath, "SearchResultKind"); |
} |
- /** |
- * Construct based on a value from the search engine. |
- */ |
- factory SearchResultKind.fromEngine(engine.MatchKind kind) => |
- _searchResultKindFromEngine(kind); |
- |
@override |
String toString() => "SearchResultKind.$name"; |
@@ -8704,19 +8615,6 @@ class SourceChange implements HasToJson { |
_addEditToSourceChange(this, file, fileStamp, edit); |
/** |
- * Adds [edit] to the [FileEdit] for the given [source]. |
- */ |
- void addSourceEdit(engine.AnalysisContext context, |
- engine.Source source, SourceEdit edit) => |
- _addSourceEditToSourceChange(this, context, source, edit); |
- |
- /** |
- * Adds [edit] to the [FileEdit] for the given [element]. |
- */ |
- void addElementEdit(engine.Element element, SourceEdit edit) => |
- _addElementEditToSourceChange(this, element, edit); |
- |
- /** |
* Adds the given [FileEdit]. |
*/ |
void addFileEdit(SourceFileEdit edit) { |
@@ -8842,12 +8740,6 @@ class SourceEdit implements HasToJson { |
} |
/** |
- * Construct based on a SourceRange. |
- */ |
- SourceEdit.range(engine.SourceRange range, String replacement, {String id}) |
- : this(range.offset, range.length, replacement, id: id); |
- |
- /** |
* The end of the region to be modified. |
*/ |
int get end => offset + length; |
@@ -9964,85 +9856,6 @@ 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 |