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

Side by Side Diff: pkg/analyzer_plugin/doc/api.html

Issue 2908523002: Add a getNavigation request for plugins (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/analyzer_plugin/lib/plugin/plugin.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html><html><head> 1 <!DOCTYPE html><html><head>
2 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <title>Analysis Server Plugin API Specification</title> 3 <title>Analysis Server Plugin API Specification</title>
4 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code +Pro|Roboto:500,400italic,300,400" type="text/css"><style>body { 4 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code +Pro|Roboto:500,400italic,300,400" type="text/css"><style>body {
5 font-family: 'Roboto', sans-serif; 5 font-family: 'Roboto', sans-serif;
6 max-width: 800px; 6 max-width: 800px;
7 margin: 0 auto; 7 margin: 0 auto;
8 padding: 0 16px; 8 padding: 0 16px;
9 font-size: 16px; 9 font-size: 16px;
10 line-height: 1.5; 10 line-height: 1.5;
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 276
277 277
278 278
279 279
280 280
281 281
282 282
283 283
284 284
285 <h3>Requests</h3><dl><dt class="request"><a name="request_analysis.handleWatchEv ents">analysis.handleWatchEvents</a> (<a href="#request_analysis.handleWatchEven ts">#</a>)</dt><dd><div class="box"><pre>request: { 285
286 <h3>Requests</h3><dl><dt class="request"><a name="request_analysis.getNavigation ">analysis.getNavigation</a> (<a href="#request_analysis.getNavigation">#</a>)</ dt><dd><div class="box"><pre>request: {
287 "id": String
288 "method": "analysis.getNavigation"
289 "params": {
290 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
291 "<b>offset</b>": int
292 "<b>length</b>": int
293 }
294 }</pre><br><pre>response: {
295 "id": String
296 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
297 "result": {
298 "<b>files</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
299 "<b>targets</b>": List&lt;<a href="#type_NavigationTarget">NavigationTarget< /a>&gt;
300 "<b>regions</b>": List&lt;<a href="#type_NavigationRegion">NavigationRegion< /a>&gt;
301 }
302 }</pre></div>
303 <p>
304 Return the navigation information associated with the given region of
305 the given file. If the navigation information for the given file has
306 not yet been computed, or the most recently computed navigation
307 information for the given file is out of date, then the response for
308 this request will be delayed until it has been computed. If the
309 content of the file changes after this request was received but before
310 a response could be sent, then an error of type
311 <tt>CONTENT_MODIFIED</tt> will be generated.
312 </p>
313 <p>
314 If a navigation region overlaps (but extends either before or after)
315 the given region of the file it will be included in the result. This
316 means that it is theoretically possible to get the same navigation
317 region in response to multiple requests. Clients can avoid this by
318 always choosing a region that starts at the beginning of a line and
319 ends at the end of a (possibly different) line in the file.
320 </p>
321
322
323 <h4>parameters:</h4><dl><dt class="field"><b>file (<a href="#type_FilePath">Fi lePath</a>)</b></dt><dd>
324
325 <p>
326 The file in which navigation information is being requested.
327 </p>
328 </dd><dt class="field"><b>offset (int)</b></dt><dd>
329
330 <p>
331 The offset of the region for which navigation information is being
332 requested.
333 </p>
334 </dd><dt class="field"><b>length (int)</b></dt><dd>
335
336 <p>
337 The length of the region for which navigation information is being
338 requested.
339 </p>
340 </dd></dl><h4>returns:</h4><dl><dt class="field"><b>files (List&lt;<a href ="#type_FilePath">FilePath</a>&gt;)</b></dt><dd>
341
342 <p>
343 A list of the paths of files that are referenced by the navigation
344 targets.
345 </p>
346 </dd><dt class="field"><b>targets (List&lt;<a href="#type_NavigationTarget ">NavigationTarget</a>&gt;)</b></dt><dd>
347
348 <p>
349 A list of the navigation targets that are referenced by the
350 navigation regions.
351 </p>
352 </dd><dt class="field"><b>regions (List&lt;<a href="#type_NavigationRegion ">NavigationRegion</a>&gt;)</b></dt><dd>
353
354 <p>
355 A list of the navigation regions within the requested region of
356 the file.
357 </p>
358 </dd></dl></dd><dt class="request"><a name="request_analysis.handleWatchEv ents">analysis.handleWatchEvents</a> (<a href="#request_analysis.handleWatchEven ts">#</a>)</dt><dd><div class="box"><pre>request: {
286 "id": String 359 "id": String
287 "method": "analysis.handleWatchEvents" 360 "method": "analysis.handleWatchEvents"
288 "params": { 361 "params": {
289 "<b>events</b>": List&lt;<a href="#type_WatchEvent">WatchEvent</a>&gt; 362 "<b>events</b>": List&lt;<a href="#type_WatchEvent">WatchEvent</a>&gt;
290 } 363 }
291 }</pre><br><pre>response: { 364 }</pre><br><pre>response: {
292 "id": String 365 "id": String
293 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a> 366 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
294 }</pre></div> 367 }</pre></div>
295 <p> 368 <p>
(...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 <p> 2561 <p>
2489 The old name of the element before the refactoring. 2562 The old name of the element before the refactoring.
2490 </p> 2563 </p>
2491 </dd></dl><h4>Options:</h4><dl><dt class="field"><b>newName (String)</b></ dt><dd> 2564 </dd></dl><h4>Options:</h4><dl><dt class="field"><b>newName (String)</b></ dt><dd>
2492 2565
2493 <p> 2566 <p>
2494 The name that the element should have after the refactoring. 2567 The name that the element should have after the refactoring.
2495 </p> 2568 </p>
2496 </dd></dl></dd></dl> 2569 </dd></dl></dd></dl>
2497 <h2 class="domain"><a name="index">Index</a></h2> 2570 <h2 class="domain"><a name="index">Index</a></h2>
2498 <h3>Domains</h3><h4>plugin (<a href="#domain_plugin">↑</a>)</h4><div class="subi ndex"><h5>Requests</h5><ul><li><a href="#request_plugin.versionCheck">versionChe ck</a></li><li><a href="#request_plugin.shutdown">shutdown</a></li></ul><h5>Noti fications</h5><div class="subindex"><ul><li><a href="#notification_plugin.error" >error</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)< /h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.ha ndleWatchEvents">handleWatchEvents</a></li><li><a href="#request_analysis.reanal yze">reanalyze</a></li><li><a href="#request_analysis.setContextBuilderOptions"> setContextBuilderOptions</a></li><li><a href="#request_analysis.setContextRoots" >setContextRoots</a></li><li><a href="#request_analysis.setPriorityFiles">setPri orityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscript ions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li ></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification _analysis.errors">errors</a></li><li><a href="#notification_analysis.folding">fo lding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li ><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href= "#notification_analysis.occurrences">occurrences</a></li><li><a href="#notificat ion_analysis.outline">outline</a></li></ul></div></div><h4>completion (<a href=" #domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul></div><h4 >edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5> <ul><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#requ est_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href= "#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactor ing">getRefactoring</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><d iv class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay< /a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#ty pe_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErr orSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType"> AnalysisErrorType</a></li><li><a href="#type_AnalysisService">AnalysisService</a ></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li> <a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="# type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#ty pe_ContextBuilderOptions">ContextBuilderOptions</a></li><li><a href="#type_Conte xtRoot">ContextRoot</a></li><li><a href="#type_Element">Element</a></li><li><a h ref="#type_ElementKind">ElementKind</a></li><li><a href="#type_FilePath">FilePat h</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type _FoldingRegion">FoldingRegion</a></li><li><a href="#type_HighlightRegion">Highli ghtRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a ></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="# type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_Linke dEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Locatio n">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></l i><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#ty pe_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li> <li><a href="#type_Position">Position</a></li><li><a href="#type_PrioritizedSour ceChange">PrioritizedSourceChange</a></li><li><a href="#type_RefactoringFeedback ">RefactoringFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKin d</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParame ter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethod ParameterKind</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions< /a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li> <a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="# type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">Req uestErrorCode</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li> <a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit" >SourceFileEdit</a></li><li><a href="#type_WatchEvent">WatchEvent</a></li><li><a href="#type_WatchEventType">WatchEventType</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refa ctoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href=" #refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a h ref="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactor ing_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactori ng_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOV E_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div> 2571 <h3>Domains</h3><h4>plugin (<a href="#domain_plugin">↑</a>)</h4><div class="subi ndex"><h5>Requests</h5><ul><li><a href="#request_plugin.versionCheck">versionChe ck</a></li><li><a href="#request_plugin.shutdown">shutdown</a></li></ul><h5>Noti fications</h5><div class="subindex"><ul><li><a href="#notification_plugin.error" >error</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)< /h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.ge tNavigation">getNavigation</a></li><li><a href="#request_analysis.handleWatchEve nts">handleWatchEvents</a></li><li><a href="#request_analysis.reanalyze">reanaly ze</a></li><li><a href="#request_analysis.setContextBuilderOptions">setContextBu ilderOptions</a></li><li><a href="#request_analysis.setContextRoots">setContextR oots</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</ a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li ><li><a href="#request_analysis.updateContent">updateContent</a></li></ul><h5>No tifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.er rors">errors</a></li><li><a href="#notification_analysis.folding">folding</a></l i><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href ="#notification_analysis.navigation">navigation</a></li><li><a href="#notificati on_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis .outline">outline</a></li></ul></div></div><h4>completion (<a href="#domain_comp letion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#requ est_completion.getSuggestions">getSuggestions</a></li></ul></div><h4>edit (<a hr ef="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a h ref="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.get AvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_ed it.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefa ctoring</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="su bindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li> <a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisE rrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity"> AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErro rType</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#ty pe_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_Complet ionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextBu ilderOptions">ContextBuilderOptions</a></li><li><a href="#type_ContextRoot">Cont extRoot</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_E lementKind">ElementKind</a></li><li><a href="#type_FilePath">FilePath</a></li><l i><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegi on">FoldingRegion</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a ></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedE ditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggest ionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location< /a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a hre f="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrenc es">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href= "#type_Position">Position</a></li><li><a href="#type_PrioritizedSourceChange">Pr ioritizedSourceChange</a></li><li><a href="#type_RefactoringFeedback">Refactorin gFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><l i><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li> <li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKin d</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li> <a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type _RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#ty pe_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_Request Error">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCod e</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#ty pe_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileE dit</a></li><li><a href="#type_WatchEvent">WatchEvent</a></li><li><a href="#type _WatchEventType">WatchEventType</a></li></ul></div><h3>Refactorings (<a href="#r efactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONV ERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring _CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refact oring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refac toring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_L OCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_ME THOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></ li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
2499 2572
2500 2573
2501 </body></html> 2574 </body></html>
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_plugin/lib/plugin/plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698