Analysis Server API Specification

Version 1.32.8

This document contains a specification of the API provided by the analysis server. The API in this document is currently under development. Changes to the API will be accompanied by an update to the protocol version number according to the principles of semantic versioning (semver.org).

Overview

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.

Transport Mechanism

The characters passed to the server are expected to be encoded using UTF-8.

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.

It is the client's responsibility to read output from the server to avoid its blocking.

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 "{}" or "[]" with null. The server will always properly represent empty lists as "[]" and empty maps as "{}".

Communication Structure

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.

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.

Every request is required to have two fields and may have two additional optional fields. 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. One 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. The other optional field is the 'clientRequestTime' field, which is a number indicating the time at which the client made the request (milliseconds since epoch). Providing clientRequestTime helps us track how responsive analysis server is to client requests and better address any issues that occur.

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.

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.

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.

In order to be backward compatible, clients should ignore fields that were not specified in the version of the API on which they were based. Clients should also use the server.getVersion request to test that the version of the server supports an API before using it.

Eventual Consistency

The analysis server satisfies requests under the principle of eventual consistency. That is, in some cases it may return responses with the currently available results while it's catching up with unprocessed changes.

Enumerations

Responses from the server may include enumerations indicating the kind of a specific item. The enums may be extended with new values in future versions of the server so clients should ensure unknown values are handled gracefully, either ignoring the item or treating it with some default/fallback handling.

Changelog

1.32.8

1.32.7

1.32.6

1.32.5

1.32.4

1.32.3

1.32.2

1.32.1

Domains

For convenience, the API is divided into domains. Each domain is specified in a separate section below. The specifications of the API’s refer to data structures beyond the standard JSON primitives. These data structures are documented in the section titled Types.

Command-line Arguments

The command-line arguments that can be passed to the server.

Options

--client-id

Specifies an identifier associated with the client. Used when generating error reports.

Clients are strongly encouraged to provide this information in order to improve the quality of information that can be provided to them.

--client-version

Specifies the version of the client that is communicating with the server. Used when generating error reports.

Clients are strongly encouraged to provide this information in order to improve the quality of information that can be provided to them.

--no-error-notification

Deprecated: clients should no longer pass this option in

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.
--no-index

Deprecated: clients should no longer pass this option in

This flag used to disable the server from generating an index, but now it has no effect.
--file-read-mode

Deprecated: clients should no longer pass this option in

An enumeration of the ways files can be read from disk. Some clients normalize end of line characters which would make the file offset and range information incorrect. The default option is as-is, but can also be set to normalize-eol-always. The default option (as-is) reads files as they are on disk. The normalize-eol-always option does the following:
  • '\r\n' is converted to '\n';
  • '\r' by itself is converted to '\n';
  • this happens regardless of the OS editor is running on.

The server domain contains API’s related to the execution of the server.

Return the version number of the analysis server.

String

The version number of the analysis server.

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.

Subscribe for services. All previous subscriptions are replaced by the given set of services.

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.

ServerService

A list of the services being subscribed to.

Requests cancellation of a request sent by the client by id. This is provided on a best-effort basis and there is no guarantee the server will be able to cancel any specific request. The server will still always produce a response to the request even in the case of cancellation, but clients should discard any results of any cancelled request because they may be incomplete or inaccurate. This request always completes without error regardless of whether the request is successfully cancelled.

String

The id of the request that should be cancelled.

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.

It is not possible to subscribe to or unsubscribe from this notification.

String

The version number of the analysis server.

int

The process id of the analysis server process.

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.

It is not possible to subscribe to or unsubscribe from this notification.

bool

True if the error is a fatal error, meaning that the server will shutdown automatically after sending this notification.

String

The error message indicating what kind of error was encountered.

String

The stack trace associated with the generation of the error, used for debugging the server.

The stream of entries describing events happened in the server.

ServerLogEntry

Reports the current status of the server. Parameters are omitted if there has been no change in the status represented by that parameter.

This notification is not subscribed to by default. Clients can subscribe by including the value "STATUS" in the list of services passed in a server.setSubscriptions request.

AnalysisStatus

The current status of analysis, including whether analysis is being performed and if so what is being analyzed.

PubStatus

The current status of pub execution, indicating whether we are currently running pub.

Note: this status type is deprecated, and is no longer sent by the server.

The analysis domain contains API’s related to the analysis of files.

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. If the content of the file changes after this request was received but before a response could be sent, then an error of type CONTENT_MODIFIED will be generated.

This request is intended to be used by clients that cannot asynchronously apply updated error information. Clients that can apply error information as it becomes available should use the information provided by the 'analysis.errors' notification.

If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_ERRORS_INVALID_FILE will be generated.

FilePath

The file for which errors are being requested.

AnalysisError

The errors associated with the file.

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.

FilePath

The file in which hover information is being requested.

int

The offset for which hover information is being requested.

HoverInformation

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).

Return a description of all of the elements referenced in a given region of a given file that come from imported libraries.

If a request is made for a file that does not exist, or that is not currently subject to analysis (e.g. because it is not associated with any analysis root specified via analysis.setAnalysisRoots), an error of type GET_IMPORTED_ELEMENTS_INVALID_FILE will be generated.

FilePath

The file in which import information is being requested.

int

The offset of the region for which import information is being requested.

int

The length of the region for which import information is being requested.

ImportedElements

The information about the elements that are referenced in the specified region of the specified file that come from imported libraries.

Return library dependency information for use in client-side indexing and package URI resolution.

Clients that are only using the libraries field should consider using the analyzedFiles notification instead.

FilePath

A list of the paths of library elements referenced by files in existing analysis roots.

String String FilePath

A mapping from context source roots to package maps which map package names to source directories for use in client-side package URI resolution.

Return the navigation information associated with the given region of the given file. If the navigation information for the given file has not yet been computed, or the most recently computed navigation information for the given file is out of date, then the response for this request will be delayed until it has been computed. If the content of the file changes after this request was received but before a response could be sent, then an error of type CONTENT_MODIFIED will be generated.

If a navigation region overlaps (but extends either before or after) the given region of the file it will be included in the result. This means that it is theoretically possible to get the same navigation region in response to multiple requests. Clients can avoid this by always choosing a region that starts at the beginning of a line and ends at the end of a (possibly different) line in the file.

If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_NAVIGATION_INVALID_FILE will be generated.

FilePath

The file in which navigation information is being requested.

int

The offset of the region for which navigation information is being requested.

int

The length of the region for which navigation information is being requested.

FilePath

A list of the paths of files that are referenced by the navigation targets.

NavigationTarget

A list of the navigation targets that are referenced by the navigation regions.

NavigationRegion

A list of the navigation regions within the requested region of the file.

Return the transitive closure of reachable sources for a given file.

If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_REACHABLE_SOURCES_INVALID_FILE will be generated.

FilePath

The file for which reachable source information is being requested.

String String

A mapping from source URIs to directly reachable source URIs. For example, a file "foo.dart" that imports "bar.dart" would have the corresponding mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has further imports (or exports) there will be a mapping from the URI "file:///bar.dart" to them. To check if a specific URI is reachable from a given file, clients can check for its presence in the resulting key set.

Return the signature information associated with the given location in the given file. If the signature information for the given file has not yet been computed, or the most recently computed signature information for the given file is out of date, then the response for this request will be delayed until it has been computed. If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_SIGNATURE_INVALID_FILE will be generated. If the location given is not inside the argument list for a function (including method and constructor) invocation, then an error of type GET_SIGNATURE_INVALID_OFFSET will be generated. If the location is inside an argument list but the function is not defined or cannot be determined (such as a method invocation where the target has type 'dynamic') then an error of type GET_SIGNATURE_UNKNOWN_FUNCTION will be generated.

FilePath

The file in which signature information is being requested.

int

The location for which signature information is being requested.

String

The name of the function being invoked at the given offset.

ParameterInfo

A list of information about each of the parameters of the function being invoked.

String

The dartdoc associated with the function being invoked. 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, or if the element has no dartdoc.

Force re-reading of all potentially changed files, re-resolving of all referenced URIs, and corresponding re-analysis of everything affected in the current analysis roots.

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 either explicitly or implicitly excluded. A file is explicitly excluded if it is in one of the excluded paths. A file is implicitly excluded if it is in a subdirectory of one of the root paths where the name of the subdirectory starts with a period (that is, a hidden directory).

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.

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.

FilePath

A list of the files and directories that should be analyzed.

FilePath

A list of the files and directories within the included directories that should not be analyzed.

FilePath FilePath

A mapping from source directories to package roots that should override the normal package: URI resolution mechanism.

If a package root is a file, then the analyzer will behave as though that file is a ".packages" file in the source directory. The effect is the same as specifying the file as a "--packages" parameter to the Dart VM when executing any Dart file inside the source directory.

Files in any directories that are not overridden by this mapping have their package: URI's resolved using the normal pubspec.yaml mechanism. If this field is absent, or the empty map is specified, that indicates that the normal pubspec.yaml mechanism should always be used.

Subscribe for general services (that is, services that are not specific to individual files). All previous subscriptions are replaced by the given set of services.

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.

GeneralAnalysisService

A list of the services being subscribed to.

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.

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.)

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.

FilePath

The files that are to be a priority for analysis.

Subscribe for services that are specific to individual files. 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.

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.

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.

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.

AnalysisService FilePath

A table mapping services to a list of the files being subscribed to the service.

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.

FilePath AddContentOverlay ChangeContentOverlay RemoveContentOverlay

A table mapping the files whose content has changed to a description of the content change.

Deprecated: all of the options can be set by users in an analysis options file.

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, they will be silently ignored.

AnalysisOptions

The options that are to be used to control analysis.

Reports the paths of the files that are being analyzed.

This notification is not subscribed to by default. Clients can subscribe by including the value "ANALYZED_FILES" in the list of services passed in an analysis.setGeneralSubscriptions request.

FilePath

A list of the paths of the files that are being analyzed.

Reports closing labels relevant to a given file.

This notification is not subscribed to by default. Clients can subscribe by including the value "CLOSING_LABELS" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file the closing labels relate to.

ClosingLabel

Closing labels relevant to the file. Each item represents a useful label associated with some range with may be useful to display to the user within the editor at the end of the range to indicate what construct is closed at that location. Closing labels include constructor/method calls and List arguments that span multiple lines. Note that the ranges that are returned can overlap each other because they may be associated with constructs that can be nested.

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.

FilePath

The file containing the errors.

AnalysisError

The errors contained in the file.

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.

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.

It is not possible to subscribe to or unsubscribe from this notification.

FilePath

The files that are no longer being analyzed.

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.

This notification is not subscribed to by default. Clients can subscribe by including the value "FOLDING" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file containing the folding regions.

FoldingRegion

The folding regions contained in the file.

Reports the highlight regions associated with a given file.

This notification is not subscribed to by default. Clients can subscribe by including the value "HIGHLIGHTS" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file containing the highlight regions.

HighlightRegion

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.

Reports the classes that are implemented or extended and class members that are implemented or overridden in a file.

This notification is not subscribed to by default. Clients can subscribe by including the value "IMPLEMENTED" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file with which the implementations are associated.

ImplementedClass

The classes defined in the file that are implemented or extended.

ImplementedMember

The member defined in the file that are implemented or overridden.

Reports that the navigation information associated with a region of a single file has become invalid and should be re-requested.

This notification is not subscribed to by default. Clients can subscribe by including the value "INVALIDATE" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file whose information has been invalidated.

int

The offset of the invalidated region.

int

The length of the invalidated region.

int

The delta to be applied to the offsets in information that follows the invalidated region in order to update it so that it doesn't need to be re-requested.

Reports the navigation targets associated with a given file.

This notification is not subscribed to by default. Clients can subscribe by including the value "NAVIGATION" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file containing the navigation regions.

NavigationRegion

The navigation regions contained in the file. The regions are sorted by their offsets. 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.

NavigationTarget

The navigation targets referenced in the file. They are referenced by NavigationRegions by their index in this array.

FilePath

The files containing navigation targets referenced in the file. They are referenced by NavigationTargets by their index in this array.

Reports the occurrences of references to elements within a single file.

This notification is not subscribed to by default. Clients can subscribe by including the value "OCCURRENCES" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file in which the references occur.

Occurrences

The occurrences of references to elements within the file.

Reports the outline associated with a single file.

This notification is not subscribed to by default. Clients can subscribe by including the value "OUTLINE" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file with which the outline is associated.

FileKind

The kind of the file.

String

The name of the library defined by the file using a "library" directive, or referenced by a "part of" directive. If both "library" and "part of" directives are present, then the "library" directive takes precedence. This field will be omitted if the file has neither "library" nor "part of" directives.

Outline

The outline associated with the file.

Reports the overriding members in a file.

This notification is not subscribed to by default. Clients can subscribe by including the value "OVERRIDES" in the list of services passed in an analysis.setSubscriptions request.

FilePath

The file with which the overrides are associated.

Override

The overrides associated with the file.

The code completion domain contains commands related to getting code completion suggestions.

Request that completion suggestions for the given offset in the given file be returned.

FilePath

The file containing the point at which suggestions are to be made.

int

The offset within the file at which suggestions are to be made.

CompletionId

The identifier used to associate results with this completion request.

Request that completion suggestions for the given offset in the given file be returned. The suggestions will be filtered using fuzzy matching with the already existing prefix.

FilePath

The file containing the point at which suggestions are to be made.

int

The offset within the file at which suggestions are to be made.

int

The maximum number of suggestions to return. If the number of suggestions after filtering is greater than the maxResults, then isIncomplete is set to true.

CompletionMode

The mode of code completion being invoked. If no value is provided, BASIC will be assumed. BASIC is also the only currently supported.

int

The number of times that the user has invoked code completion at the same code location, counting from 1. If no value is provided, 1 will be assumed.

int

The approximate time in milliseconds that the server should spend. The server will perform some steps anyway, even if it takes longer than the specified timeout. This field is intended to be used for benchmarking, and usually should not be provided, so that the default timeout is used.

int

The offset of the start of the text to be replaced. This will be different from 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.

int

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).

CompletionSuggestion

The completion suggestions being reported. This list is filtered by the already existing prefix, and sorted first by relevance, and (if the same) by the suggestion text. The list will have at most maxResults items. If the user types a new keystroke, the client is expected to either do local filtering (when the returned list was complete), or ask the server again (if isIncomplete was true).

This list contains suggestions from both imported, and not yet imported libraries. Items from not yet imported libraries will have isNotImported set to true.

bool

True if the number of suggestions after filtering was greater than the requested maxResults.

Subscribe for completion services. All previous subscriptions are replaced by the given set of services.

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.

CompletionService

A list of the services being subscribed to.

The client can make this request to express interest in certain libraries to receive completion suggestions from based on the client path. If this request is received before the client has used 'completion.setSubscriptions' to subscribe to the AVAILABLE_SUGGESTION_SETS service, then an error of type NOT_SUBSCRIBED_TO_AVAILABLE_SUGGESTION_SETS will be generated. All previous paths are replaced by the given set of paths.

LibraryPathSet

A list of objects each containing a path and the additional libraries from which the client is interested in receiving completion suggestions. If one configured path is beneath another, the descendent will override the ancestors' configured libraries of interest.

Clients must make this request when the user has selected a completion suggestion from an AvailableSuggestionSet. Analysis server will respond with the text to insert as well as any SourceChange that needs to be applied in case the completion requires an additional import to be added. It is an error if the id is no longer valid, for instance if the library has been removed after the completion suggestion is accepted.

FilePath

The path of the file into which this completion is being inserted.

int

The identifier of the AvailableSuggestionSet containing the selected label.

String

The label from the AvailableSuggestionSet with the `id` for which insertion information is requested.

int

The offset in the file where the completion will be inserted.

String

The full text to insert, including any optional import prefix.

SourceChange

A change for the client to apply in case the library containing the accepted completion suggestion needs to be imported. The field will be omitted if there are no additional changes that need to be made.

Clients must make this request when the user has selected a completion suggestion with the isNotImported field set to true. The server will respond with the text to insert, as well as any SourceChange that needs to be applied in case the completion requires an additional import to be added. The text to insert might be different from the original suggestion to include an import prefix if the library will be imported with a prefix to avoid shadowing conflicts in the file.

FilePath

The path of the file into which this completion is being inserted.

int

The offset in the file where the completion will be inserted.

String

The completion from the selected CompletionSuggestion. It could be a name of a class, or a name of a constructor in form "typeName.constructorName()", or an enumeration constant in form "enumName.constantName", etc.

String

The URI of the library to import, so that the element referenced in the completion becomes accessible.

String

The full text to insert, which possibly includes now an import prefix. The client should insert this text, not the completion from the selected CompletionSuggestion.

SourceChange

A change for the client to apply to make the accepted completion suggestion available. In most cases the change is to add a new import directive to the file.

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.

CompletionId

The id associated with the completion.

int

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.

int

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).

CompletionSuggestion

The completion suggestions being reported. The notification contains all possible completions at the requested cursor position, even those that do not match the characters the user has already typed. This allows the client to respond to further keystrokes from the user without having to make additional requests.

bool

True if this is that last set of results that will be returned for the indicated completion.

FilePath

The library file that contains the file where completion was requested. The client might use it for example together with the existingImports notification to filter out available suggestions. If there were changes to existing imports in the library, the corresponding existingImports notification will be sent before the completion notification.

IncludedSuggestionSet

References to AvailableSuggestionSet objects previously sent to the client. The client can include applicable names from the referenced library in code completion suggestions.

ElementKind

The client is expected to check this list against the ElementKind sent in IncludedSuggestionSet to decide whether or not these symbols should should be presented to the user.

IncludedSuggestionRelevanceTag

The client is expected to check this list against the values of the field relevanceTags of AvailableSuggestion to decide if the suggestion should be given a different relevance than the IncludedSuggestionSet that contains it. This might be used for example to give higher relevance to suggestions of matching types.

If an AvailableSuggestion has relevance tags that match more than one IncludedSuggestionRelevanceTag, the maximum relevance boost is used.

Reports the pre-computed, candidate completions from symbols defined in a corresponding library. This notification may be sent multiple times. When a notification is processed, clients should replace any previous information about the libraries in the list of changedLibraries, discard any information about the libraries in the list of removedLibraries, and preserve any previously received information about any libraries that are not included in either list.

AvailableSuggestionSet

A list of pre-computed, potential completions coming from this set of completion suggestions.

int

A list of library ids that no longer apply.

Reports existing imports in a library. This notification may be sent multiple times for a library. When a notification is processed, clients should replace any previous information for the library.

FilePath

The defining file of the library.

ExistingImports

The existing imports in the library.

The search domain contains commands related to searches that can be performed against the code base.

Perform a search for references to the element defined or referenced at the given offset in the given file.

An identifier is returned immediately, and individual results will be returned via the search.results notification as they become available.

FilePath

The file containing the declaration of or reference to the element used to define the search.

int

The offset within the file of the declaration of or reference to the element.

bool

True if potential matches are to be included in the results.

SearchId

The identifier used to associate results with this search request.

If no element was found at the given location, this field will be absent, and no results will be reported via the search.results notification.

Element

The element referenced or defined at the given offset and whose references will be returned in the search results.

If no element was found at the given location, this field will be absent.

Perform a search for declarations of members whose name is equal to the given name.

An identifier is returned immediately, and individual results will be returned via the search.results notification as they become available.

String

The name of the declarations to be found.

SearchId

The identifier used to associate results with this search request.

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.

An identifier is returned immediately, and individual results will be returned via the search.results notification as they become available.

String

The name of the references to be found.

SearchId

The identifier used to associate results with this search request.

Perform a search for declarations of top-level elements (classes, typedefs, getters, setters, functions and fields) whose name matches the given pattern.

An identifier is returned immediately, and individual results will be returned via the search.results notification as they become available.

String

The regular expression used to match the names of the declarations to be found.

SearchId

The identifier used to associate results with this search request.

Return top-level and class member declarations.

FilePath

If this field is provided, return only declarations in this file. If this field is missing, return declarations in all files.

String

The regular expression used to match the names of declarations. If this field is missing, return all declarations.

int

The maximum number of declarations to return. If this field is missing, return all matching declarations.

ElementDeclaration

The list of declarations.

FilePath

The list of the paths of files with declarations.

Return the type hierarchy of the class declared or referenced at the given location.

FilePath

The file containing the declaration or reference to the type for which a hierarchy is being requested.

int

The offset of the name of the type within the file.

bool

True if the client is only requesting superclasses and interfaces hierarchy.

TypeHierarchyItem

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.

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.

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.

SearchId

The id associated with the search.

SearchResult

The search results being reported.

bool

True if this is that last set of results that will be returned for the indicated search.

The edit domain contains commands related to edits that can be applied to the code.

Format the contents of a single file. The currently selected region of text is passed in so that the selection can be preserved across the formatting operation. The updated selection will be as close to matching the original as possible, but whitespace at the beginning or end of the selected region will be ignored. If preserving selection information is not required, zero (0) can be specified for both the selection offset and selection length.

If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type FORMAT_INVALID_FILE will be generated. If the source contains syntax errors, an error of type FORMAT_WITH_ERRORS will be generated.

FilePath

The file containing the code to be formatted.

int

The offset of the current selection in the file.

int

The length of the current selection in the file.

int

The line length to be used by the formatter.

SourceEdit

The edit(s) to be applied in order to format the code. The list will be empty if the code was already formatted (there are no changes).

int

The offset of the selection after formatting the code.

int

The length of the selection after formatting the code.

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.

FilePath

The file containing the code for which assists are being requested.

int

The offset of the code for which assists are being requested.

int

The length of the code for which assists are being requested.

SourceChange

The assists that are available at the given location.

Get a list of the kinds of refactorings that are valid for the given selection in the given file.

FilePath

The file containing the code on which the refactoring would be based.

int

The offset of the code on which the refactoring would be based.

int

The length of the code on which the refactoring would be based.

RefactoringKind

The kinds of refactorings that are valid for the given selection.

Analyze the specified sources for fixes that can be applied in bulk and return a set of suggested edits for those sources. These edits may include changes to sources outside the set of specified sources if a change in a specified source requires it.

FilePath

A list of the files and directories for which edits should be suggested.

If a request is made with a path that is invalid, e.g. is not absolute and normalized, an error of type INVALID_FILE_PATH_FORMAT will be generated. If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type FILE_NOT_ANALYZED will be generated.

bool

A flag indicating whether the bulk fixes are being run in test mode. The only difference is that in test mode the fix processor will look for a configuration file that can modify the content of the data file used to compute the fixes when data-driven fixes are being considered.

If this field is omitted the flag defaults to false.

SourceFileEdit

A list of source edits to apply the recommended changes.

BulkFix

Details that summarize the fixes associated with the recommended changes.

Return the set of fixes that are available for the errors at a given offset in a given file.

If a request is made for a file which does not exist, or which is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_FIXES_INVALID_FILE will be generated.

FilePath

The file containing the errors for which fixes are being requested.

int

The offset used to select the errors for which fixes will be returned.

AnalysisErrorFixes

The fixes that are available for the errors at the given offset.

Get the changes required to convert the postfix template at the given location into the template's expanded form.

FilePath

The file containing the postfix template to be expanded.

String

The unique name that identifies the template in use.

int

The offset used to identify the code to which the template will be applied.

SourceChange

The change to be applied in order to complete the statement.

Get the changes required to perform a refactoring.

If another refactoring request is received during the processing of this one, an error of type REFACTORING_REQUEST_CANCELLED will be generated.

RefactoringKind

The kind of refactoring to be performed.

FilePath

The file containing the code involved in the refactoring.

int

The offset of the region involved in the refactoring.

int

The length of the region involved in the refactoring.

bool

True if the client is only requesting that the values of the options be validated and no change be generated.

RefactoringOptions

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 Refactorings, 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.

RefactoringProblem

The initial status of the refactoring, i.e. problems related to the context in which the refactoring is requested. The array will be empty if there are no known problems.

RefactoringProblem

The options validation status, i.e. problems in the given options, such as light-weight validation of a new name, flags compatibility, etc. The array will be empty if there are no known problems.

RefactoringProblem

The final status of the refactoring, i.e. problems identified in the result of a full, potentially expensive validation and / or change creation. The array will be empty if there are no known problems.

RefactoringFeedback

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 Refactorings, labeled as "Feedback".

SourceChange

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 changes from being computed, such as having no options specified for a refactoring that requires them, or if only validation was requested.

String

The ids of source edits that are not known to be valid. An edit is not known to be valid if there was insufficient type information for the server to be able to determine whether or not the code needs to be modified, such as when a member is being renamed and there is a reference to a member from an unknown type. This field will be omitted if the change field is omitted or if there are no potential edits for the refactoring.

Get the changes required to convert the partial statement at the given location into a syntactically valid statement. If the current statement is already valid the change will insert a newline plus appropriate indentation at the end of the line containing the offset. If a change that makes the statement valid cannot be determined (perhaps because it has not yet been implemented) the statement will be considered already valid and the appropriate change returned.

FilePath

The file containing the statement to be completed.

int

The offset used to identify the statement to be completed.

SourceChange

The change to be applied in order to complete the statement.

bool

Will be true if the change contains nothing but whitespace characters, or is empty.

Determine if the request postfix completion template is applicable at the given location in the given file.

FilePath

The file containing the postfix template to be expanded.

String

The unique name that identifies the template in use.

int

The offset used to identify the code to which the template will be applied.

bool

True if the template can be expanded at the given location.

Return a list of all postfix templates currently available.

PostfixTemplateDescriptor

The list of available templates.

Return a list of edits that would need to be applied in order to ensure that all of the elements in the specified list of imported elements are accessible within the library.

If a request is made for a file that does not exist, or that is not currently subject to analysis (e.g. because it is not associated with any analysis root specified via analysis.setAnalysisRoots), an error of type IMPORT_ELEMENTS_INVALID_FILE will be generated.

FilePath

The file in which the specified elements are to be made accessible.

ImportedElements

The elements to be made accessible in the specified file.

int

The offset at which the specified elements need to be made accessible. If provided, this is used to guard against adding imports for text that would be inserted into a comment, string literal, or other location where the imports would not be necessary.

SourceFileEdit

The edits to be applied in order to make the specified elements accessible. The file to be edited will be the defining compilation unit of the library containing the file specified in the request, which can be different than the file specified in the request if the specified file is a part file. This field will be omitted if there are no edits that need to be applied.

Sort all of the directives, unit and class members of the given Dart file.

If a request is made for a file that does not exist, does not belong to an analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be generated.

If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will be generated.

FilePath

The Dart file to sort.

SourceFileEdit

The file edit that is to be applied to the given file to effect the sorting.

Organizes all of the directives - removes unused imports and sorts directives of the given Dart file according to the Dart Style Guide.

If a request is made for a file that does not exist, does not belong to an analysis root or is not a Dart file, FILE_NOT_ANALYZED will be generated.

If directives of the Dart file cannot be organized, for example because it has scan or parse errors, or by other reasons, ORGANIZE_DIRECTIVES_ERROR will be generated. The message will provide details about the reason.

FilePath

The Dart file to organize directives in.

SourceFileEdit

The file edit that is to be applied to the given file to effect the organizing.

The execution domain contains commands related to providing an execution or debugging experience.

Create an execution context for the executable file with the given path. The context that is created will persist until execution.deleteContext is used to delete it. Clients, therefore, are responsible for managing the lifetime of execution contexts.

FilePath

The path of the Dart or HTML file that will be launched, or the path of the directory containing the file.

ExecutionContextId

The identifier used to refer to the execution context that was created.

Delete the execution 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.

ExecutionContextId

The identifier of the execution context that is to be deleted.

Request completion suggestions for the given runtime context.

It might take one or two requests of this type to get completion suggestions. The first request should have only "code", "offset", and "variables", but not "expressions". If there are sub-expressions that can have different runtime types, and are considered to be safe to evaluate at runtime (e.g. getters), so using their actual runtime types can improve completion results, the server will not include the "suggestions" field in the response, and instead will return the "expressions" field. The client will use debug API to get current runtime types for these sub-expressions and send another request, this time with "expressions". If there are no interesting sub-expressions to get runtime types for, or when the "expressions" field is provided by the client, the server will return "suggestions" in the response.

String

The code to get suggestions in.

int

The offset within the code to get suggestions at.

FilePath

The path of the context file, e.g. the file of the current debugger frame. The combination of the context file and context offset can be used to ensure that all variables of the context are available for completion (with their static types).

int

The offset in the context file, e.g. the line offset in the current debugger frame.

RuntimeCompletionVariable

The runtime context variables that are potentially referenced in the code.

RuntimeCompletionExpression

The list of sub-expressions in the code for which the client wants to provide runtime types. It does not have to be the full list of expressions requested by the server, for missing expressions their static types will be used.

When this field is omitted, the server will return completion suggestions only when there are no interesting sub-expressions in the given code. The client may provide an empty list, in this case the server will return completion suggestions.

CompletionSuggestion

The completion suggestions. In contrast to usual completion request, suggestions for private elements also will be provided.

If there are sub-expressions that can have different runtime types, and are considered to be safe to evaluate at runtime (e.g. getters), so using their actual runtime types can improve completion results, the server omits this field in the response, and instead will return the "expressions" field.

RuntimeCompletionExpression

The list of sub-expressions in the code for which the server would like to know runtime types to provide better completion suggestions.

This field is omitted the field "suggestions" is returned.

Map a URI from the execution context to the file that it corresponds to, or map a file to the URI that it corresponds to in the execution context.

Exactly one of the file and uri fields must be provided. If both fields are provided, then an error of type INVALID_PARAMETER will be generated. Similarly, if neither field is provided, then an error of type INVALID_PARAMETER will be generated.

If the file field is provided and the value is not the path of a file (either the file does not exist or the path references something other than a file), then an error of type INVALID_PARAMETER will be generated.

If the uri field is provided and the value is not a valid URI or if the URI references something that is not a file (either a file that does not exist or something other than a file), then an error of type INVALID_PARAMETER will be generated.

If the contextRoot used to create the execution context does not exist, then an error of type INVALID_EXECUTION_CONTEXT will be generated.

ExecutionContextId

The identifier of the execution context in which the URI is to be mapped.

FilePath

The path of the file to be mapped into a URI.

String

The URI to be mapped into a file path.

FilePath

The file to which the URI was mapped. This field is omitted if the uri field was not given in the request.

String

The URI to which the file path was mapped. This field is omitted if the file field was not given in the request.

Deprecated: the analysis server no longer fires LAUNCH_DATA events.

Subscribe for services. All previous subscriptions are replaced by the given set of services.

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.

ExecutionService

A list of the services being subscribed to.

Reports information needed to allow a single file to be launched.

This notification is not subscribed to by default. Clients can subscribe by including the value "LAUNCH_DATA" in the list of services passed in an execution.setSubscriptions request.

FilePath

The file for which launch data is being provided. This will either be a Dart library or an HTML file.

ExecutableKind

The kind of the executable file. This field is omitted if the file is not a Dart file.

FilePath

A list of the Dart files that are referenced by the file. This field is omitted if the file is not an HTML file.

The diagnostic domain contains server diagnostics APIs.

Return server diagnostics.

ContextData

The list of analysis contexts.

Return the port of the diagnostic web server. If the server is not running this call will start the server. If unable to start the diagnostic web server, this call will return an error of DEBUG_PORT_COULD_NOT_BE_OPENED.

int

The diagnostic server port.

The analytics domain contains APIs related to reporting analytics.

This API allows clients to expose a UI option to enable and disable the analysis server's reporting of analytics. This value is shared with other tools and can change outside of this API; because of this, clients should use the analysis server's flag as the system of record. Clients can choose to send in additional analytics (see sendEvent and sendTiming) if they so choose. Dart command-line tools provide a disclaimer similar to: Dart SDK tools anonymously report feature usage statistics and basic crash reports to help improve Dart tools over time. See Google's privacy policy: https://www.google.com/intl/en/policies/privacy/.

The analysis server will send it's own analytics data (for example, operations performed, operating system type, SDK version). No data (from the analysis server or from clients) will be sent if analytics is disabled.

Query whether analytics is enabled.

This flag controls whether the analysis server sends any analytics data to the cloud. If disabled, the analysis server does not send any analytics data, and any data sent to it by clients (from sendEvent and sendTiming) will be ignored.

The value of this flag can be changed by other tools outside of the analysis server's process. When you query the flag, you get the value of the flag at a given moment. Clients should not use the value returned to decide whether or not to send the sendEvent and sendTiming requests. Those requests should be used unconditionally and server will determine whether or not it is appropriate to forward the information to the cloud at the time each request is received.

bool

Whether sending analytics is enabled or not.

Enable or disable the sending of analytics data. Note that there are other ways for users to change this setting, so clients cannot assume that they have complete control over this setting. In particular, there is no guarantee that the result returned by the isEnabled request will match the last value set via this request.

bool

Enable or disable analytics.

Send information about client events.

Ask the analysis server to include the fact that an action was performed in the client as part of the analytics data being sent. The data will only be included if the sending of analytics data is enabled at the time the request is processed. The action that was performed is indicated by the value of the action field.

The value of the action field should not include the identity of the client. The analytics data sent by server will include the client id passed in using the --client-id command-line argument. The request will be ignored if the client id was not provided when server was started.

String

The value used to indicate which action was performed.

Send timing information for client events (e.g. code completions).

Ask the analysis server to include the fact that a timed event occurred as part of the analytics data being sent. The data will only be included if the sending of analytics data is enabled at the time the request is processed.

The value of the event field should not include the identity of the client. The analytics data sent by server will include the client id passed in using the --client-id command-line argument. The request will be ignored if the client id was not provided when server was started.

String

The name of the event.

int

The duration of the event in milliseconds.

The kythe domain contains APIs related to generating Dart content in the Kythe format.

Return the list of KytheEntry objects for some file, given the current state of the file system populated by "analysis.updateContent".

If a request is made for a file that does not exist, or that is not currently subject to analysis (e.g. because it is not associated with any analysis root specified to analysis.setAnalysisRoots), an error of type GET_KYTHE_ENTRIES_INVALID_FILE will be generated.

FilePath

The file containing the code for which the Kythe Entry objects are being requested.

KytheEntry

The list of KytheEntry objects for the queried file.

FilePath

The set of files paths that were required, but not in the file system, to give a complete and accurate Kythe graph for the file. This could be due to a referenced file that does not exist or generated files not being generated or passed before the call to "getKytheEntries".

The analysis domain contains API’s related to Flutter support.

Return the description of the widget instance at the given location.

If the location does not have a support widget, an error of type FLUTTER_GET_WIDGET_DESCRIPTION_NO_WIDGET will be generated.

If a change to a file happens while widget descriptions are computed, an error of type FLUTTER_GET_WIDGET_DESCRIPTION_CONTENT_MODIFIED will be generated.

FilePath

The file where the widget instance is created.

int

The offset in the file where the widget instance is created.

FlutterWidgetProperty

The list of properties of the widget. Some of the properties might be read only, when their editor is not set. This might be because they have type that we don't know how to edit, or for compound properties that work as containers for sub-properties.

Set the value of a property, or remove it.

The server will generate a change that the client should apply to the project to get the value of the property set to the new value. The complexity of the change might be from updating a single literal value in the code, to updating multiple files to get libraries imported, and new intermediate widgets instantiated.

int

The identifier of the property, previously returned as a part of a FlutterWidgetProperty.

An error of type FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_ID is generated if the identifier is not valid.

FlutterWidgetPropertyValue

The new value to set for the property.

If absent, indicates that the property should be removed. If the property corresponds to an optional parameter, the corresponding named argument is removed. If the property isRequired is true, FLUTTER_SET_WIDGET_PROPERTY_VALUE_IS_REQUIRED error is generated.

If the expression is not a syntactically valid Dart code, then FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_EXPRESSION is reported.

SourceChange

The change that should be applied.

Subscribe for services that are specific to individual files. 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.

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.

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.

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.

FlutterService FilePath

A table mapping services to a list of the files being subscribed to the service.

Reports the Flutter outline associated with a single file.

This notification is not subscribed to by default. Clients can subscribe by including the value "OUTLINE" in the list of services passed in an flutter.setSubscriptions request.

FilePath

The file with which the outline is associated.

FlutterOutline

The outline associated with the file.

Types

This section contains descriptions of the data types referenced in the API’s of the various domains.

A list of fixes associated with a specific error.

AnalysisError

The error with which the fixes are associated.

SourceChange

The fixes associated with the error.

Deprecated: the only reference to this type has been deprecated.

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.

bool

Deprecated: this feature is always enabled.

True if the client wants to enable support for the proposed async feature.

bool

Deprecated: this feature is always enabled.

True if the client wants to enable support for the proposed deferred loading feature.

bool

Deprecated: this feature is always enabled.

True if the client wants to enable support for the proposed enum feature.

bool

Deprecated: this feature is always enabled.

True if the client wants to enable support for the proposed "null aware operators" feature.

bool

True if the client wants to enable support for the proposed "less restricted mixins" proposal (DEP 34).

bool

True if hints that are specific to dart2js should be generated. This option is ignored if generateHints is false.

bool

True if hints should be generated as part of generating errors and warnings.

bool

True if lints should be generated as part of generating errors and warnings.

An enumeration of the services provided by the analysis domain that are related to a specific list of files.

CLOSING_LABELS FOLDING HIGHLIGHTS IMPLEMENTED INVALIDATE

This service is not currently implemented and will become a GeneralAnalysisService in a future release.

NAVIGATION OCCURRENCES OUTLINE OVERRIDES

An indication of the current state of analysis.

bool

True if analysis is currently being performed.

String

The name of the current target of analysis. This field is omitted if analyzing is false.

A description of bulk fixes to a library.

FilePath

The path of the library.

BulkFixDetail

A list of bulk fix details.

A description of a fix applied to a library.

String

The code of the diagnostic associated with the fix.

int

The number times the associated diagnostic was fixed in the associated source edit.

A label that is associated with a range of code that may be useful to render at the end of the range to aid code readability. For example, a constructor call that spans multiple lines may result in a closing label to allow the constructor type/name to be rendered alongside the closing parenthesis.

int

The offset of the construct being labelled.

int

The length of the whole construct to be labelled.

String

The label associated with this range that should be displayed to the user.

String

An identifier used to associate completion results with a completion request.

Information about an analysis context.

String

The name of the context.

int

Explicitly analyzed files.

int

Implicitly analyzed files.

int

The number of work items in the queue.

String

Exceptions associated with cache entries.

A declaration - top-level (class, field, etc) or a class member (method, field, etc).

String

The name of the declaration.

ElementKind

The kind of the element that corresponds to the declaration.

int

The index of the file (in the enclosing response).

int

The offset of the declaration name in the file.

int

The one-based index of the line containing the declaration name.

int

The one-based index of the column containing the declaration name.

int

The offset of the first character of the declaration code in the file.

int

The length of the declaration code in the file.

String

The name of the class enclosing this declaration. If the declaration is not a class member, this field will be absent.

String

The name of the mixin enclosing this declaration. If the declaration is not a mixin member, this field will be absent.

String

The parameter list for the element. If the element is not a method or function this field will not be defined. If the element doesn't have parameters (e.g. getter), this field will not be defined. If the element has zero parameters, this field will have a value of "()". The value should not be treated as exact presentation of parameters, it is just approximation of parameters to give the user general idea.

A description of an executable file.

FilePath

The path of the executable file.

ExecutableKind

The kind of the executable file.

An enumeration of the kinds of executable files.

CLIENT EITHER NOT_EXECUTABLE SERVER
String

The identifier for a execution context.

A partial completion suggestion that can be used in combination with info from completion.results to build completion suggestions for not yet imported library tokens.

String

The identifier to present to the user for code completion.

String

The URI of the library that declares the element being suggested, not the URI of the library associated with the enclosing AvailableSuggestionSet.

Element

Information about the element reference being suggested.

String

A default String for use in generating argument list source contents on the client side.

int

Pairs of offsets and lengths describing 'defaultArgumentListString' text ranges suitable for use by clients to set up linked edits of default argument source contents. For example, given an argument list string 'x, y', the corresponding text range [0, 1, 3, 1], indicates two text ranges of length 1, starting at offsets 0 and 3. Clients can use these ranges to treat the 'x' and 'y' values specially for linked edits.

String

If the element is an executable, the names of the formal parameters of all kinds - required, optional positional, and optional named. The names of positional parameters are empty strings. Omitted if the element is not an executable.

String

If the element is an executable, the declared types of the formal parameters of all kinds - required, optional positional, and optional named. Omitted if the element is not an executable.

AvailableSuggestionRelevanceTag

This field is set if the relevance of this suggestion might be changed depending on where completion is requested.

int
String

The opaque tag value.

int

The id associated with the library.

String

The URI of the library.

AvailableSuggestion

Information about an existing import, with elements that it provides.

int

The URI of the imported library. It is an index in the strings field, in the enclosing ExistingImports and its ImportedElementSet object.

int

The list of indexes of elements, in the enclosing ExistingImports object.

Information about all existing imports in a library.

ImportedElementSet

The set of all unique imported elements for all imports.

ExistingImport

The list of imports in the library.

The set of top-level elements encoded as pairs of the defining library URI and the name, and stored in the parallel lists elementUris and elementNames.

String

The list of unique strings in this object.

int

The library URI part of the element. It is an index in the strings field.

int

The name part of a the element. It is an index in the strings field.

A reference to an AvailableSuggestionSet noting that the library's members which match the kind of this ref should be presented to the user.

int

Clients should use it to access the set of precomputed completions to be displayed to the user.

int

The relevance of completion suggestions from this library where a higher number indicates a higher relevance.

String

The optional string that should be displayed instead of the uri of the referenced AvailableSuggestionSet.

For example libraries in the "test" directory of a package have only "file://" URIs, so are usually long, and don't look nice, but actual import directives will use relative URIs, which are short, so we probably want to display such relative URIs to the user.

Each AvailableSuggestion can specify zero or more tags in the field relevanceTags, so that when the included tag is equal to one of the relevanceTags, the suggestion is given higher relevance than the whole IncludedSuggestionSet.

AvailableSuggestionRelevanceTag

The opaque value of the tag.

int

The boost to the relevance of the completion suggestions that match this tag, which is added to the relevance of the containing IncludedSuggestionSet.

An enumeration of the completion services to which a client can subscribe.

AVAILABLE_SUGGESTION_SETS

The client will receive availableSuggestions notifications once subscribed with completion suggestion sets from the libraries of interest. The client should keep an up-to-date record of these in memory so that it will be able to union these candidates with other completion suggestions when applicable at completion time.

The client will also receive existingImports notifications.

A list of associations between paths and the libraries that should be included for code completion when editing a file beneath that path.

FilePath

The filepath for which this request's libraries should be active in completion suggestions. This object associates filesystem regions to libraries and library directories of interest to the client.

FilePath

The paths of the libraries of interest to the client for completion suggestions.

An enumeration of the kinds of code completion that users can invoke.

BASIC

Basic code completion invocation type, and the default for this enumeration.

SMART

Smart code completion, currently not implemented.

An expression for which we want to know its runtime type. In expressions like 'a.b.c.where((e) => e.^)' we want to know the runtime type of 'a.b.c' to enforce it statically at the time when we compute completion suggestions, and get better type for 'e'.

int

The offset of the expression in the code for completion.

int

The length of the expression in the code for completion.

RuntimeCompletionExpressionType

When the expression is sent from the server to the client, the type is omitted. The client should fill the type when it sends the request to the server again.

A variable in a runtime context.

String

The name of the variable. The name "this" has a special meaning and is used as an implicit target for runtime completion, and in explicit "this" references.

RuntimeCompletionExpressionType

The type of the variable.

A type at runtime.

FilePath

The path of the library that has this type. Omitted if the type is not declared in any library, e.g. "dynamic", or "void".

RuntimeCompletionExpressionTypeKind

The kind of the type.

String

The name of the type. Omitted if the type does not have a name, e.g. an inline function type.

RuntimeCompletionExpressionType

The type arguments of the type. Omitted if the type does not have type parameters.

RuntimeCompletionExpressionType

If the type is a function type, the return type of the function. Omitted if the type is not a function type.

RuntimeCompletionExpressionType

If the type is a function type, the types of the function parameters of all kinds - required, optional positional, and optional named. Omitted if the type is not a function type.

String

If the type is a function type, the names of the function parameters of all kinds - required, optional positional, and optional named. The names of positional parameters are empty strings. Omitted if the type is not a function type.

An enumeration of the kinds of runtime expression types.

DYNAMIC FUNCTION INTERFACE

An enumeration of the services provided by the execution domain.

LAUNCH_DATA

An enumeration of the kinds of files.

LIBRARY PART

A property of a Flutter widget.

String

The documentation of the property to show to the user. Omitted if the server does not know the documentation, e.g. because the corresponding field is not documented.

String

If the value of this property is set, the Dart code of the expression of this property.

int

The unique identifier of the property, must be passed back to the server when updating the property value. Identifiers become invalid on any source code change.

bool

True if the property is required, e.g. because it corresponds to a required parameter of a constructor.

bool

If the property expression is a concrete value (e.g. a literal, or an enum constant), then it is safe to replace the expression with another concrete value. In this case this field is true. Otherwise, for example when the expression is a reference to a field, so that its value is provided from outside, this field is false.

String

The name of the property to display to the user.

FlutterWidgetProperty

The list of children properties, if any. For example any property of type EdgeInsets will have four children properties of type double - left / top / right / bottom.

FlutterWidgetPropertyEditor

The editor that should be used by the client. This field is omitted if the server does not know the editor for this property, for example because it does not have one of the supported types.

FlutterWidgetPropertyValue

If the expression is set, and the server knows the value of the expression, this field is set.

An editor for a property of a Flutter widget.

FlutterWidgetPropertyEditorKind FlutterWidgetPropertyValueEnumItem

An enumeration of the kinds of property editors.

BOOL

The editor for a property of type bool.

DOUBLE

The editor for a property of the type double.

ENUM

The editor for choosing an item of an enumeration, see the enumItems field of FlutterWidgetPropertyEditor.

ENUM_LIKE

The editor for either choosing a pre-defined item from a list of provided static field references (like ENUM), or specifying a free-form expression.

INT

The editor for a property of type int.

STRING

The editor for a property of the type String.

A value of a property of a Flutter widget.

bool double int String FlutterWidgetPropertyValueEnumItem String

A free-form expression, which will be used as the value as is.

An item of an enumeration in a general sense - actual enum value, or a static field in a class.

String

The URI of the library containing the className. When the enum item is passed back, this will allow the server to import the corresponding library if necessary.

String

The name of the class or enum.

String

The name of the field in the enumeration, or the static field in the class.

String

The documentation to show to the user. Omitted if the server does not know the documentation, e.g. because the corresponding field is not documented.

An enumeration of the services provided by the flutter domain that are related to a specific list of files.

OUTLINE

An node in the Flutter specific outline structure of a file.

FlutterOutlineKind

The kind of the node.

int

The offset of the first character of the element. This is different than the offset in the Element, which is the offset of the name of the element. It can be used, for example, to map locations in the file back to an outline.

int

The length of the element.

int

The offset of the first character of the element code, which is neither documentation, nor annotation.

int

The length of the element code.

String

The text label of the node children of the node. It is provided for any FlutterOutlineKind.GENERIC node, where better information is not available.

Element

If this node is a Dart element, the description of it; omitted otherwise.

FlutterOutlineAttribute

Additional attributes for this node, which might be interesting to display on the client. These attributes are usually arguments for the instance creation or the invocation that created the widget.

String

If the node creates a new class instance, or a reference to an instance, this field has the name of the class.

String

A short text description how this node is associated with the parent node. For example "appBar" or "body" in Scaffold.

String

If FlutterOutlineKind.VARIABLE, the name of the variable.

FlutterOutline

The children of the node. The field will be omitted if the node has no children.

An attribute for a FlutterOutline.

String

The name of the attribute.

String

The label of the attribute value, usually the Dart code. It might be quite long, the client should abbreviate as needed.

bool

The boolean literal value of the attribute. This field is absent if the value is not a boolean literal.

int

The integer literal value of the attribute. This field is absent if the value is not an integer literal.

String

The string literal value of the attribute. This field is absent if the value is not a string literal.

Location

If the attribute is a named argument, the location of the name, without the colon.

Location

The location of the value.

This field is always available, but marked optional for backward compatibility between new clients with older servers.

An enumeration of the kinds of FlutterOutline elements. The list of kinds might be expanded with time, clients must be able to handle new kinds in some general way.

DART_ELEMENT

A dart element declaration.

GENERIC

A generic Flutter element, without additional information.

NEW_INSTANCE

A new instance creation.

INVOCATION

An invocation of a method, a top-level function, a function expression, etc.

VARIABLE

A reference to a local variable, or a field.

PLACEHOLDER

The parent node has a required Widget. The node works as a placeholder child to drop a new Widget to.

An enumeration of the services provided by the analysis domain that are general in nature (that is, are not specific to some list of files).

ANALYZED_FILES

The hover information associated with a specific location.

int

The offset of the range of characters that encompasses the cursor position and has the same hover information as the cursor position.

int

The length of the range of characters that encompasses the cursor position and has the same hover information as the cursor position.

String

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, or if the element is declared inside an HTML file.

String

The URI of the containing library, examples here include "dart:core", "package:.." and file uris represented by the path on disk, "/..". The data is omitted if the element is declared inside an HTML file.

String

A human-readable description of the class declaring the element being referenced. This data is omitted if there is no referenced element, or if the element is not a class member.

String

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, or if the element has no dartdoc.

String

A human-readable description of the element being referenced. This data is omitted if there is no referenced element.

String

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.

bool

True if the referenced element is deprecated.

String

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.

String

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.

String

The name of the static type of the expression. This data is omitted if the location does not correspond to an expression.

A description of a class that is implemented or extended.

int

The offset of the name of the implemented class.

int

The length of the name of the implemented class.

A description of a class member that is implemented or overridden.

int

The offset of the name of the implemented member.

int

The length of the name of the implemented member.

A description of the elements that are referenced in a region of a file that come from a single imported library.

FilePath

The absolute and normalized path of the file containing the library.

String

The prefix that was used when importing the library into the original source.

String

The names of the elements imported from the library.

A description of a member that overrides an inherited member.

int

The offset of the name of the overriding member.

int

The length of the name of the overriding member.

OverriddenMember

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.

OverriddenMember

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.

A description of a member that is being overridden.

Element

The element that is being overridden.

String

The name of the class in which the member is defined.

The description of a postfix completion template.

String

The template name, shown in the UI.

String

The unique template key, not shown in the UI.

String

A short example of the transformation performed when the template is applied.

An indication of the current state of pub execution.

bool

True if the server is currently running pub to produce a list of package directories.

An abstract superclass of all refactoring feedbacks.

An abstract superclass of all refactoring options.

An indication of a problem with the execution of the server, typically in response to a request.

RequestErrorCode

A code that uniquely identifies the error that occurred.

String

A short description of the error.

String

The stack trace associated with processing the request, used for debugging the server.

An enumeration of the types of errors that can occur in the execution of the server.

CONTENT_MODIFIED

An "analysis.getErrors" or "analysis.getNavigation" request could not be satisfied because the content of the file changed before the requested results could be computed.

DEBUG_PORT_COULD_NOT_BE_OPENED

The server was unable to open a port for the diagnostic server.

FILE_NOT_ANALYZED

A request specified a FilePath which does not match a file in an analysis root, or the requested operation is not available for the file.

FLUTTER_GET_WIDGET_DESCRIPTION_CONTENT_MODIFIED

A file was change while widget descriptions were being computed.

FLUTTER_GET_WIDGET_DESCRIPTION_NO_WIDGET

The given location does not have a supported widget.

FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_EXPRESSION

The given property expression is invalid, e.g. has a syntax error.

FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_ID

The given property identifier is not valid. It might have never been valid, or a change to code invalidated it, or its TTL was exceeded.

FLUTTER_SET_WIDGET_PROPERTY_VALUE_IS_REQUIRED

The value of the property cannot be removed, for example because the corresponding constructor argument is required, and the server does not know what default value to use.

FORMAT_INVALID_FILE

An "edit.format" request specified a FilePath which does not match a Dart file in an analysis root.

FORMAT_WITH_ERRORS

An "edit.format" request specified a file that contains syntax errors.

GET_ERRORS_INVALID_FILE

An "analysis.getErrors" request specified a FilePath which does not match a file currently subject to analysis.

GET_FIXES_INVALID_FILE

An "edit.getFixes" request specified a FilePath which does not match a file currently subject to analysis.

GET_IMPORTED_ELEMENTS_INVALID_FILE

An "analysis.getImportedElements" request specified a FilePath that does not match a file currently subject to analysis.

GET_KYTHE_ENTRIES_INVALID_FILE

An "analysis.getKytheEntries" request specified a FilePath that does not match a file that is currently subject to analysis.

GET_NAVIGATION_INVALID_FILE

An "analysis.getNavigation" request specified a FilePath which does not match a file currently subject to analysis.

GET_REACHABLE_SOURCES_INVALID_FILE

An "analysis.getReachableSources" request specified a FilePath which does not match a file currently subject to analysis.

GET_SIGNATURE_INVALID_FILE

An "analysis.getSignature" request specified a FilePath which does not match a file currently subject to analysis.

GET_SIGNATURE_INVALID_OFFSET

An "analysis.getSignature" request specified an offset which is not a valid location within for the contents of the file specified FilePath.

GET_SIGNATURE_UNKNOWN_FUNCTION

An "analysis.getSignature" request specified an offset that could not be matched to a function call.

IMPORT_ELEMENTS_INVALID_FILE

An "edit.importElements" request specified a FilePath that does not match a file currently subject to analysis.

INVALID_ANALYSIS_ROOT

A path passed as an argument to a request (such as analysis.reanalyze) is required to be an analysis root, but isn't.

INVALID_EXECUTION_CONTEXT

The context root used to create an execution context does not exist.

INVALID_FILE_PATH_FORMAT

The format of the given file path is invalid, e.g. is not absolute and normalized.

INVALID_OVERLAY_CHANGE

An "analysis.updateContent" request contained a ChangeContentOverlay object which can't be applied, due to an edit having an offset or length that is out of range.

INVALID_PARAMETER

One of the method parameters was invalid.

INVALID_REQUEST

A malformed request was received.

ORGANIZE_DIRECTIVES_ERROR

An "edit.organizeDirectives" request specified a Dart file that cannot be analyzed. The reason is described in the message.

REFACTORING_REQUEST_CANCELLED

Another refactoring request was received during processing of this one.

SERVER_ALREADY_STARTED

The analysis server has already been started (and hence won't accept new connections).

This error is included for future expansion; at present the analysis server can only speak to one client at a time so this error will never occur.

SERVER_ERROR

An internal error occurred in the analysis server. Also see the server.error notification.

SORT_MEMBERS_INVALID_FILE

An "edit.sortMembers" request specified a FilePath which does not match a Dart file in an analysis root.

SORT_MEMBERS_PARSE_ERRORS

An "edit.sortMembers" request specified a Dart file that has scan or parse errors.

UNKNOWN_REQUEST

A request was received which the analysis server does not recognize, or cannot handle in its current configuration.

UNSUPPORTED_FEATURE

The analysis server was requested to perform an action which is not supported.

This is a legacy error; it will be removed before the API reaches version 1.0.

String

An identifier used to associate search results with a search request.

A single result from a search request.

Location

The location of the code that matched the search criteria.

SearchResultKind

The kind of element that was found or the kind of reference that was found.

bool

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.

Element

The elements that contain the result, starting with the most immediately enclosing ancestor and ending with the library.

An enumeration of the kinds of search results returned by the search domain.

DECLARATION

The declaration of an element.

INVOCATION

The invocation of a function or method.

READ

A reference to a field, parameter or variable where it is being read.

READ_WRITE

A reference to a field, parameter or variable where it is being read and written.

REFERENCE

A reference to an element.

UNKNOWN

Some other kind of search result.

WRITE

A reference to a field, parameter or variable where it is being written.

An enumeration of the services provided by the server domain.

LOG STATUS

A representation of a class in a type hierarchy.

Element

The class element represented by this item.

String

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.

Element

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.

int

The index of the item representing the superclass of this class. This field will be omitted if this item represents the class Object.

int

The indexes of the items representing the interfaces implemented by this class. The list will be empty if there are no implemented interfaces.

int

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.

int

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.

A log entry from the server.

int

The time (milliseconds since epoch) at which the server created this log entry.

ServerLogEntryKind

The kind of the entry, used to determine how to interpret the "data" field.

String

The payload of the entry, the actual format is determined by the "kind" field.

An enumeration of the kinds of server long entries.

NOTIFICATION

A notification from the server, such as "analysis.highlights". The "data" field contains a JSON object with abbreviated notification.

RAW

Arbitrary string, describing some event that happened in the server, e.g. starting a file analysis, and details which files were accessed. These entries are not structured, but provide context information about requests and notification, and can be related by "time" for further manual analysis.

REQUEST

A request from the client, as the server views it, e.g. "edit.getAssists". The "data" field contains a JSON object with abbreviated request.

RESPONSE

Various counters and measurements related to execution of a request. The "data" field contains a JSON object with following fields:

  • "id" - the id of the request - copied from the request.
  • "method" - the method of the request, e.g. "edit.getAssists".
  • "clientRequestTime" - the time (milliseconds since epoch) at which the client made the request - copied from the request.
  • "serverRequestTime" - the time (milliseconds since epoch) at which the server received and decoded the JSON request.
  • "responseTime" - the time (milliseconds since epoch) at which the server created the response to be encoded into JSON and sent to the client.

Refactorings

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 requested using the edit.getRefactoring request (designed to improve the UX) and the options that may be provided to edit.getRefactoring.

Convert a getter into a method by removing the keyword get and adding an empty parameter list.

It is an error if the range contains anything other than all or part of the name of a single getter.

Convert a method into a getter by adding the keyword get and removing the parameter list.

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.

Create a local variable initialized by the expression that covers the specified selection.

It is an error if the selection range is not covered by a complete expression.

int

The offsets of the expressions that cover the specified selection, from the down most to the up most.

int

The lengths of the expressions that cover the specified selection, from the down most to the up most.

String

The proposed names for the local variable.

int

The offsets of the expressions that would be replaced by a reference to the variable.

int

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].

String

The name that the local variable should be given.

bool

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.

Create a method whose body is the specified expression or list of statements, possibly augmented with a return statement.

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.

int

The offset to the beginning of the expression or statements that will be extracted.

int

The length of the expression or statements that will be extracted.

String

The proposed return type for the method. If the returned element does not have a declared return type, this field will contain an empty string.

String

The proposed names for the method.

bool

True if a getter could be created rather than a method.

RefactoringMethodParameter

The proposed parameters for the method.

int

The offsets of the expressions or statements that would be replaced by an invocation of the method.

int

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].

String

The return type that should be defined for the method.

bool

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.

String

The name that the method should be given.

RefactoringMethodParameter

The parameters that should be defined for the method.

It is an error if a REQUIRED or NAMED parameter follows a POSITIONAL parameter. It is an error if a REQUIRED or POSITIONAL parameter follows a NAMED parameter.

  • To change the order and/or update proposed parameters, add parameters with the same identifiers as proposed.
  • To add new parameters, omit their identifier.
  • To remove some parameters, omit them in this list.
bool

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.

Create a new class that extends StatelessWidget, whose build() method is the widget creation expression, or a method returning a Flutter widget, at the specified offset.

String

The name that the widget class should be given.

Inline the initializer expression of a local variable in place of any references to that variable.

It is an error if the range contains anything other than all or part of the name of a single local variable.

String

The name of the variable being inlined.

int

The number of times the variable occurs.

Inline a method in place of one or all references to that method.

It is an error if the range contains anything other than all or part of the name of a single method.

String

The name of the class enclosing the method being inlined. If not a class member is being inlined, this field will be absent.

String

The name of the method (or function) being inlined.

bool

True if the declaration of the method is selected. So all references should be inlined.

bool

True if the method being inlined should be removed. It is an error if this field is true and inlineAll is false.

bool

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.

Move the given file and update all of the references to that file and from it. The move operation is supported in general case - for renaming a file in the same folder, moving it to a different folder or both.

The refactoring must be activated before an actual file moving operation is performed.

The "offset" and "length" fields from the request are ignored, but the file specified in the request specifies the file to be moved.

FilePath

The new file path to which the given file is being moved.

Rename a given element and all of the references to that element.

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.

int

The offset to the beginning of the name selected to be renamed, or -1 if the name does not exist yet.

int

The length of the name selected to be renamed.

String

The human-readable description of the kind of element being renamed (such as "class" or "function type alias").

String

The old name of the element before the refactoring.

String

The name that the element should have after the refactoring.

Errors

This section contains a list of all of the errors that are produced by the server and the data that is returned with each.

TODO: TBD

Index