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

Side by Side Diff: pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart

Issue 2908523002: Add a getNavigation request for plugins (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /** 9 /**
10 * Convenience methods for running integration tests 10 * Convenience methods for running integration tests
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 * debugging the plugin. 122 * debugging the plugin.
123 */ 123 */
124 Stream<PluginErrorParams> onPluginError; 124 Stream<PluginErrorParams> onPluginError;
125 125
126 /** 126 /**
127 * Stream controller for [onPluginError]. 127 * Stream controller for [onPluginError].
128 */ 128 */
129 StreamController<PluginErrorParams> _onPluginError; 129 StreamController<PluginErrorParams> _onPluginError;
130 130
131 /** 131 /**
132 * Return the navigation information associated with the given region of the
133 * given file. If the navigation information for the given file has not yet
134 * been computed, or the most recently computed navigation information for
135 * the given file is out of date, then the response for this request will be
136 * delayed until it has been computed. If the content of the file changes
137 * after this request was received but before a response could be sent, then
138 * an error of type CONTENT_MODIFIED will be generated.
139 *
140 * If a navigation region overlaps (but extends either before or after) the
141 * given region of the file it will be included in the result. This means
142 * that it is theoretically possible to get the same navigation region in
143 * response to multiple requests. Clients can avoid this by always choosing a
144 * region that starts at the beginning of a line and ends at the end of a
145 * (possibly different) line in the file.
146 *
147 * Parameters
148 *
149 * file (FilePath)
150 *
151 * The file in which navigation information is being requested.
152 *
153 * offset (int)
154 *
155 * The offset of the region for which navigation information is being
156 * requested.
157 *
158 * length (int)
159 *
160 * The length of the region for which navigation information is being
161 * requested.
162 *
163 * Returns
164 *
165 * files (List<FilePath>)
166 *
167 * A list of the paths of files that are referenced by the navigation
168 * targets.
169 *
170 * targets (List<NavigationTarget>)
171 *
172 * A list of the navigation targets that are referenced by the navigation
173 * regions.
174 *
175 * regions (List<NavigationRegion>)
176 *
177 * A list of the navigation regions within the requested region of the
178 * file.
179 */
180 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(
181 String file, int offset, int length) async {
182 var params = new AnalysisGetNavigationParams(file, offset, length).toJson();
183 var result = await server.send("analysis.getNavigation", params);
184 ResponseDecoder decoder = new ResponseDecoder(null);
185 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result);
186 }
187
188 /**
132 * Used to inform the plugin of changes to files in the file system. Only 189 * Used to inform the plugin of changes to files in the file system. Only
133 * events associated with files that match the interestingFiles glob patterns 190 * events associated with files that match the interestingFiles glob patterns
134 * will be forwarded to the plugin. 191 * will be forwarded to the plugin.
135 * 192 *
136 * Parameters 193 * Parameters
137 * 194 *
138 * events (List<WatchEvent>) 195 * events (List<WatchEvent>)
139 * 196 *
140 * The watch events that the plugin should handle. 197 * The watch events that the plugin should handle.
141 */ 198 */
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 outOfTestExpect(params, isAnalysisOutlineParams); 814 outOfTestExpect(params, isAnalysisOutlineParams);
758 _onAnalysisOutline 815 _onAnalysisOutline
759 .add(new AnalysisOutlineParams.fromJson(decoder, 'params', params)); 816 .add(new AnalysisOutlineParams.fromJson(decoder, 'params', params));
760 break; 817 break;
761 default: 818 default:
762 fail('Unexpected notification: $event'); 819 fail('Unexpected notification: $event');
763 break; 820 break;
764 } 821 }
765 } 822 }
766 } 823 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698