5731ca607a
R=jwren@google.com Review URL: https://codereview.chromium.org//468563003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39160 260f80e4-7a28-3924-810f-c04153c831b5
2981 lines
126 KiB
HTML
2981 lines
126 KiB
HTML
<html><head>
|
||
<meta charset="UTF-8">
|
||
<title>Analysis Server API Specification</title>
|
||
<style>h1 {
|
||
text-align: center;
|
||
}
|
||
pre {
|
||
margin: 0px;
|
||
}
|
||
div.box {
|
||
border: 1px solid rgb(0, 0, 0);
|
||
background-color: rgb(207, 226, 243);
|
||
padding: 0.5em;
|
||
}
|
||
dt {
|
||
margin-top: 1em;
|
||
margin-bottom: 1em;
|
||
}
|
||
div.hangingIndent {
|
||
padding-left: 3em;
|
||
text-indent: -3em;
|
||
}
|
||
</style></head>
|
||
<body>
|
||
<h1>Analysis Server API Specification</h1>
|
||
<h1 style="color:#999999">WORKING DRAFT - Version 0.3</h1>
|
||
<p>
|
||
This document contains a specification of the API provided by
|
||
the analysis server. The API in this document is currently under
|
||
development and should be expected to change. In some cases
|
||
those changes will be substantial.
|
||
</p>
|
||
<h2>Overview</h2>
|
||
<p>
|
||
The analysis server API is a bi-directional client-server
|
||
API. The API is independent of the transport mechanism used, but
|
||
is heavily influenced by a model in which sockets or character
|
||
streams are used to transport JSON-RPC encoded information.
|
||
</p>
|
||
<h3>Transport Mechanism</h3>
|
||
<p>
|
||
The characters passed to the server are expected to be encoded
|
||
using UTF-8.
|
||
</p>
|
||
<p>
|
||
When character streams are used as the transport, messages are
|
||
delineated by newlines. This means, in particular, that the JSON
|
||
encoding process must not introduce newlines within a
|
||
message. Note however that newlines are used in this document
|
||
for readability.
|
||
</p>
|
||
<p>
|
||
To ease interoperability with Lisp-based clients (which may not
|
||
be able to easily distinguish between empty lists, empty maps,
|
||
and null), client-to-server communication is allowed to replace
|
||
any instance of “<tt>{}</tt>” or “<tt>[]</tt>” with null. The
|
||
server will always properly represent empty lists as
|
||
“<tt>[]</tt>” and empty maps as “<tt>{}</tt>”.
|
||
</p>
|
||
<h3>Communication Structure</h3>
|
||
<p>
|
||
Clients can make a request of the server and the server will
|
||
provide a response for each request that it receives. While many
|
||
of the requests that can be made by a client are informational
|
||
in nature, we have chosen to always return a response so that
|
||
clients can know whether the request was received and was
|
||
correct.
|
||
</p>
|
||
<p>
|
||
There is no guarantee concerning the order in which responses
|
||
will be returned, but there is a guarantee that the server will
|
||
process requests in the order in which they are sent as long as
|
||
the transport mechanism also makes this guarantee. Responses can
|
||
be returned in an order that is different from the order in
|
||
which the requests were received because some requests take
|
||
longer to process than others.
|
||
</p>
|
||
<p>
|
||
Every request is required to have two fields and may have an
|
||
optional third field. The first required field is the ‘id’
|
||
field, which is only used by the server to associate a response
|
||
with the request that generated the response. The second
|
||
required field is the ‘method’ field, which is used to determine
|
||
what the server is being requested to do. The optional field is
|
||
the ‘params’ field, whose structure is dependent on the method
|
||
being requested. The structure of this field is described with
|
||
each request for which it is required.
|
||
</p>
|
||
<p>
|
||
Every response has up to three fields. The first field is the
|
||
‘id’ field, which is always present and whose value is the
|
||
identifier that was passed to the request that generated the
|
||
response. The second field is the ‘error’ field, which is only
|
||
present if an error was encountered while processing the
|
||
request. The third field is the ‘result’ field, whose structure
|
||
is dependent on the method being responded to, and is described
|
||
with each request that will produce it.
|
||
</p>
|
||
<p>
|
||
The server can also communicate to the clients by sending a
|
||
notification. The purpose of these notifications is to provide
|
||
information to clients as it becomes available rather than to
|
||
require that clients poll for it. Unless explicitly stated, all
|
||
notifications are designed to return the complete information
|
||
available at the time the notification is sent; clients are not
|
||
required to update previously communicated
|
||
results. Consequently, the server can and should return partial
|
||
results before all results are available. For example, the
|
||
syntactic errors for a file can be returned as soon as the
|
||
syntactic analysis is complete, and both syntactic and semantic
|
||
errors can be returned together at a later time.
|
||
</p>
|
||
<p>
|
||
Each notification has two fields. The first field is the ‘event’
|
||
field, which identifies the kind of notification. The second
|
||
field is the ‘params’ field, whose structure is dependent on the
|
||
kind of notification being sent. The structure of this field is
|
||
described with each notification.
|
||
</p>
|
||
<h3>Eventual Consistency</h3>
|
||
<p>
|
||
TBD
|
||
</p>
|
||
<h3>Domains</h3>
|
||
<p>
|
||
For convenience, the API is divided into domains. Each domain is
|
||
specified in a separate section below:
|
||
</p>
|
||
<ul>
|
||
<li><a href="#domain_server">Server</a></li>
|
||
<li><a href="#domain_analysis">Analysis</a></li>
|
||
<li><a href="#domain_completion">Code Completion</a></li>
|
||
<li><a href="#domain_search">Search</a></li>
|
||
<li><a href="#domain_edit">Edit</a></li>
|
||
<li><a href="#domain_debug">Debugging</a></li>
|
||
</ul>
|
||
<p>
|
||
The specifications of the API’s refer to data structures beyond
|
||
the standard JSON primitives. These data structures are
|
||
documented in the section titled <a href="#types">Types</a>.
|
||
</p>
|
||
<h3>Command-line Arguments</h3>
|
||
<p>
|
||
The command-line arguments that can be passed to the server.
|
||
</p>
|
||
<h4>Options</h4>
|
||
<dl>
|
||
<dt>--no-error-notification</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<p>
|
||
Disable notifications about errors (see analysis.error). If this
|
||
flag is not specified then notifications will be sent for all
|
||
errors produced for all files in the actual analysis roots.
|
||
</p>
|
||
<h2><a name="domain_server">Domain: server</a></h2>
|
||
<p>
|
||
The server domain contains API’s related to the execution of
|
||
the server.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">server.getVersion</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "server.getVersion"
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>version</b>": String
|
||
}
|
||
}</pre></div>
|
||
<p>Return the version number of the analysis server.</p>
|
||
|
||
<h4>Returns</h4><dl><dt class="field"><b><i>version ( String )</i></b></dt><dd>
|
||
|
||
<p>The version number of the analysis server.</p>
|
||
</dd></dl></dd><dt class="request">server.shutdown</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "server.shutdown"
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Cleanly shutdown the analysis server. Requests that are
|
||
received after this request will not be processed. Requests
|
||
that were received before this request, but for which a
|
||
response has not yet been sent, will not be responded to. No
|
||
further responses or notifications will be sent after the
|
||
response to this request has been sent.
|
||
</p>
|
||
</dd><dt class="request">server.setSubscriptions</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "server.setSubscriptions"
|
||
"params": {
|
||
"<b>subscriptions</b>": List<<a href="#type_ServerService">ServerService</a>>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Subscribe for services. All previous subscriptions are
|
||
replaced by the given set of services.
|
||
</p>
|
||
<p>
|
||
It is an error if any of the elements in the list are not
|
||
valid services. If there is an error, then the current
|
||
subscriptions will remain unchanged.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( List<<a href="#type_ServerService">ServerService</a>> )</i></b></dt><dd>
|
||
|
||
<p>A list of the services being subscribed to.</p>
|
||
</dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification">server.connected</dt><dd><div class="box"><pre>notification: {
|
||
"event": "server.connected"
|
||
}</pre></div>
|
||
<p>
|
||
Reports that the server is running. This notification is
|
||
issued once after the server has started running but before
|
||
any requests are processed to let the client know that it
|
||
started correctly.
|
||
</p>
|
||
<p>
|
||
It is not possible to subscribe to or unsubscribe from this
|
||
notification.
|
||
</p>
|
||
</dd><dt class="notification">server.error</dt><dd><div class="box"><pre>notification: {
|
||
"event": "server.error"
|
||
"params": {
|
||
"<b>fatal</b>": bool
|
||
"<b>message</b>": String
|
||
"<b>stackTrace</b>": String
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports that an unexpected error has occurred while
|
||
executing the server. This notification is not used for
|
||
problems with specific requests (which are returned as part
|
||
of the response) but is used for exceptions that occur while
|
||
performing other tasks, such as analysis or preparing
|
||
notifications.
|
||
</p>
|
||
<p>
|
||
It is not possible to subscribe to or unsubscribe from this
|
||
notification.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>fatal ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the error is a fatal error, meaning that the
|
||
server will shutdown automatically after sending this
|
||
notification.
|
||
</p>
|
||
</dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The error message indicating what kind of error was
|
||
encountered.
|
||
</p>
|
||
</dd><dt class="field"><b><i>stackTrace ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The stack trace associated with the generation of the
|
||
error, used for debugging the server.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">server.status</dt><dd><div class="box"><pre>notification: {
|
||
"event": "server.status"
|
||
"params": {
|
||
"<b>analysis</b>": <span style="color:#999999">optional</span> <a href="#type_AnalysisStatus">AnalysisStatus</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the current status of the server. Parameters are
|
||
omitted if there has been no change in the status
|
||
represented by that parameter.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"STATUS"</tt> in
|
||
the list of services passed in a server.setSubscriptions
|
||
request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>analysis ( <span style="color:#999999">optional</span> <a href="#type_AnalysisStatus">AnalysisStatus</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The current status of analysis, including whether
|
||
analysis is being performed and if so what is being
|
||
analyzed.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2><a name="domain_analysis">Domain: analysis</a></h2>
|
||
<p>
|
||
The analysis domain contains API’s related to the analysis of
|
||
files.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">analysis.getErrors</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.getErrors"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>errors</b>": List<<a href="#type_AnalysisError">AnalysisError</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Return the errors associated with the given file. If the
|
||
errors for the given file have not yet been computed, or the
|
||
most recently computed errors for the given file are out of
|
||
date, then the response for this request will be delayed
|
||
until they have been computed. If some or all of the errors
|
||
for the file cannot be computed, then the subset of the
|
||
errors that can be computed will be returned and the
|
||
response will contain an error to indicate why the errors
|
||
could not be computed.
|
||
</p>
|
||
<p>
|
||
This request is intended to be used by clients that cannot
|
||
asynchronously apply updated error information. Clients that
|
||
<b>can</b> apply error information as it becomes available
|
||
should use the information provided by the 'analysis.errors'
|
||
notification.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file for which errors are being requested.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>errors ( List<<a href="#type_AnalysisError">AnalysisError</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The errors associated with the file.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.getHover</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.getHover"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>hovers</b>": List<<a href="#type_HoverInformation">HoverInformation</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Return the hover information associate with the given
|
||
location. If some or all of the hover information is not
|
||
available at the time this request is processed the
|
||
information will be omitted from the response.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file in which hover information is being
|
||
requested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset for which hover information is being
|
||
requested.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>hovers ( List<<a href="#type_HoverInformation">HoverInformation</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The hover information associated with the
|
||
location. The list will be empty if no information
|
||
could be determined for the location. The list can
|
||
contain multiple items if the file is being analyzed
|
||
in multiple contexts in conflicting ways (such as a
|
||
part that is included in multiple libraries).
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.reanalyze</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.reanalyze"
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Force the re-analysis of everything contained in the
|
||
existing analysis roots. This will cause all previously
|
||
computed analysis results to be discarded and recomputed,
|
||
and will cause all subscribed notifications to be re-sent.
|
||
</p>
|
||
</dd><dt class="request">analysis.setAnalysisRoots</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.setAnalysisRoots"
|
||
"params": {
|
||
"<b>included</b>": List<<a href="#type_FilePath">FilePath</a>>
|
||
"<b>excluded</b>": List<<a href="#type_FilePath">FilePath</a>>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Sets the root paths used to determine which files to
|
||
analyze. The set of files to be analyzed are all of the
|
||
files in one of the root paths that are not also in one of
|
||
the excluded paths.
|
||
</p>
|
||
<p>
|
||
Note that this request determines the set of requested
|
||
analysis roots. The actual set of analysis roots at any
|
||
given time is the intersection of this set with the set of
|
||
files and directories actually present on the
|
||
filesystem. When the filesystem changes, the actual set of
|
||
analysis roots is automatically updated, but the set of
|
||
requested analysis roots is unchanged. This means that if
|
||
the client sets an analysis root before the root becomes
|
||
visible to server in the filesystem, there is no error; once
|
||
the server sees the root in the filesystem it will start
|
||
analyzing it. Similarly, server will stop analyzing files
|
||
that are removed from the file system but they will remain
|
||
in the set of requested roots.
|
||
</p>
|
||
<p>
|
||
If an included path represents a file, then server will look
|
||
in the directory containing the file for a pubspec.yaml
|
||
file. If none is found, then the parents of the directory
|
||
will be searched until such a file is found or the root of
|
||
the file system is reached. If such a file is found, it will
|
||
be used to resolve package: URI’s within the file.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>included ( List<<a href="#type_FilePath">FilePath</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the files and directories that should be
|
||
analyzed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>excluded ( List<<a href="#type_FilePath">FilePath</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the files and directories within the
|
||
included directories that should not be analyzed.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.setPriorityFiles</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.setPriorityFiles"
|
||
"params": {
|
||
"<b>files</b>": List<<a href="#type_FilePath">FilePath</a>>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Set the priority files to the files in the given list. A
|
||
priority file is a file that is given priority when
|
||
scheduling which analysis work to do first. The list
|
||
typically contains those files that are visible to the user
|
||
and those for which analysis results will have the biggest
|
||
impact on the user experience. The order of the files within
|
||
the list is significant: the first file will be given higher
|
||
priority than the second, the second higher priority than
|
||
the third, and so on.
|
||
</p>
|
||
<p>
|
||
Note that this request determines the set of requested
|
||
priority files. The actual set of priority files is the
|
||
intersection of the requested set of priority files with the
|
||
set of files currently subject to analysis. (See
|
||
analysis.setSubscriptions for a description of files that
|
||
are subject to analysis.)
|
||
</p>
|
||
<p>
|
||
If a requested priority file is a directory it is ignored,
|
||
but remains in the set of requested priority files so that
|
||
if it later becomes a file it can be included in the set of
|
||
actual priority files.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>files ( List<<a href="#type_FilePath">FilePath</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The files that are to be a priority for analysis.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.setSubscriptions</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.setSubscriptions"
|
||
"params": {
|
||
"<b>subscriptions</b>": Map<<a href="#type_AnalysisService">AnalysisService</a>, List<<a href="#type_FilePath">FilePath</a>>>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Subscribe for services. All previous subscriptions are
|
||
replaced by the current set of subscriptions. If a given
|
||
service is not included as a key in the map then no files
|
||
will be subscribed to the service, exactly as if the service
|
||
had been included in the map with an explicit empty list of
|
||
files.
|
||
</p>
|
||
<p>
|
||
Note that this request determines the set of requested
|
||
subscriptions. The actual set of subscriptions at any given
|
||
time is the intersection of this set with the set of files
|
||
currently subject to analysis. The files currently subject
|
||
to analysis are the set of files contained within an actual
|
||
analysis root but not excluded, plus all of the files
|
||
transitively reachable from those files via import, export
|
||
and part directives. (See analysis.setAnalysisRoots for an
|
||
explanation of how the actual analysis roots are
|
||
determined.) When the actual analysis roots change, the
|
||
actual set of subscriptions is automatically updated, but
|
||
the set of requested subscriptions is unchanged.
|
||
</p>
|
||
<p>
|
||
If a requested subscription is a directory it is ignored,
|
||
but remains in the set of requested subscriptions so that if
|
||
it later becomes a file it can be included in the set of
|
||
actual subscriptions.
|
||
</p>
|
||
<p>
|
||
It is an error if any of the keys in the map are not valid
|
||
services. If there is an error, then the existing
|
||
subscriptions will remain unchanged.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( Map<<a href="#type_AnalysisService">AnalysisService</a>, List<<a href="#type_FilePath">FilePath</a>>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A table mapping services to a list of the files being
|
||
subscribed to the service.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.updateContent</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.updateContent"
|
||
"params": {
|
||
"<b>files</b>": Map<<a href="#type_FilePath">FilePath</a>, object>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Update the content of one or more files. Files that were
|
||
previously updated but not included in this update remain
|
||
unchanged. This effectively represents an overlay of the
|
||
filesystem. The files whose content is overridden are
|
||
therefore seen by server as being files with the given
|
||
content, even if the files do not exist on the filesystem or
|
||
if the file path represents the path to a directory on the
|
||
filesystem.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>files ( Map<<a href="#type_FilePath">FilePath</a>, object> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A table mapping the files whose content has changed to a
|
||
description of the content change. Each value should be
|
||
one of the following types: <a href="#type_AddContentOverlay">AddContentOverlay</a>, <a href="#type_ChangeContentOverlay">ChangeContentOverlay</a>,
|
||
or <a href="#type_RemoveContentOverlay">RemoveContentOverlay</a>.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">analysis.updateOptions</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "analysis.updateOptions"
|
||
"params": {
|
||
"<b>options</b>": <a href="#type_AnalysisOptions">AnalysisOptions</a>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Update the options controlling analysis based on the given
|
||
set of options. Any options that are not included in the
|
||
analysis options will not be changed. If there are options
|
||
in the analysis options that are not valid an error will be
|
||
reported but the values of the valid options will still be
|
||
updated.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>options ( <a href="#type_AnalysisOptions">AnalysisOptions</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The options that are to be used to control analysis.
|
||
</p>
|
||
</dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification">analysis.errors</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.errors"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>errors</b>": List<<a href="#type_AnalysisError">AnalysisError</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the errors associated with a given file. The set of
|
||
errors included in the notification is always a complete
|
||
list that supersedes any previously reported errors.
|
||
</p>
|
||
<p>
|
||
It is only possible to unsubscribe from this notification by
|
||
using the command-line flag --no-error-notification.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the errors.
|
||
</p>
|
||
</dd><dt class="field"><b><i>errors ( List<<a href="#type_AnalysisError">AnalysisError</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The errors contained in the file.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.flushResults</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.flushResults"
|
||
"params": {
|
||
"<b>files</b>": List<<a href="#type_FilePath">FilePath</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports that any analysis results that were previously
|
||
associated with the given files should be considered to be
|
||
invalid because those files are no longer being analyzed,
|
||
either because the analysis root that contained it is no
|
||
longer being analyzed or because the file no longer exists.
|
||
</p>
|
||
<p>
|
||
If a file is included in this notification and at some later
|
||
time a notification with results for the file is received,
|
||
clients should assume that the file is once again being
|
||
analyzed and the information should be processed.
|
||
</p>
|
||
<p>
|
||
It is not possible to subscribe to or unsubscribe from this
|
||
notification.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>files ( List<<a href="#type_FilePath">FilePath</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The files that are no longer being analyzed.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.folding</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.folding"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>regions</b>": List<<a href="#type_FoldingRegion">FoldingRegion</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the folding regions associated with a given
|
||
file. Folding regions can be nested, but will not be
|
||
overlapping. Nesting occurs when a foldable element, such as
|
||
a method, is nested inside another foldable element such as
|
||
a class.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"FOLDING"</tt> in
|
||
the list of services passed in an analysis.setSubscriptions
|
||
request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the folding regions.
|
||
</p>
|
||
</dd><dt class="field"><b><i>regions ( List<<a href="#type_FoldingRegion">FoldingRegion</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The folding regions contained in the file.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.highlights</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.highlights"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>regions</b>": List<<a href="#type_HighlightRegion">HighlightRegion</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the highlight regions associated with a given file.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"HIGHLIGHTS"</tt>
|
||
in the list of services passed in an
|
||
analysis.setSubscriptions request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the highlight regions.
|
||
</p>
|
||
</dd><dt class="field"><b><i>regions ( List<<a href="#type_HighlightRegion">HighlightRegion</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The highlight regions contained in the file. Each
|
||
highlight region represents a particular syntactic or
|
||
semantic meaning associated with some range. Note that
|
||
the highlight regions that are returned can overlap
|
||
other highlight regions if there is more than one
|
||
meaning associated with a particular region.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.navigation</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.navigation"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>regions</b>": List<<a href="#type_NavigationRegion">NavigationRegion</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the navigation targets associated with a given file.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"NAVIGATION"</tt>
|
||
in the list of services passed in an
|
||
analysis.setSubscriptions request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the navigation regions.
|
||
</p>
|
||
</dd><dt class="field"><b><i>regions ( List<<a href="#type_NavigationRegion">NavigationRegion</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The navigation regions contained in the file. Each
|
||
navigation region represents a list of targets
|
||
associated with some range. The lists will usually
|
||
contain a single target, but can contain more in the
|
||
case of a part that is included in multiple libraries
|
||
or in Dart code that is compiled against multiple
|
||
versions of a package. Note that the navigation
|
||
regions that are returned do not overlap other
|
||
navigation regions.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.occurrences</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.occurrences"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>occurrences</b>": List<<a href="#type_Occurrences">Occurrences</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the occurrences of references to elements within a
|
||
single file.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"OCCURRENCES"</tt>
|
||
in the list of services passed in an
|
||
analysis.setSubscriptions request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file in which the references occur.
|
||
</p>
|
||
</dd><dt class="field"><b><i>occurrences ( List<<a href="#type_Occurrences">Occurrences</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The occurrences of references to elements within the
|
||
file.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.outline</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.outline"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>outline</b>": <a href="#type_Outline">Outline</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the outline associated with a single file.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"OUTLINE"</tt> in
|
||
the list of services passed in an analysis.setSubscriptions
|
||
request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file with which the outline is associated.
|
||
</p>
|
||
</dd><dt class="field"><b><i>outline ( <a href="#type_Outline">Outline</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The outline associated with the file.
|
||
</p>
|
||
</dd></dl></dd><dt class="notification">analysis.overrides</dt><dd><div class="box"><pre>notification: {
|
||
"event": "analysis.overrides"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>overrides</b>": List<<a href="#type_Override">Override</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the overridding members in a file. This notification
|
||
currently includes only members that override a member from
|
||
a superclass. In particular, it does not include members
|
||
that override members from interfaces.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value <tt>"OVERRIDES"</tt> in
|
||
the list of services passed in an analysis.setSubscriptions
|
||
request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file with which the overrides are associated.
|
||
</p>
|
||
</dd><dt class="field"><b><i>overrides ( List<<a href="#type_Override">Override</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The overrides associated with the file.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2><a name="domain_completion">Domain: completion</a></h2>
|
||
<p>
|
||
The code completion domain contains commands related to
|
||
getting code completion suggestions.
|
||
</p>
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">completion.getSuggestions</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "completion.getSuggestions"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_CompletionId">CompletionId</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Request that completion suggestions for the given offset in
|
||
the given file be returned.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the point at which suggestions are
|
||
to be made.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset within the file at which suggestions are to
|
||
be made.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_CompletionId">CompletionId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to associate results with this
|
||
completion request.
|
||
</p>
|
||
</dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification">completion.results</dt><dd><div class="box"><pre>notification: {
|
||
"event": "completion.results"
|
||
"params": {
|
||
"<b>id</b>": <a href="#type_CompletionId">CompletionId</a>
|
||
"<b>replacementOffset</b>": int
|
||
"<b>replacementLength</b>": int
|
||
"<b>results</b>": List<<a href="#type_CompletionSuggestion">CompletionSuggestion</a>>
|
||
"<b>last</b>": bool
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports the completion suggestions that should be presented
|
||
to the user. The set of suggestions included in the
|
||
notification is always a complete list that supersedes any
|
||
previously reported suggestions.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_CompletionId">CompletionId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The id associated with the completion.
|
||
</p>
|
||
</dd><dt class="field"><b><i>replacementOffset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the start of the text to be
|
||
replaced. This will be different than the offset used
|
||
to request the completion suggestions if there was a
|
||
portion of an identifier before the original
|
||
offset. In particular, the replacementOffset will be
|
||
the offset of the beginning of said identifier.
|
||
</p>
|
||
</dd><dt class="field"><b><i>replacementLength ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the text to be replaced if the remainder
|
||
of the identifier containing the cursor is to be
|
||
replaced when the suggestion is applied (that is, the
|
||
number of characters in the existing identifier).
|
||
</p>
|
||
</dd><dt class="field"><b><i>results ( List<<a href="#type_CompletionSuggestion">CompletionSuggestion</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The completion suggestions being reported.
|
||
</p>
|
||
</dd><dt class="field"><b><i>last ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if this is that last set of results that will be
|
||
returned for the indicated completion.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2><a name="domain_search">Domain: search</a></h2>
|
||
<p>
|
||
The search domain contains commands related to searches that
|
||
can be performed against the code base.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">search.findElementReferences</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "search.findElementReferences"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
"<b>includePotential</b>": bool
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_SearchId">SearchId</a>
|
||
"<b>element</b>": <a href="#type_Element">Element</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Perform a search for references to the element defined or
|
||
referenced at the given offset in the given file.
|
||
</p>
|
||
<p>
|
||
An identifier is returned immediately, and individual
|
||
results will be returned via the search.results notification
|
||
as they become available.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the declaration of or reference to
|
||
the element used to define the search.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset within the file of the declaration of or
|
||
reference to the element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>includePotential ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if potential matches are to be included in the
|
||
results.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchId">SearchId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to associate results with this
|
||
search request.
|
||
</p>
|
||
</dd><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The element referenced or defined at the given offset
|
||
and whose references will be returned in the search
|
||
results.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">search.findMemberDeclarations</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "search.findMemberDeclarations"
|
||
"params": {
|
||
"<b>name</b>": String
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_SearchId">SearchId</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Perform a search for declarations of members whose name is
|
||
equal to the given name.
|
||
</p>
|
||
<p>
|
||
An identifier is returned immediately, and individual
|
||
results will be returned via the search.results notification
|
||
as they become available.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the declarations to be found.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchId">SearchId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to associate results with this
|
||
search request.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">search.findMemberReferences</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "search.findMemberReferences"
|
||
"params": {
|
||
"<b>name</b>": String
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_SearchId">SearchId</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Perform a search for references to members whose name is
|
||
equal to the given name. This search does not check to see
|
||
that there is a member defined with the given name, so it is
|
||
able to find references to undefined members as well.
|
||
</p>
|
||
<p>
|
||
An identifier is returned immediately, and individual
|
||
results will be returned via the search.results notification
|
||
as they become available.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the references to be found.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchId">SearchId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to associate results with this
|
||
search request.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">search.findTopLevelDeclarations</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "search.findTopLevelDeclarations"
|
||
"params": {
|
||
"<b>pattern</b>": String
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_SearchId">SearchId</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Perform a search for declarations of top-level elements
|
||
(classes, typedefs, getters, setters, functions and fields)
|
||
whose name matches the given pattern.
|
||
</p>
|
||
<p>
|
||
An identifier is returned immediately, and individual
|
||
results will be returned via the search.results notification
|
||
as they become available.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>pattern ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The regular expression used to match the names of the
|
||
declarations to be found.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchId">SearchId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to associate results with this
|
||
search request.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">search.getTypeHierarchy</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "search.getTypeHierarchy"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>hierarchyItems</b>": <span style="color:#999999">optional</span> List<<a href="#type_TypeHierarchyItem">TypeHierarchyItem</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Return the type hierarchy of the class declared or
|
||
referenced at the given location.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the declaration or reference to the
|
||
type for which a hierarchy is being requested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the name of the type within the file.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>hierarchyItems ( <span style="color:#999999">optional</span> List<<a href="#type_TypeHierarchyItem">TypeHierarchyItem</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the types in the requested hierarchy. The
|
||
first element of the list is the item representing the
|
||
type for which the hierarchy was requested. The index of
|
||
other elements of the list is unspecified, but
|
||
correspond to the integers used to reference supertype
|
||
and subtype items within the items.
|
||
</p>
|
||
<p>
|
||
This field will be absent if the code at the given file
|
||
and offset does not represent a type, or if the file has
|
||
not been sufficiently analyzed to allow a type hierarchy
|
||
to be produced.
|
||
</p>
|
||
</dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification">search.results</dt><dd><div class="box"><pre>notification: {
|
||
"event": "search.results"
|
||
"params": {
|
||
"<b>id</b>": <a href="#type_SearchId">SearchId</a>
|
||
"<b>results</b>": List<<a href="#type_SearchResult">SearchResult</a>>
|
||
"<b>last</b>": bool
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports some or all of the results of performing a requested
|
||
search. Unlike other notifications, this notification
|
||
contains search results that should be added to any
|
||
previously received search results associated with the same
|
||
search id.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchId">SearchId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The id associated with the search.
|
||
</p>
|
||
</dd><dt class="field"><b><i>results ( List<<a href="#type_SearchResult">SearchResult</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The search results being reported.
|
||
</p>
|
||
</dd><dt class="field"><b><i>last ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if this is that last set of results that will be
|
||
returned for the indicated search.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2><a name="domain_edit">Domain: edit</a></h2>
|
||
<p>
|
||
The edit domain contains commands related to edits that can be
|
||
applied to the code.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">edit.getAssists</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "edit.getAssists"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
"<b>length</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>assists</b>": List<<a href="#type_SourceChange">SourceChange</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Return the set of assists that are available at the given
|
||
location. An assist is distinguished from a refactoring
|
||
primarily by the fact that it affects a single file and does
|
||
not require user input in order to be performed.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the code for which assists are being
|
||
requested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the code for which assists are being
|
||
requested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the code for which assists are being
|
||
requested.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>assists ( List<<a href="#type_SourceChange">SourceChange</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The assists that are available at the given location.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">edit.getAvailableRefactorings</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "edit.getAvailableRefactorings"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
"<b>length</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>kinds</b>": List<<a href="#type_RefactoringKind">RefactoringKind</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Get a list of the kinds of refactorings that are valid for
|
||
the given selection in the given file.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the code on which the refactoring
|
||
would be based.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the code on which the refactoring would be
|
||
based.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the code on which the refactoring would be
|
||
based.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>kinds ( List<<a href="#type_RefactoringKind">RefactoringKind</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kinds of refactorings that are valid for the given
|
||
selection.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">edit.getFixes</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "edit.getFixes"
|
||
"params": {
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>fixes</b>": List<<a href="#type_ErrorFixes">ErrorFixes</a>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Return the set of fixes that are available for the errors at
|
||
a given offset in a given file.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the errors for which fixes are being
|
||
requested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset used to select the errors for which fixes
|
||
will be returned.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>fixes ( List<<a href="#type_ErrorFixes">ErrorFixes</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The fixes that are available for each of the analysis
|
||
errors. There is a one-to-one correspondence between the
|
||
analysis errors in the request and the lists of changes
|
||
in the response. In particular, it is always the case
|
||
that errors.length == fixes.length and that fixes[i] is
|
||
the list of fixes for the error in errors[i]. The list
|
||
of changes corresponding to an error can be empty if
|
||
there are no fixes available for that error.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">edit.getRefactoring</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "edit.getRefactoring"
|
||
"params": {
|
||
"<b>kindId</b>": <a href="#type_RefactoringKind">RefactoringKind</a>
|
||
"<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
||
"<b>offset</b>": int
|
||
"<b>length</b>": int
|
||
"<b>validateOnly</b>": bool
|
||
"<b>options</b>": <span style="color:#999999">optional</span> object
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>status</b>": List<<a href="#type_RefactoringProblem">RefactoringProblem</a>>
|
||
"<b>feedback</b>": <span style="color:#999999">optional</span> object
|
||
"<b>change</b>": <span style="color:#999999">optional</span> <a href="#type_SourceChange">SourceChange</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Get the changes required to perform a refactoring.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>kindId ( <a href="#type_RefactoringKind">RefactoringKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier of the kind of refactoring to be
|
||
performed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the code involved in the
|
||
refactoring.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region involved in the refactoring.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the region involved in the refactoring.
|
||
</p>
|
||
</dd><dt class="field"><b><i>validateOnly ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client is only requesting that the values of
|
||
the options be validated and no change be generated.
|
||
</p>
|
||
</dd><dt class="field"><b><i>options ( <span style="color:#999999">optional</span> object )</i></b></dt><dd>
|
||
|
||
<p>
|
||
Data used to provide values provided by the user. The
|
||
structure of the data is dependent on the kind of
|
||
refactoring being performed. The data that is expected is
|
||
documented in the section titled <a href="#refactorings">Refactorings</a>, labeled as
|
||
“Options”. This field can be omitted if the refactoring
|
||
does not require any options or if the values of those
|
||
options are not known.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>status ( List<<a href="#type_RefactoringProblem">RefactoringProblem</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The status of the refactoring. The array will be empty
|
||
if there are no known problems.
|
||
</p>
|
||
</dd><dt class="field"><b><i>feedback ( <span style="color:#999999">optional</span> object )</i></b></dt><dd>
|
||
|
||
<p>
|
||
Data used to provide feedback to the user. The structure
|
||
of the data is dependent on the kind of refactoring
|
||
being created. The data that is returned is documented
|
||
in the section titled <a href="#refactorings">Refactorings</a>, labeled as
|
||
“Feedback”.
|
||
</p>
|
||
</dd><dt class="field"><b><i>change ( <span style="color:#999999">optional</span> <a href="#type_SourceChange">SourceChange</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The changes that are to be applied to affect the
|
||
refactoring. This field will be omitted if there are
|
||
problems that prevent a set of changed from being
|
||
computed, such as having no options specified for a
|
||
refactoring that requires them, or if only validation
|
||
was requested.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2><a name="domain_debug">Domain: debug</a></h2>
|
||
<p>
|
||
The debugging domain contains commands related to providing a
|
||
debugging experience.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Requests</h3><dl><dt class="request">debug.createContext</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "debug.createContext"
|
||
"params": {
|
||
"<b>contextRoot</b>": <a href="#type_FilePath">FilePath</a>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"<b>id</b>": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Create a debugging context for the executable file with the
|
||
given path. The context that is created will persist until
|
||
debug.deleteContext is used to delete it. Clients,
|
||
therefore, are responsible for managing the lifetime of
|
||
debugging contexts.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>contextRoot ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The path of the Dart or HTML file that will be launched.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#type_DebugContextId">DebugContextId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier used to refer to the debugging context
|
||
that was created.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">debug.deleteContext</dt><dd><div class="box"><pre>request: {
|
||
"<b>id</b>": String
|
||
"method": "debug.deleteContext"
|
||
"params": {
|
||
"<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Delete the debugging context with the given identifier. The
|
||
context id is no longer valid after this command. The server
|
||
is allowed to re-use ids when they are no longer valid.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_DebugContextId">DebugContextId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier of the debugging context that is to be
|
||
deleted.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">debug.mapUri</dt><dd><div class="box"><pre>request: {
|
||
"<b>id</b>": String
|
||
"method": "debug.mapUri"
|
||
"params": {
|
||
"<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
|
||
"<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_FilePath">FilePath</a>
|
||
"<b>uri</b>": <span style="color:#999999">optional</span> String
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
"result": {
|
||
"<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_FilePath">FilePath</a>
|
||
"<b>uri</b>": <span style="color:#999999">optional</span> String
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Map a URI from the debugging context to the file that it
|
||
corresponds to, or map a file to the URI that it corresponds
|
||
to in the debugging context.
|
||
</p>
|
||
<p>
|
||
Exactly one of the file and uri fields must be provided.
|
||
</p>
|
||
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_DebugContextId">DebugContextId</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier of the debugging context in which the URI
|
||
is to be mapped.
|
||
</p>
|
||
</dd><dt class="field"><b><i>file ( <span style="color:#999999">optional</span> <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The path of the file to be mapped into a URI.
|
||
</p>
|
||
</dd><dt class="field"><b><i>uri ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The URI to be mapped into a file path.
|
||
</p>
|
||
</dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>file ( <span style="color:#999999">optional</span> <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file to which the URI was mapped. This field is
|
||
omitted if the uri field was not given in the request.
|
||
</p>
|
||
</dd><dt class="field"><b><i>uri ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The URI to which the file path was mapped. This field is
|
||
omitted if the file field was not given in the request.
|
||
</p>
|
||
</dd></dl></dd><dt class="request">debug.setSubscriptions</dt><dd><div class="box"><pre>request: {
|
||
"id": String
|
||
"method": "debug.setSubscriptions"
|
||
"params": {
|
||
"<b>subscriptions</b>": List<<a href="#type_DebugService">DebugService</a>>
|
||
}
|
||
}</pre><br><pre>response: {
|
||
"id": String
|
||
"error": <span style="color:#999999">optional</span> <a href="#type_Error">Error</a>
|
||
}</pre></div>
|
||
<p>
|
||
Subscribe for services. All previous subscriptions are
|
||
replaced by the given set of services.
|
||
</p>
|
||
<p>
|
||
It is an error if any of the elements in the list are not
|
||
valid services. If there is an error, then the current
|
||
subscriptions will remain unchanged.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( List<<a href="#type_DebugService">DebugService</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the services being subscribed to.
|
||
</p>
|
||
</dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification">debug.launchData</dt><dd><div class="box"><pre>notification: {
|
||
"event": "debug.launchData"
|
||
"params": {
|
||
"<b>executables</b>": List<<a href="#type_ExecutableFile">ExecutableFile</a>>
|
||
"<b>dartToHtml</b>": Map<<a href="#type_FilePath">FilePath</a>, List<<a href="#type_FilePath">FilePath</a>>>
|
||
"<b>htmlToDart</b>": Map<<a href="#type_FilePath">FilePath</a>, List<<a href="#type_FilePath">FilePath</a>>>
|
||
}
|
||
}</pre></div>
|
||
<p>
|
||
Reports information needed to allow applications within the
|
||
given context to be launched.
|
||
</p>
|
||
<p>
|
||
This notification is not subscribed to by default. Clients
|
||
can subscribe by including the value "LAUNCH_DATA" in the
|
||
list of services passed in a debug.setSubscriptions request.
|
||
</p>
|
||
|
||
<h4>Parameters</h4><dl><dt class="field"><b><i>executables ( List<<a href="#type_ExecutableFile">ExecutableFile</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the files that are executable in the given
|
||
context. This list replaces any previous list provided
|
||
for the given context.
|
||
</p>
|
||
</dd><dt class="field"><b><i>dartToHtml ( Map<<a href="#type_FilePath">FilePath</a>, List<<a href="#type_FilePath">FilePath</a>>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A mapping from the paths of Dart files that are
|
||
referenced by HTML files to a list of the HTML files
|
||
that reference the Dart files.
|
||
</p>
|
||
</dd><dt class="field"><b><i>htmlToDart ( Map<<a href="#type_FilePath">FilePath</a>, List<<a href="#type_FilePath">FilePath</a>>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A mapping from the paths of HTML files that reference
|
||
Dart files to a list of the Dart files they reference.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
|
||
<h2><a name="types">Types</a></h2>
|
||
<p>
|
||
This section contains descriptions of the data types referenced
|
||
in the API’s of the various domains.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dl><dt class="typeDefinition"><a name="type_AddContentOverlay">AddContentOverlay: object</a></dt><dd>
|
||
<p>
|
||
A directive to begin overlaying the contents of a file. The
|
||
supplied content will be used for analysis in place of the
|
||
file contents in the filesystem.
|
||
</p>
|
||
<p>
|
||
If this directive is used on a file that already has a file
|
||
content overlay, the old overlay is discarded and replaced
|
||
with the new one.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>type = "add"</i></b></dt><dd></dd><dt class="field"><b><i>content ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The new content of the file.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisError">AnalysisError: object</a></dt><dd>
|
||
<p>
|
||
An indication of an error, warning, or hint that was produced
|
||
by the analysis.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>severity ( <a href="#type_ErrorSeverity">ErrorSeverity</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The severity of the error.
|
||
</p>
|
||
</dd><dt class="field"><b><i>type ( <a href="#type_ErrorType">ErrorType</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The type of the error.
|
||
</p>
|
||
</dd><dt class="field"><b><i>location ( <a href="#type_Location">Location</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The location associated with the error.
|
||
</p>
|
||
</dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The message to be displayed for this error. The message
|
||
should indicate what is wrong with the code and why it is
|
||
wrong.
|
||
</p>
|
||
</dd><dt class="field"><b><i>correction ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The correction message to be displayed for this error. The
|
||
correction message should indicate how the user can fix
|
||
the error. The field is omitted if there is no correction
|
||
message associated with the error code.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisOptions">AnalysisOptions: object</a></dt><dd>
|
||
<p>
|
||
A set of options controlling what kind of analysis is to be
|
||
performed. If the value of a field is omitted the value of the
|
||
option will not be changed.
|
||
</p>
|
||
<p>
|
||
NOTE: These options need to change.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>analyzeAngular ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client wants Angular code to be analyzed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>analyzePolymer ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client wants Polymer code to be analyzed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>enableAsync ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client wants to enable support for the
|
||
proposed async feature.
|
||
</p>
|
||
</dd><dt class="field"><b><i>enableDeferredLoading ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client wants to enable support for the
|
||
proposed deferred loading feature.
|
||
</p>
|
||
</dd><dt class="field"><b><i>enableEnums ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the client wants to enable support for the
|
||
proposed enum feature.
|
||
</p>
|
||
</dd><dt class="field"><b><i>generateDart2jsHints ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if hints that are specific to dart2js should be
|
||
generated. This option is ignored if either provideErrors
|
||
or generateHints is false.
|
||
</p>
|
||
</dd><dt class="field"><b><i>generateHints ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True is hints should be generated as part of generating
|
||
errors and warnings. This option is ignored if
|
||
provideErrors is false.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisService">AnalysisService: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the services provided by the analysis
|
||
domain.
|
||
</p>
|
||
|
||
<dl><dt class="value">FOLDING</dt><dt class="value">HIGHLIGHTS</dt><dt class="value">NAVIGATION</dt><dt class="value">OCCURRENCES</dt><dt class="value">OUTLINE</dt><dt class="value">OVERRIDES</dt></dl></dd><dt class="typeDefinition"><a name="type_AnalysisStatus">AnalysisStatus: object</a></dt><dd>
|
||
<p>
|
||
An indication of the current state of analysis.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>analyzing ( bool )</i></b></dt><dd>
|
||
|
||
<p>True if analysis is currently being performed.</p>
|
||
</dd><dt class="field"><b><i>analysisTarget ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the current target of analysis. This field is
|
||
omitted if analyzing is false.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ChangeContentOverlay">ChangeContentOverlay: object</a></dt><dd>
|
||
<p>
|
||
A directive to modify an existing file content overlay. A
|
||
range of text is deleted from the old file content overlay
|
||
and replaced with new text.
|
||
</p>
|
||
<p>
|
||
It is an error to use this directive is used on a file that
|
||
does not yet have a file content overlay (or that has had
|
||
its overlay removed via <a href="#type_RemoveContentOverlay">RemoveContentOverlay</a>).
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>type = "change"</i></b></dt><dd></dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the text to be remove from the file
|
||
content overlay.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the text to be removed from the file
|
||
content overlay, or 0 if no text should be removed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>replacement ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The new text which should be inserted in place of the
|
||
removed text.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionId">CompletionId: String</a></dt><dd>
|
||
|
||
<p>
|
||
An identifier used to associate completion results with a
|
||
completion request.
|
||
</p>
|
||
</dd><dt class="typeDefinition"><a name="type_CompletionRelevance">CompletionRelevance: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the relevance of a completion
|
||
suggestion.
|
||
</p>
|
||
|
||
<dl><dt class="value">LOW</dt><dt class="value">DEFAULT</dt><dt class="value">HIGH</dt></dl></dd><dt class="typeDefinition"><a name="type_CompletionSuggestion">CompletionSuggestion: object</a></dt><dd>
|
||
<p>
|
||
A suggestion for how to complete partially entered text. Many
|
||
of the fields are optional, depending on the kind of element
|
||
being suggested.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>kind ( <a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kind of element being suggested.
|
||
</p>
|
||
</dd><dt class="field"><b><i>relevance ( <a href="#type_CompletionRelevance">CompletionRelevance</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The relevance of this completion suggestion.
|
||
</p>
|
||
</dd><dt class="field"><b><i>completion ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The identifier to be inserted if the suggestion is
|
||
selected. If the suggestion is for a method or function,
|
||
the client might want to additionally insert a template
|
||
for the parameters. The information required in order to
|
||
do so is contained in other fields.
|
||
</p>
|
||
</dd><dt class="field"><b><i>selectionOffset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset, relative to the beginning of the completion,
|
||
of where the selection should be placed after insertion.
|
||
</p>
|
||
</dd><dt class="field"><b><i>selectionLength ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The number of characters that should be selected after
|
||
insertion.
|
||
</p>
|
||
</dd><dt class="field"><b><i>isDeprecated ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the suggested element is deprecated.
|
||
</p>
|
||
</dd><dt class="field"><b><i>isPotential ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the element is not known to be valid for the
|
||
target. This happens if the type of the target is dynamic.
|
||
</p>
|
||
</dd><dt class="field"><b><i>docSummary ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
An abbreviated version of the Dartdoc associated with the
|
||
element being suggested, This field is omitted if there is
|
||
no Dartdoc associated with the element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>docComplete ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The Dartdoc associated with the element being suggested,
|
||
This field is omitted if there is no Dartdoc associated
|
||
with the element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>declaringType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The class that declares the element being suggested. This
|
||
field is omitted if the suggested element is not a member
|
||
of a class.
|
||
</p>
|
||
</dd><dt class="field"><b><i>returnType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The return type of the getter, function or method being
|
||
suggested. This field is omitted if the suggested element
|
||
is not a getter, function or method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameterNames ( <span style="color:#999999">optional</span> List<String> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The names of the parameters of the function or method
|
||
being suggested. This field is omitted if the suggested
|
||
element is not a setter, function or method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameterTypes ( <span style="color:#999999">optional</span> List<String> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The types of the parameters of the function or method
|
||
being suggested. This field is omitted if the
|
||
parameterNames field is omitted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>requiredParameterCount ( <span style="color:#999999">optional</span> int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The number of required parameters for the function or
|
||
method being suggested. This field is omitted if the
|
||
parameterNames field is omitted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>positionalParameterCount ( <span style="color:#999999">optional</span> int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The number of positional parameters for the function or
|
||
method being suggested. This field is omitted if the
|
||
parameterNames field is omitted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameterName ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the optional parameter being suggested. This
|
||
field is omitted if the suggestion is not the addition of
|
||
an optional argument within an argument list.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameterType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The type of the options parameter being suggested. This
|
||
field is omitted if the parameterName field is omitted.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionSuggestionKind">CompletionSuggestionKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of elements that can be included
|
||
in a completion suggestion.
|
||
</p>
|
||
|
||
<dl><dt class="value">ARGUMENT_LIST</dt><dt class="value">CLASS</dt><dt class="value">CLASS_ALIAS</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">FIELD</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER</dt><dt class="value">IMPORT</dt><dt class="value">LIBRARY_PREFIX</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">METHOD_NAME</dt><dt class="value">NAMED_ARGUMENT</dt><dt class="value">OPTIONAL_ARGUMENT</dt><dt class="value">PARAMETER</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt></dl></dd><dt class="typeDefinition"><a name="type_DebugContextId">DebugContextId: String</a></dt><dd>
|
||
|
||
<p>
|
||
The identifier for a debug context.
|
||
</p>
|
||
</dd><dt class="typeDefinition"><a name="type_DebugService">DebugService: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the services provided by the debug
|
||
domain.
|
||
</p>
|
||
|
||
<dl><dt class="value">LAUNCH_DATA</dt></dl></dd><dt class="typeDefinition"><a name="type_Element">Element: object</a></dt><dd>
|
||
<p>
|
||
Information about an element (something that can be declared
|
||
in code).
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>kind ( <a href="#type_ElementKind">ElementKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kind of the element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the element. This is typically used as the
|
||
label in the outline.
|
||
</p>
|
||
</dd><dt class="field"><b><i>location ( <span style="color:#999999">optional</span> <a href="#type_Location">Location</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The location of the name in the declaration of the
|
||
element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>flags ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A bit-map containing the following flags:
|
||
</p>
|
||
<ul>
|
||
<li>0x01 - set if the element is explicitly or implicitly abstract</li>
|
||
<li>0x02 - set if the element was declared to be ‘const’</li>
|
||
<li>0x04 - set if the element was declared to be ‘final’</li>
|
||
<li>0x08 - set if the element is a static member of a class or is a top-level function or field</li>
|
||
<li>0x10 - set if the element is private</li>
|
||
<li>0x20 - set if the element is deprecated</li>
|
||
</ul>
|
||
</dd><dt class="field"><b><i>parameters ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The parameter list for the element. If the element is not
|
||
a method or function this field will not be defined. If
|
||
the element has zero parameters, this field will have a
|
||
value of "()".
|
||
</p>
|
||
</dd><dt class="field"><b><i>returnType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The return type of the element. If the element is not a
|
||
method or function this field will not be defined. If the
|
||
element does not have a declared return type, this field
|
||
will contain an empty string.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ElementKind">ElementKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of elements.
|
||
</p>
|
||
|
||
<dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">GETTER</dt><dt class="value">FIELD</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">LIBRARY</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNKNOWN</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class="value">UNIT_TEST_TEST</dt></dl></dd><dt class="typeDefinition"><a name="type_Error">Error: object</a></dt><dd>
|
||
<p>
|
||
An indication of a problem with the execution of the server,
|
||
typically in response to a request. The error codes that can
|
||
be returned are documented in the section titled Errors.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>code ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A code that uniquely identifies the error that occurred.
|
||
</p>
|
||
</dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A short description of the error.
|
||
</p>
|
||
</dd><dt class="field"><b><i>data ( <span style="color:#999999">optional</span> object )</i></b></dt><dd>
|
||
|
||
<p>
|
||
Additional data related to the error. This field is
|
||
omitted if there is no additional data available.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ErrorFixes">ErrorFixes: object</a></dt><dd>
|
||
<p>
|
||
A list of fixes associated with a specific error
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>error ( <a href="#type_AnalysisError">AnalysisError</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The error with which the fixes are associated.
|
||
</p>
|
||
</dd><dt class="field"><b><i>fixes ( List<<a href="#type_SourceChange">SourceChange</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The fixes associated with the error.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ErrorSeverity">ErrorSeverity: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the possible severities of analysis
|
||
errors.
|
||
</p>
|
||
|
||
<dl><dt class="value">INFO</dt><dt class="value">WARNING</dt><dt class="value">ERROR</dt></dl></dd><dt class="typeDefinition"><a name="type_ErrorType">ErrorType: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the possible types of analysis errors.
|
||
</p>
|
||
|
||
<dl><dt class="value">COMPILE_TIME_ERROR</dt><dt class="value">HINT</dt><dt class="value">STATIC_TYPE_WARNING</dt><dt class="value">STATIC_WARNING</dt><dt class="value">SYNTACTIC_ERROR</dt><dt class="value">TODO</dt></dl></dd><dt class="typeDefinition"><a name="type_ExecutableFile">ExecutableFile: object</a></dt><dd>
|
||
<p>
|
||
A description of an executable file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The path of the executable file.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( <a href="#type_ExecutableKind">ExecutableKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region to be highlighted.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ExecutableKind">ExecutableKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of executable files.
|
||
</p>
|
||
|
||
<dl><dt class="value">CLIENT</dt><dt class="value">EITHER</dt><dt class="value">SERVER</dt></dl></dd><dt class="typeDefinition"><a name="type_FilePath">FilePath: String</a></dt><dd>
|
||
|
||
<p>
|
||
The absolute path of a file.
|
||
</p>
|
||
</dd><dt class="typeDefinition"><a name="type_FoldingKind">FoldingKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of folding regions.
|
||
</p>
|
||
|
||
<dl><dt class="value">COMMENT</dt><dt class="value">CLASS_MEMBER</dt><dt class="value">DIRECTIVES</dt><dt class="value">DOCUMENTATION_COMMENT</dt><dt class="value">TOP_LEVEL_DECLARATION</dt></dl></dd><dt class="typeDefinition"><a name="type_FoldingRegion">FoldingRegion: object</a></dt><dd>
|
||
<p>
|
||
A description of a region that can be folded.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>kind ( <a href="#type_FoldingKind">FoldingKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kind of the region.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region to be folded.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the region to be folded.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_HighlightRegion">HighlightRegion: object</a></dt><dd>
|
||
<p>
|
||
A description of a region that could have special highlighting
|
||
associated with it.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>type ( <a href="#type_HighlightRegionType">HighlightRegionType</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The type of highlight associated with the region.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region to be highlighted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the region to be highlighted.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_HighlightRegionType">HighlightRegionType: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of highlighting that can be
|
||
applied to files.
|
||
</p>
|
||
|
||
<dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt class="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMMENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE</dt><dt class="value">FIELD</dt><dt class="value">FIELD_STATIC</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_DECLARATION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER_DECLARATION</dt><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT_PREFIX</dt><dt class="value">KEYWORD</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUBLE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt><dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">LOCAL_VARIABLE_DECLARATION</dt><dt class="value">METHOD</dt><dt class="value">METHOD_DECLARATION</dt><dt class="value">METHOD_DECLARATION_STATIC</dt><dt class="value">METHOD_STATIC</dt><dt class="value">PARAMETER</dt><dt class="value">SETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="value">TYPE_PARAMETER</dt></dl></dd><dt class="typeDefinition"><a name="type_HoverInformation">HoverInformation: object</a></dt><dd>
|
||
<p>
|
||
The hover information associated with a specific location.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the range of characters that encompases the
|
||
cursor position and has the same hover information as the
|
||
cursor position.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the range of characters that encompases the
|
||
cursor position and has the same hover information as the
|
||
cursor position.
|
||
</p>
|
||
</dd><dt class="field"><b><i>containingLibraryPath ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The path to the defining compilation unit of the library
|
||
in which the referenced element is declared. This data is
|
||
omitted if there is no referenced element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>containingLibraryName ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the library in which the referenced element is
|
||
declared. This data is omitted if there is no referenced
|
||
element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>dartdoc ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The dartdoc associated with the referenced element. Other
|
||
than the removal of the comment delimiters, including
|
||
leading asterisks in the case of a block comment, the
|
||
dartdoc is unprocessed markdown. This data is omitted if
|
||
there is no referenced element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>elementDescription ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A human-readable description of the element being
|
||
referenced. This data is omitted if there is no referenced
|
||
element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>elementKind ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A human-readable description of the kind of element being
|
||
referenced (such as “class” or “function type
|
||
alias”). This data is omitted if there is no referenced
|
||
element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameter ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A human-readable description of the parameter
|
||
corresponding to the expression being hovered over. This
|
||
data is omitted if the location is not in an argument to a
|
||
function.
|
||
</p>
|
||
</dd><dt class="field"><b><i>propagatedType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the propagated type of the expression. This
|
||
data is omitted if the location does not correspond to an
|
||
expression or if there is no propagated type information.
|
||
</p>
|
||
</dd><dt class="field"><b><i>staticType ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the static type of the expression. This data
|
||
is omitted if the location does not correspond to an
|
||
expression.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditGroup">LinkedEditGroup: object</a></dt><dd>
|
||
<p>
|
||
A collection of positions that should be linked (edited
|
||
simultaneously) for the purposes of updating code after a
|
||
source change. For example, if a set of edits introduced a
|
||
new variable name, the group would contain all of the
|
||
positions of the variable name so that if the client wanted
|
||
to let the user edit the variable name after the operation,
|
||
all occurrences of the name could be edited simultaneously.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>positions ( List<<a href="#type_Position">Position</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The positions of the regions that should be edited
|
||
simultaneously.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the regions that should be edited
|
||
simultaneously.
|
||
</p>
|
||
</dd><dt class="field"><b><i>suggestions ( List<<a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
Pre-computed suggestions for what every region might
|
||
want to be changed to.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditSuggestion">LinkedEditSuggestion: object</a></dt><dd>
|
||
<p>
|
||
A suggestion of a value that could be used to replace all of
|
||
the linked edit regions in a LinkedEditGroup.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>value ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The value that could be used to replace all of the linked
|
||
edit regions.
|
||
</p>
|
||
</dd><dt class="field"><b><i>kind ( <a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kind of value being proposed.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditSuggestionKind">LinkedEditSuggestionKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kind of values that can be suggested
|
||
for a linked edit.
|
||
</p>
|
||
|
||
<dl><dt class="value">METHOD</dt><dt class="value">PARAMETER</dt><dt class="value">TYPE</dt><dt class="value">VARIABLE</dt></dl></dd><dt class="typeDefinition"><a name="type_Location">Location: object</a></dt><dd>
|
||
<p>
|
||
A location (character range) within a file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the range.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the range.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the range.
|
||
</p>
|
||
</dd><dt class="field"><b><i>startLine ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The one-based index of the line containing the first
|
||
character of the range.
|
||
</p>
|
||
</dd><dt class="field"><b><i>startColumn ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The one-based index of the column containing the first
|
||
character of the range.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_NavigationRegion">NavigationRegion: object</a></dt><dd>
|
||
<p>
|
||
A description of a region from which the user can navigate to
|
||
the declaration of an element.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region from which the user can navigate.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the region from which the user can navigate.
|
||
</p>
|
||
</dd><dt class="field"><b><i>targets ( List<<a href="#type_Element">Element</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The elements to which the given region is bound. By
|
||
opening the declaration of the elements, clients can
|
||
implement one form of navigation.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_Occurrences">Occurrences: object</a></dt><dd>
|
||
<p>
|
||
A description of the references to a single element within a
|
||
single file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The element that was referenced.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offsets ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offsets of the name of the referenced element within
|
||
the file.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the name of the referenced element.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_Outline">Outline: object</a></dt><dd>
|
||
<p>
|
||
An node in the outline structure of a file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A description of the element represented by this node.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the first character of the element. This is
|
||
different than the offset in the Element, which if the
|
||
offset of the name of the element. It can be used, for
|
||
example, to map locations in the file back to an outline.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the element.
|
||
</p>
|
||
</dd><dt class="field"><b><i>children ( <span style="color:#999999">optional</span> List<<a href="#type_Outline">Outline</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The children of the node. The field will be omitted if the
|
||
node has no children.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_Override">Override: object</a></dt><dd>
|
||
<p>
|
||
A description of a member that overrides an inherited member.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the name of the overriding member.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the name of the overriding member.
|
||
</p>
|
||
</dd><dt class="field"><b><i>superclassMember ( <span style="color:#999999">optional</span> <a href="#type_OverriddenMember">OverriddenMember</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The member inherited from a superclass that is overridden
|
||
by the overriding member. The field is omitted if there is
|
||
no superclass member, in which case there must be at least
|
||
one interface member.
|
||
</p>
|
||
</dd><dt class="field"><b><i>interfaceMembers ( <span style="color:#999999">optional</span> List<<a href="#type_OverriddenMember">OverriddenMember</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The members inherited from interfaces that are overridden
|
||
by the overriding member. The field is omitted if there
|
||
are no interface members, in which case there must be a
|
||
superclass member.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_OverriddenMember">OverriddenMember: object</a></dt><dd>
|
||
<p>
|
||
A description of a member that is being overridden.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The element that is being overridden.
|
||
</p>
|
||
</dd><dt class="field"><b><i>className ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name of the class in which the member is defined.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_Parameter">Parameter: object</a></dt><dd>
|
||
<p>
|
||
A description of a parameter.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>type ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The type that should be given to the parameter.
|
||
</p>
|
||
</dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name that should be given to the parameter.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_Position">Position: object</a></dt><dd>
|
||
<p>
|
||
A position within a file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the position.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the position.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_RefactoringKind">RefactoringKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of refactorings that can be
|
||
created.
|
||
</p>
|
||
|
||
<dl><dt class="value">CONVERT_GETTER_TO_METHOD</dt><dt class="value">CONVERT_METHOD_TO_GETTER</dt><dt class="value">EXTRACT_LOCAL_VARIABLE</dt><dt class="value">EXTRACT_METHOD</dt><dt class="value">INLINE_LOCAL_VARIABLE</dt><dt class="value">INLINE_METHOD</dt><dt class="value">RENAME</dt></dl></dd><dt class="typeDefinition"><a name="type_RefactoringProblem">RefactoringProblem: object</a></dt><dd>
|
||
<p>
|
||
A description of a problem related to a refactoring.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>severity ( <a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The severity of the problem being represented.
|
||
</p>
|
||
</dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A human-readable description of the problem being
|
||
represented.
|
||
</p>
|
||
</dd><dt class="field"><b><i>location ( <a href="#type_Location">Location</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The location of the problem being represented.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_RefactoringProblemSeverity">RefactoringProblemSeverity: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the severities of problems that can be
|
||
returned by the refactoring requests.
|
||
</p>
|
||
|
||
<dl><dt class="value">INFO</dt><dt class="value">WARNING</dt><dt class="value">ERROR</dt><dt class="value">FATAL</dt></dl></dd><dt class="typeDefinition"><a name="type_RemoveContentOverlay">RemoveContentOverlay: object</a></dt><dd>
|
||
<p>
|
||
A directive to remove an existing file content overlay.
|
||
After processing this directive, the file contents will once
|
||
again be read from the file system.
|
||
</p>
|
||
<p>
|
||
If this directive is used on a file that doesn't currently
|
||
have a content overlay, it has no effect.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>type = "remove"</i></b></dt><dd></dd></dl></dd><dt class="typeDefinition"><a name="type_SearchId">SearchId: String</a></dt><dd>
|
||
|
||
<p>
|
||
An identifier used to associate search results with a search
|
||
request.
|
||
</p>
|
||
</dd><dt class="typeDefinition"><a name="type_SearchResult">SearchResult: object</a></dt><dd>
|
||
<p>
|
||
A single result from a search request.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>location ( <a href="#type_Location">Location</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The location of the code that matched the search criteria.
|
||
</p>
|
||
</dd><dt class="field"><b><i>kind ( <a href="#type_SearchResultKind">SearchResultKind</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The kind of element that was found or the kind of
|
||
reference that was found.
|
||
</p>
|
||
</dd><dt class="field"><b><i>isPotential ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the result is a potential match but cannot be
|
||
confirmed to be a match. For example, if all references to
|
||
a method m defined in some class were requested, and a
|
||
reference to a method m from an unknown class were found,
|
||
it would be marked as being a potential match.
|
||
</p>
|
||
</dd><dt class="field"><b><i>path ( List<<a href="#type_Element">Element</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The elements that contain the result, starting with the
|
||
most immediately enclosing ancestor and ending with the
|
||
library.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_SearchResultKind">SearchResultKind: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the kinds of search results returned by the
|
||
search domain.
|
||
</p>
|
||
|
||
<dl><dt class="value">DECLARATION</dt><dd>
|
||
|
||
<p>
|
||
The declaration of an element.
|
||
</p>
|
||
</dd><dt class="value">INVOCATION</dt><dd>
|
||
|
||
<p>
|
||
The invocation of a function or method.
|
||
</p>
|
||
</dd><dt class="value">READ</dt><dd>
|
||
|
||
<p>
|
||
A reference to a field, parameter or variable where it is being read.
|
||
</p>
|
||
</dd><dt class="value">READ_WRITE</dt><dd>
|
||
|
||
<p>
|
||
A reference to a field, parameter or variable where it is being read and written.
|
||
</p>
|
||
</dd><dt class="value">REFERENCE</dt><dd>
|
||
|
||
<p>
|
||
A reference to an element.
|
||
</p>
|
||
</dd><dt class="value">WRITE</dt><dd>
|
||
|
||
<p>
|
||
A reference to a field, parameter or variable where it is being written.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_ServerService">ServerService: String</a></dt><dd>
|
||
<p>
|
||
An enumeration of the services provided by the server domain.
|
||
</p>
|
||
|
||
<dl><dt class="value">STATUS</dt></dl></dd><dt class="typeDefinition"><a name="type_SourceChange">SourceChange: object</a></dt><dd>
|
||
<p>
|
||
A description of a set of edits that implement a single
|
||
conceptual change.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>message ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A human-readable description of the change to be applied.
|
||
</p>
|
||
</dd><dt class="field"><b><i>edits ( List<<a href="#type_SourceFileEdit">SourceFileEdit</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the edits used to effect the change, grouped by
|
||
file.
|
||
</p>
|
||
</dd><dt class="field"><b><i>linkedEditGroups ( List<<a href="#type_LinkedEditGroup">LinkedEditGroup</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the linked editing groups used to customize
|
||
the changes that were made.
|
||
</p>
|
||
</dd><dt class="field"><b><i>selection ( <span style="color:#999999">optional</span> <a href="#type_Position">Position</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The position that should be selected after the edits
|
||
have been applied.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_SourceEdit">SourceEdit: object</a></dt><dd>
|
||
<p>
|
||
A description of a single change to a single file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset of the region to be modified.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the region to be modified.
|
||
</p>
|
||
</dd><dt class="field"><b><i>replacement ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The code that is to replace the specified region in the
|
||
original code.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_SourceFileEdit">SourceFileEdit: object</a></dt><dd>
|
||
<p>
|
||
A description of a set of changes to a single file.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The file containing the code to be modified.
|
||
</p>
|
||
</dd><dt class="field"><b><i>edits ( List<<a href="#type_SourceEdit">SourceEdit</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
A list of the edits used to effect the change.
|
||
</p>
|
||
</dd></dl></dd><dt class="typeDefinition"><a name="type_TypeHierarchyItem">TypeHierarchyItem: object</a></dt><dd>
|
||
<p>
|
||
A representation of a class in a type hierarchy.
|
||
</p>
|
||
|
||
<dl><dt class="field"><b><i>classElement ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The class element represented by this item.
|
||
</p>
|
||
</dd><dt class="field"><b><i>displayName ( <span style="color:#999999">optional</span> String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name to be displayed for the class. This field will be
|
||
omitted if the display name is the same as the name of the
|
||
element. The display name is different if there is
|
||
additional type information to be displayed, such as type
|
||
arguments.
|
||
</p>
|
||
</dd><dt class="field"><b><i>memberElement ( <span style="color:#999999">optional</span> <a href="#type_Element">Element</a> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The member in the class corresponding to the member on
|
||
which the hierarchy was requested. This field will be
|
||
omitted if the hierarchy was not requested for a member or
|
||
if the class does not have a corresponding member.
|
||
</p>
|
||
</dd><dt class="field"><b><i>superclass ( <span style="color:#999999">optional</span> int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The index of the item representing the superclass of
|
||
this class. This field will be omitted if this item
|
||
represents the class Object.
|
||
</p>
|
||
</dd><dt class="field"><b><i>interfaces ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The indexes of the items representing the interfaces
|
||
implemented by this class. The list will be empty if
|
||
there are no implemented interfaces.
|
||
</p>
|
||
</dd><dt class="field"><b><i>mixins ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The indexes of the items representing the mixins
|
||
referenced by this class. The list will be empty if
|
||
there are no classes mixed in to this class.
|
||
</p>
|
||
</dd><dt class="field"><b><i>subclasses ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The indexes of the items representing the subtypes of
|
||
this class. The list will be empty if there are no
|
||
subtypes or if this item represents a supertype of the
|
||
pivot type.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
|
||
<h2><a name="refactorings">Refactorings</a></h2>
|
||
<p>
|
||
This section contains additional information for each kind of
|
||
refactoring. In addition to a brief description of the
|
||
refactoring, there is a specification of the feedback that is
|
||
provided when a refactoring is created using the
|
||
edit.createRefactoring request (designed to improve the UX)
|
||
and the options that must be set using the
|
||
edit.setRefactoringOptions request before the refactoring can
|
||
be applied.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dl><dt class="refactoring">CONVERT_GETTER_TO_METHOD</dt><dd>
|
||
<p>
|
||
Convert a getter into a method by removing the keyword get
|
||
and adding an empty parameter list.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than all
|
||
or part of the name of a single getter.
|
||
</p>
|
||
<h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="refactoring">CONVERT_METHOD_TO_GETTER</dt><dd>
|
||
<p>
|
||
Convert a method into a getter by adding the keyword get and
|
||
removing the parameter list.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than all
|
||
or part of the name of a single method or if the method has
|
||
a non-empty parameter list.
|
||
</p>
|
||
<h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="refactoring">EXTRACT_LOCAL_VARIABLE</dt><dd>
|
||
<p>
|
||
Create a local variable initialized by a specified
|
||
expression.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than a
|
||
complete expression (no partial expressions are allowed).
|
||
</p>
|
||
|
||
|
||
<h4>Feedback</h4><dl><dt class="field"><b><i>names ( List<String> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The proposed names for the local variable.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offsets ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offsets of the expressions that would be replaced by
|
||
a reference to the variable.
|
||
</p>
|
||
</dd><dt class="field"><b><i>lengths ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The lengths of the expressions that would be replaced by
|
||
a reference to the variable. The lengths correspond to
|
||
the offsets. In other words, for a given expression, if
|
||
the offset of that expression is offsets[i], then the
|
||
length of that expression is lengths[i].
|
||
</p>
|
||
</dd></dl><h4>Options</h4><dl><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name that the local variable should be given.
|
||
</p>
|
||
</dd><dt class="field"><b><i>extractAll ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if all occurrences of the expression within the
|
||
scope in which the variable will be defined should be
|
||
replaced by a reference to the local variable. The
|
||
expression used to initiate the refactoring will always
|
||
be replaced.
|
||
</p>
|
||
</dd></dl></dd><dt class="refactoring">EXTRACT_METHOD</dt><dd>
|
||
<p>
|
||
Create a method whose body is the specified expression or
|
||
list of statements, possibly augmented with a return
|
||
statement.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than a
|
||
complete expression (no partial expressions are allowed) or
|
||
a complete sequence of statements.
|
||
</p>
|
||
|
||
|
||
<h4>Feedback</h4><dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset to the beginning of the expression or
|
||
statements that will be extracted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the expression or statements that will be
|
||
extracted.
|
||
</p>
|
||
</dd><dt class="field"><b><i>returnType ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The proposed return type for the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>names ( List<String> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The proposed names for the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>canCreateGetter ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if a getter could be created rather than a method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameters ( List<<a href="#type_Parameter">Parameter</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The proposed parameters for the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>occurrences ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The number of times the expression or statements occurs.
|
||
</p>
|
||
</dd><dt class="field"><b><i>offsets ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offsets of the expressions or statements that would
|
||
be replaced by an invocation of the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>lengths ( List<int> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The lengths of the expressions or statements that would
|
||
be replaced by an invocation of the method. The lengths
|
||
correspond to the offsets. In other words, for a given
|
||
expression (or block of statements), if the offset of
|
||
that expression is offsets[i], then the length of that
|
||
expression is lengths[i].
|
||
</p>
|
||
</dd></dl><h4>Options</h4><dl><dt class="field"><b><i>returnType ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The return type that should be defined for the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>createGetter ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if a getter should be created rather than a
|
||
method. It is an error if this field is true and the
|
||
list of parameters is non-empty.
|
||
</p>
|
||
</dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name that the method should be given.
|
||
</p>
|
||
</dd><dt class="field"><b><i>parameters ( List<<a href="#type_Parameter">Parameter</a>> )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The parameters that should be defined for the method.
|
||
</p>
|
||
</dd><dt class="field"><b><i>extractAll ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if all occurrences of the expression or statements
|
||
should be replaced by an invocation of the method. The
|
||
expression or statements used to initiate the
|
||
refactoring will always be replaced.
|
||
</p>
|
||
</dd></dl></dd><dt class="refactoring">INLINE_LOCAL_VARIABLE</dt><dd>
|
||
<p>
|
||
Inline the initializer expression of a local variable in
|
||
place of any references to that variable.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than all
|
||
or part of the name of a single local variable.
|
||
</p>
|
||
<h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="refactoring">INLINE_METHOD</dt><dd>
|
||
<p>
|
||
Inline a method in place of one or all references to that
|
||
method.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than all
|
||
or part of the name of a single method.
|
||
</p>
|
||
|
||
<h4>Feedback</h4><p>none</p><h4>Options</h4><dl><dt class="field"><b><i>deleteSource ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if the method being inlined should be removed. It
|
||
is an error if this field is true and inlineAll is
|
||
false.
|
||
</p>
|
||
</dd><dt class="field"><b><i>inlineAll ( bool )</i></b></dt><dd>
|
||
|
||
<p>
|
||
True if all invocations of the method should be inlined,
|
||
or false if only the invocation site used to create this
|
||
refactoring should be inlined.
|
||
</p>
|
||
</dd></dl></dd><dt class="refactoring">RENAME</dt><dd>
|
||
<p>
|
||
Rename a given element and all of the references to that
|
||
element.
|
||
</p>
|
||
<p>
|
||
It is an error if the range contains anything other than all
|
||
or part of the name of a single function (including methods,
|
||
getters and setters), variable (including fields, parameters
|
||
and local variables), class or function type.
|
||
</p>
|
||
|
||
|
||
<h4>Feedback</h4><dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The offset to the beginning of the name selected to be
|
||
renamed.
|
||
</p>
|
||
</dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The length of the name selected to be renamed.
|
||
</p>
|
||
</dd></dl><h4>Options</h4><dl><dt class="field"><b><i>newName ( String )</i></b></dt><dd>
|
||
|
||
<p>
|
||
The name that the element should have after the
|
||
refactoring.
|
||
</p>
|
||
</dd></dl></dd></dl>
|
||
<h2>Errors</h2>
|
||
<p>
|
||
This section contains a list of all of the errors that are
|
||
produced by the server and the data that is returned with each.
|
||
</p>
|
||
<p>
|
||
TBD
|
||
</p>
|
||
|
||
|
||
</body></html> |