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

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

Issue 672003002: Add package root setting to analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 return 846803925; 734 return 846803925;
735 } 735 }
736 } 736 }
737 737
738 /** 738 /**
739 * analysis.setAnalysisRoots params 739 * analysis.setAnalysisRoots params
740 * 740 *
741 * { 741 * {
742 * "included": List<FilePath> 742 * "included": List<FilePath>
743 * "excluded": List<FilePath> 743 * "excluded": List<FilePath>
744 * "packageRoots": optional Map<FilePath, FilePath>
744 * } 745 * }
745 */ 746 */
746 class AnalysisSetAnalysisRootsParams implements HasToJson { 747 class AnalysisSetAnalysisRootsParams implements HasToJson {
747 /** 748 /**
748 * A list of the files and directories that should be analyzed. 749 * A list of the files and directories that should be analyzed.
749 */ 750 */
750 List<String> included; 751 List<String> included;
751 752
752 /** 753 /**
753 * A list of the files and directories within the included directories that 754 * A list of the files and directories within the included directories that
754 * should not be analyzed. 755 * should not be analyzed.
755 */ 756 */
756 List<String> excluded; 757 List<String> excluded;
757 758
758 AnalysisSetAnalysisRootsParams(this.included, this.excluded); 759 /**
760 * A mapping from source directories to target directories that should
761 * override the normal package: URI resolution mechanism. The analyzer will
762 * behave as though each source directory in the map contains a special
763 * pubspec.yaml file which resolves any package: URI to the corresponding
764 * path within the target directory. The effect is the same as specifying the
765 * target directory as a "--package_root" parameter to the Dart VM when
766 * executing any Dart file inside the source directory.
767 *
768 * If this field is absent, or the empty map is specified, then all package:
769 * URI's are resolved the normal pubspec.yaml mechanism.
770 */
771 Map<String, String> packageRoots;
772
773 AnalysisSetAnalysisRootsParams(this.included, this.excluded, {this.packageRoot s});
759 774
760 factory AnalysisSetAnalysisRootsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 775 factory AnalysisSetAnalysisRootsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) {
761 if (json == null) { 776 if (json == null) {
762 json = {}; 777 json = {};
763 } 778 }
764 if (json is Map) { 779 if (json is Map) {
765 List<String> included; 780 List<String> included;
766 if (json.containsKey("included")) { 781 if (json.containsKey("included")) {
767 included = jsonDecoder._decodeList(jsonPath + ".included", json["include d"], jsonDecoder._decodeString); 782 included = jsonDecoder._decodeList(jsonPath + ".included", json["include d"], jsonDecoder._decodeString);
768 } else { 783 } else {
769 throw jsonDecoder.missingKey(jsonPath, "included"); 784 throw jsonDecoder.missingKey(jsonPath, "included");
770 } 785 }
771 List<String> excluded; 786 List<String> excluded;
772 if (json.containsKey("excluded")) { 787 if (json.containsKey("excluded")) {
773 excluded = jsonDecoder._decodeList(jsonPath + ".excluded", json["exclude d"], jsonDecoder._decodeString); 788 excluded = jsonDecoder._decodeList(jsonPath + ".excluded", json["exclude d"], jsonDecoder._decodeString);
774 } else { 789 } else {
775 throw jsonDecoder.missingKey(jsonPath, "excluded"); 790 throw jsonDecoder.missingKey(jsonPath, "excluded");
776 } 791 }
777 return new AnalysisSetAnalysisRootsParams(included, excluded); 792 Map<String, String> packageRoots;
793 if (json.containsKey("packageRoots")) {
794 packageRoots = jsonDecoder._decodeMap(jsonPath + ".packageRoots", json[" packageRoots"], valueDecoder: jsonDecoder._decodeString);
795 }
796 return new AnalysisSetAnalysisRootsParams(included, excluded, packageRoots : packageRoots);
778 } else { 797 } else {
779 throw jsonDecoder.mismatch(jsonPath, "analysis.setAnalysisRoots params"); 798 throw jsonDecoder.mismatch(jsonPath, "analysis.setAnalysisRoots params");
780 } 799 }
781 } 800 }
782 801
783 factory AnalysisSetAnalysisRootsParams.fromRequest(Request request) { 802 factory AnalysisSetAnalysisRootsParams.fromRequest(Request request) {
784 return new AnalysisSetAnalysisRootsParams.fromJson( 803 return new AnalysisSetAnalysisRootsParams.fromJson(
785 new RequestDecoder(request), "params", request._params); 804 new RequestDecoder(request), "params", request._params);
786 } 805 }
787 806
788 Map<String, dynamic> toJson() { 807 Map<String, dynamic> toJson() {
789 Map<String, dynamic> result = {}; 808 Map<String, dynamic> result = {};
790 result["included"] = included; 809 result["included"] = included;
791 result["excluded"] = excluded; 810 result["excluded"] = excluded;
811 if (packageRoots != null) {
812 result["packageRoots"] = packageRoots;
813 }
792 return result; 814 return result;
793 } 815 }
794 816
795 Request toRequest(String id) { 817 Request toRequest(String id) {
796 return new Request(id, "analysis.setAnalysisRoots", toJson()); 818 return new Request(id, "analysis.setAnalysisRoots", toJson());
797 } 819 }
798 820
799 @override 821 @override
800 String toString() => JSON.encode(toJson()); 822 String toString() => JSON.encode(toJson());
801 823
802 @override 824 @override
803 bool operator==(other) { 825 bool operator==(other) {
804 if (other is AnalysisSetAnalysisRootsParams) { 826 if (other is AnalysisSetAnalysisRootsParams) {
805 return _listEqual(included, other.included, (String a, String b) => a == b ) && 827 return _listEqual(included, other.included, (String a, String b) => a == b ) &&
806 _listEqual(excluded, other.excluded, (String a, String b) => a == b); 828 _listEqual(excluded, other.excluded, (String a, String b) => a == b) & &
829 _mapEqual(packageRoots, other.packageRoots, (String a, String b) => a == b);
807 } 830 }
808 return false; 831 return false;
809 } 832 }
810 833
811 @override 834 @override
812 int get hashCode { 835 int get hashCode {
813 int hash = 0; 836 int hash = 0;
814 hash = _JenkinsSmiHash.combine(hash, included.hashCode); 837 hash = _JenkinsSmiHash.combine(hash, included.hashCode);
815 hash = _JenkinsSmiHash.combine(hash, excluded.hashCode); 838 hash = _JenkinsSmiHash.combine(hash, excluded.hashCode);
839 hash = _JenkinsSmiHash.combine(hash, packageRoots.hashCode);
816 return _JenkinsSmiHash.finish(hash); 840 return _JenkinsSmiHash.finish(hash);
817 } 841 }
818 } 842 }
819 /** 843 /**
820 * analysis.setAnalysisRoots result 844 * analysis.setAnalysisRoots result
821 */ 845 */
822 class AnalysisSetAnalysisRootsResult { 846 class AnalysisSetAnalysisRootsResult {
823 Response toResponse(String id) { 847 Response toResponse(String id) {
824 return new Response(id, result: null); 848 return new Response(id, result: null);
825 } 849 }
(...skipping 9407 matching lines...) Expand 10 before | Expand all | Expand 10 after
10233 return false; 10257 return false;
10234 } 10258 }
10235 10259
10236 @override 10260 @override
10237 int get hashCode { 10261 int get hashCode {
10238 int hash = 0; 10262 int hash = 0;
10239 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10263 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10240 return _JenkinsSmiHash.finish(hash); 10264 return _JenkinsSmiHash.finish(hash);
10241 } 10265 }
10242 } 10266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698