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

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 628293004: Remove references to Engine classes from protocol.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 4500 matching lines...) Expand 10 before | Expand all | Expand 10 after
4511 * { 4511 * {
4512 * "severity": AnalysisErrorSeverity 4512 * "severity": AnalysisErrorSeverity
4513 * "type": AnalysisErrorType 4513 * "type": AnalysisErrorType
4514 * "location": Location 4514 * "location": Location
4515 * "message": String 4515 * "message": String
4516 * "correction": optional String 4516 * "correction": optional String
4517 * } 4517 * }
4518 */ 4518 */
4519 class AnalysisError implements HasToJson { 4519 class AnalysisError implements HasToJson {
4520 /** 4520 /**
4521 * Returns a list of AnalysisErrors correponding to the given list of Engine
4522 * errors.
4523 */
4524 static List<AnalysisError> listFromEngine(engine.LineInfo lineInfo, List<engin e.AnalysisError> errors) =>
4525 _analysisErrorListFromEngine(lineInfo, errors);
4526
4527 /**
4528 * The severity of the error. 4521 * The severity of the error.
4529 */ 4522 */
4530 AnalysisErrorSeverity severity; 4523 AnalysisErrorSeverity severity;
4531 4524
4532 /** 4525 /**
4533 * The type of the error. 4526 * The type of the error.
4534 */ 4527 */
4535 AnalysisErrorType type; 4528 AnalysisErrorType type;
4536 4529
4537 /** 4530 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
4586 String correction; 4579 String correction;
4587 if (json.containsKey("correction")) { 4580 if (json.containsKey("correction")) {
4588 correction = jsonDecoder._decodeString(jsonPath + ".correction", json["c orrection"]); 4581 correction = jsonDecoder._decodeString(jsonPath + ".correction", json["c orrection"]);
4589 } 4582 }
4590 return new AnalysisError(severity, type, location, message, correction: co rrection); 4583 return new AnalysisError(severity, type, location, message, correction: co rrection);
4591 } else { 4584 } else {
4592 throw jsonDecoder.mismatch(jsonPath, "AnalysisError"); 4585 throw jsonDecoder.mismatch(jsonPath, "AnalysisError");
4593 } 4586 }
4594 } 4587 }
4595 4588
4596 /**
4597 * Construct based on error information from the analyzer engine.
4598 */
4599 factory AnalysisError.fromEngine(engine.LineInfo lineInfo, engine.AnalysisErro r error) =>
4600 _analysisErrorFromEngine(lineInfo, error);
4601
4602 Map<String, dynamic> toJson() { 4589 Map<String, dynamic> toJson() {
4603 Map<String, dynamic> result = {}; 4590 Map<String, dynamic> result = {};
4604 result["severity"] = severity.toJson(); 4591 result["severity"] = severity.toJson();
4605 result["type"] = type.toJson(); 4592 result["type"] = type.toJson();
4606 result["location"] = location.toJson(); 4593 result["location"] = location.toJson();
4607 result["message"] = message; 4594 result["message"] = message;
4608 if (correction != null) { 4595 if (correction != null) {
4609 result["correction"] = correction; 4596 result["correction"] = correction;
4610 } 4597 }
4611 return result; 4598 return result;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 } 4673 }
4687 } 4674 }
4688 4675
4689 Map<String, dynamic> toJson() { 4676 Map<String, dynamic> toJson() {
4690 Map<String, dynamic> result = {}; 4677 Map<String, dynamic> result = {};
4691 result["error"] = error.toJson(); 4678 result["error"] = error.toJson();
4692 result["fixes"] = fixes.map((SourceChange value) => value.toJson()).toList() ; 4679 result["fixes"] = fixes.map((SourceChange value) => value.toJson()).toList() ;
4693 return result; 4680 return result;
4694 } 4681 }
4695 4682
4696 /**
4697 * Add a [Fix]
4698 */
4699 void addFix(Fix fix) {
4700 fixes.add(fix.change);
4701 }
4702
4703 @override 4683 @override
4704 String toString() => JSON.encode(toJson()); 4684 String toString() => JSON.encode(toJson());
4705 4685
4706 @override 4686 @override
4707 bool operator==(other) { 4687 bool operator==(other) {
4708 if (other is AnalysisErrorFixes) { 4688 if (other is AnalysisErrorFixes) {
4709 return error == other.error && 4689 return error == other.error &&
4710 _listEqual(fixes, other.fixes, (SourceChange a, SourceChange b) => a = = b); 4690 _listEqual(fixes, other.fixes, (SourceChange a, SourceChange b) => a = = b);
4711 } 4691 }
4712 return false; 4692 return false;
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 if (json is String) { 5650 if (json is String) {
5671 try { 5651 try {
5672 return new CompletionSuggestionKind(json); 5652 return new CompletionSuggestionKind(json);
5673 } catch(_) { 5653 } catch(_) {
5674 // Fall through 5654 // Fall through
5675 } 5655 }
5676 } 5656 }
5677 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind"); 5657 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind");
5678 } 5658 }
5679 5659
5680 /**
5681 * Construct from an analyzer engine element kind.
5682 */
5683 factory CompletionSuggestionKind.fromElementKind(engine.ElementKind kind) =>
5684 _completionSuggestionKindFromElementKind(kind);
5685
5686 @override 5660 @override
5687 String toString() => "CompletionSuggestionKind.$name"; 5661 String toString() => "CompletionSuggestionKind.$name";
5688 5662
5689 String toJson() => name; 5663 String toJson() => name;
5690 } 5664 }
5691 5665
5692 /** 5666 /**
5693 * Element 5667 * Element
5694 * 5668 *
5695 * { 5669 * {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5799 String returnType; 5773 String returnType;
5800 if (json.containsKey("returnType")) { 5774 if (json.containsKey("returnType")) {
5801 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]); 5775 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]);
5802 } 5776 }
5803 return new Element(kind, name, flags, location: location, parameters: para meters, returnType: returnType); 5777 return new Element(kind, name, flags, location: location, parameters: para meters, returnType: returnType);
5804 } else { 5778 } else {
5805 throw jsonDecoder.mismatch(jsonPath, "Element"); 5779 throw jsonDecoder.mismatch(jsonPath, "Element");
5806 } 5780 }
5807 } 5781 }
5808 5782
5809 /**
5810 * Construct based on a value from the analyzer engine.
5811 */
5812 factory Element.fromEngine(engine.Element element) =>
5813 elementFromEngine(element);
5814
5815 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; 5783 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0;
5816 bool get isConst => (flags & FLAG_CONST) != 0; 5784 bool get isConst => (flags & FLAG_CONST) != 0;
5817 bool get isFinal => (flags & FLAG_FINAL) != 0; 5785 bool get isFinal => (flags & FLAG_FINAL) != 0;
5818 bool get isStatic => (flags & FLAG_STATIC) != 0; 5786 bool get isStatic => (flags & FLAG_STATIC) != 0;
5819 bool get isPrivate => (flags & FLAG_PRIVATE) != 0; 5787 bool get isPrivate => (flags & FLAG_PRIVATE) != 0;
5820 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0; 5788 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0;
5821 5789
5822 Map<String, dynamic> toJson() { 5790 Map<String, dynamic> toJson() {
5823 Map<String, dynamic> result = {}; 5791 Map<String, dynamic> result = {};
5824 result["kind"] = kind.toJson(); 5792 result["kind"] = kind.toJson();
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
5986 if (json is String) { 5954 if (json is String) {
5987 try { 5955 try {
5988 return new ElementKind(json); 5956 return new ElementKind(json);
5989 } catch(_) { 5957 } catch(_) {
5990 // Fall through 5958 // Fall through
5991 } 5959 }
5992 } 5960 }
5993 throw jsonDecoder.mismatch(jsonPath, "ElementKind"); 5961 throw jsonDecoder.mismatch(jsonPath, "ElementKind");
5994 } 5962 }
5995 5963
5996 /**
5997 * Construct based on a value from the analyzer engine.
5998 */
5999 factory ElementKind.fromEngine(engine.ElementKind kind) =>
6000 _elementKindFromEngine(kind);
6001
6002 @override 5964 @override
6003 String toString() => "ElementKind.$name"; 5965 String toString() => "ElementKind.$name";
6004 5966
6005 String toJson() => name; 5967 String toJson() => name;
6006 } 5968 }
6007 5969
6008 /** 5970 /**
6009 * ExecutableFile 5971 * ExecutableFile
6010 * 5972 *
6011 * { 5973 * {
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
7135 startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["st artColumn"]); 7097 startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["st artColumn"]);
7136 } else { 7098 } else {
7137 throw jsonDecoder.missingKey(jsonPath, "startColumn"); 7099 throw jsonDecoder.missingKey(jsonPath, "startColumn");
7138 } 7100 }
7139 return new Location(file, offset, length, startLine, startColumn); 7101 return new Location(file, offset, length, startLine, startColumn);
7140 } else { 7102 } else {
7141 throw jsonDecoder.mismatch(jsonPath, "Location"); 7103 throw jsonDecoder.mismatch(jsonPath, "Location");
7142 } 7104 }
7143 } 7105 }
7144 7106
7145 /**
7146 * Create a Location based on an [engine.Element].
7147 */
7148 factory Location.fromElement(engine.Element element) =>
7149 _locationFromElement(element);
7150
7151 /**
7152 * Create a Location based on an [engine.SearchMatch].
7153 */
7154 factory Location.fromMatch(engine.SearchMatch match) =>
7155 _locationFromMatch(match);
7156
7157 /**
7158 * Create a Location based on an [engine.AstNode].
7159 */
7160 factory Location.fromNode(engine.AstNode node) =>
7161 _locationFromNode(node);
7162
7163 /**
7164 * Create a Location based on an [engine.CompilationUnit].
7165 */
7166 factory Location.fromUnit(engine.CompilationUnit unit, engine.SourceRange rang e) =>
7167 _locationFromUnit(unit, range);
7168
7169 Map<String, dynamic> toJson() { 7107 Map<String, dynamic> toJson() {
7170 Map<String, dynamic> result = {}; 7108 Map<String, dynamic> result = {};
7171 result["file"] = file; 7109 result["file"] = file;
7172 result["offset"] = offset; 7110 result["offset"] = offset;
7173 result["length"] = length; 7111 result["length"] = length;
7174 result["startLine"] = startLine; 7112 result["startLine"] = startLine;
7175 result["startColumn"] = startColumn; 7113 result["startColumn"] = startColumn;
7176 return result; 7114 return result;
7177 } 7115 }
7178 7116
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
7627 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla ssName"]); 7565 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla ssName"]);
7628 } else { 7566 } else {
7629 throw jsonDecoder.missingKey(jsonPath, "className"); 7567 throw jsonDecoder.missingKey(jsonPath, "className");
7630 } 7568 }
7631 return new OverriddenMember(element, className); 7569 return new OverriddenMember(element, className);
7632 } else { 7570 } else {
7633 throw jsonDecoder.mismatch(jsonPath, "OverriddenMember"); 7571 throw jsonDecoder.mismatch(jsonPath, "OverriddenMember");
7634 } 7572 }
7635 } 7573 }
7636 7574
7637 /**
7638 * Construct based on an element from the analyzer engine.
7639 */
7640 factory OverriddenMember.fromEngine(engine.Element member) =>
7641 _overriddenMemberFromEngine(member);
7642
7643 Map<String, dynamic> toJson() { 7575 Map<String, dynamic> toJson() {
7644 Map<String, dynamic> result = {}; 7576 Map<String, dynamic> result = {};
7645 result["element"] = element.toJson(); 7577 result["element"] = element.toJson();
7646 result["className"] = className; 7578 result["className"] = className;
7647 return result; 7579 return result;
7648 } 7580 }
7649 7581
7650 @override 7582 @override
7651 String toString() => JSON.encode(toJson()); 7583 String toString() => JSON.encode(toJson());
7652 7584
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
8555 path = jsonDecoder._decodeList(jsonPath + ".path", json["path"], (String jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json)); 8487 path = jsonDecoder._decodeList(jsonPath + ".path", json["path"], (String jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json));
8556 } else { 8488 } else {
8557 throw jsonDecoder.missingKey(jsonPath, "path"); 8489 throw jsonDecoder.missingKey(jsonPath, "path");
8558 } 8490 }
8559 return new SearchResult(location, kind, isPotential, path); 8491 return new SearchResult(location, kind, isPotential, path);
8560 } else { 8492 } else {
8561 throw jsonDecoder.mismatch(jsonPath, "SearchResult"); 8493 throw jsonDecoder.mismatch(jsonPath, "SearchResult");
8562 } 8494 }
8563 } 8495 }
8564 8496
8565 /**
8566 * Construct based on a value from the search engine.
8567 */
8568 factory SearchResult.fromMatch(engine.SearchMatch match) =>
8569 searchResultFromMatch(match);
8570
8571 Map<String, dynamic> toJson() { 8497 Map<String, dynamic> toJson() {
8572 Map<String, dynamic> result = {}; 8498 Map<String, dynamic> result = {};
8573 result["location"] = location.toJson(); 8499 result["location"] = location.toJson();
8574 result["kind"] = kind.toJson(); 8500 result["kind"] = kind.toJson();
8575 result["isPotential"] = isPotential; 8501 result["isPotential"] = isPotential;
8576 result["path"] = path.map((Element value) => value.toJson()).toList(); 8502 result["path"] = path.map((Element value) => value.toJson()).toList();
8577 return result; 8503 return result;
8578 } 8504 }
8579 8505
8580 @override 8506 @override
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
8680 if (json is String) { 8606 if (json is String) {
8681 try { 8607 try {
8682 return new SearchResultKind(json); 8608 return new SearchResultKind(json);
8683 } catch(_) { 8609 } catch(_) {
8684 // Fall through 8610 // Fall through
8685 } 8611 }
8686 } 8612 }
8687 throw jsonDecoder.mismatch(jsonPath, "SearchResultKind"); 8613 throw jsonDecoder.mismatch(jsonPath, "SearchResultKind");
8688 } 8614 }
8689 8615
8690 /**
8691 * Construct based on a value from the search engine.
8692 */
8693 factory SearchResultKind.fromEngine(engine.MatchKind kind) =>
8694 _searchResultKindFromEngine(kind);
8695
8696 @override 8616 @override
8697 String toString() => "SearchResultKind.$name"; 8617 String toString() => "SearchResultKind.$name";
8698 8618
8699 String toJson() => name; 8619 String toJson() => name;
8700 } 8620 }
8701 8621
8702 /** 8622 /**
8703 * ServerService 8623 * ServerService
8704 * 8624 *
8705 * enum { 8625 * enum {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
8823 return result; 8743 return result;
8824 } 8744 }
8825 8745
8826 /** 8746 /**
8827 * Adds [edit] to the [FileEdit] for the given [file]. 8747 * Adds [edit] to the [FileEdit] for the given [file].
8828 */ 8748 */
8829 void addEdit(String file, int fileStamp, SourceEdit edit) => 8749 void addEdit(String file, int fileStamp, SourceEdit edit) =>
8830 _addEditToSourceChange(this, file, fileStamp, edit); 8750 _addEditToSourceChange(this, file, fileStamp, edit);
8831 8751
8832 /** 8752 /**
8833 * Adds [edit] to the [FileEdit] for the given [source].
8834 */
8835 void addSourceEdit(engine.AnalysisContext context,
8836 engine.Source source, SourceEdit edit) =>
8837 _addSourceEditToSourceChange(this, context, source, edit);
8838
8839 /**
8840 * Adds [edit] to the [FileEdit] for the given [element].
8841 */
8842 void addElementEdit(engine.Element element, SourceEdit edit) =>
8843 _addElementEditToSourceChange(this, element, edit);
8844
8845 /**
8846 * Adds the given [FileEdit]. 8753 * Adds the given [FileEdit].
8847 */ 8754 */
8848 void addFileEdit(SourceFileEdit edit) { 8755 void addFileEdit(SourceFileEdit edit) {
8849 edits.add(edit); 8756 edits.add(edit);
8850 } 8757 }
8851 8758
8852 /** 8759 /**
8853 * Adds the given [LinkedEditGroup]. 8760 * Adds the given [LinkedEditGroup].
8854 */ 8761 */
8855 void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) { 8762 void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
8961 if (json.containsKey("id")) { 8868 if (json.containsKey("id")) {
8962 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); 8869 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
8963 } 8870 }
8964 return new SourceEdit(offset, length, replacement, id: id); 8871 return new SourceEdit(offset, length, replacement, id: id);
8965 } else { 8872 } else {
8966 throw jsonDecoder.mismatch(jsonPath, "SourceEdit"); 8873 throw jsonDecoder.mismatch(jsonPath, "SourceEdit");
8967 } 8874 }
8968 } 8875 }
8969 8876
8970 /** 8877 /**
8971 * Construct based on a SourceRange.
8972 */
8973 SourceEdit.range(engine.SourceRange range, String replacement, {String id})
8974 : this(range.offset, range.length, replacement, id: id);
8975
8976 /**
8977 * The end of the region to be modified. 8878 * The end of the region to be modified.
8978 */ 8879 */
8979 int get end => offset + length; 8880 int get end => offset + length;
8980 8881
8981 Map<String, dynamic> toJson() { 8882 Map<String, dynamic> toJson() {
8982 Map<String, dynamic> result = {}; 8883 Map<String, dynamic> result = {};
8983 result["offset"] = offset; 8884 result["offset"] = offset;
8984 result["length"] = length; 8885 result["length"] = length;
8985 result["replacement"] = replacement; 8886 result["replacement"] = replacement;
8986 if (id != null) { 8887 if (id != null) {
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
10327 return false; 10228 return false;
10328 } 10229 }
10329 10230
10330 @override 10231 @override
10331 int get hashCode { 10232 int get hashCode {
10332 int hash = 0; 10233 int hash = 0;
10333 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10234 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10334 return _JenkinsSmiHash.finish(hash); 10235 return _JenkinsSmiHash.finish(hash);
10335 } 10236 }
10336 } 10237 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698