This document contains a specification of the types that are common between
the analysis server wire protocol and the analysis server plugin wire
protocol. While those protocols are versioned, the common types are not
versioned separately.
When those protocols have identical definitions of a type, the type definition
should be removed from the two individual specifications and added to this
document. Two definitions of a type are identical if the HTML that defines the
types is identical and if all of the types referenced by those two types are
identical.
When it becomes necessary to change the definition of a common type in one
protocol such that the type will no longer be common, that type and any types
that reference that type must be removed from this document and added to both
of the documents that include this document.
A directive to begin overlaying the contents of a file. The supplied
content will be used for analysis in place of the file contents in the
filesystem.
If this directive is used on a file that already has a file content
overlay, the old overlay is discarded and replaced with the new one.
An indication of an error, warning, or hint that was produced by the
analysis.
An enumeration of the possible severities of analysis errors.
INFOWARNINGERROR
An enumeration of the possible types of analysis errors.
A directive to modify an existing file content overlay. One or more ranges
of text are deleted from the old file content overlay and replaced with
new text.
The edits are applied in the order in which they occur in the list. This
means that the offset of each edit must be correct under the assumption
that all previous edits have been applied.
It is an error to use this overlay on a file that does not yet have a file
content overlay or that has had its overlay removed via
RemoveContentOverlay.
If any of the edits cannot be applied due to its offset or length being
out of range, an INVALID_OVERLAY_CHANGE error will be reported.
A suggestion for how to complete partially entered text. Many of the
fields are optional, depending on the kind of element being suggested.
An enumeration of the kinds of elements that can be included in a
completion suggestion.
ARGUMENT_LIST
A list of arguments for the method or function that is being
invoked. For this suggestion kind, the completion field is a
textual representation of the invocation and the parameterNames,
parameterTypes, and requiredParameterCount attributes are defined.
IMPORTIDENTIFIER
The element identifier should be inserted at the completion
location. For example "someMethod" in import 'myLib.dart' show
someMethod;. For suggestions of this kind, the element
attribute is defined and the completion field is the element's
identifier.
INVOCATION
The element is being invoked at the completion location. For
example, 'someMethod' in x.someMethod();. For suggestions
of this kind, the element attribute is defined and the completion
field is the element's identifier.
KEYWORD
A keyword is being suggested. For suggestions of this kind, the
completion is the keyword.
NAMED_ARGUMENT
A named argument for the current call site is being suggested. For
suggestions of this kind, the completion is the named argument
identifier including a trailing ':' and a space.
OPTIONAL_ARGUMENTOVERRIDE
An overriding implementation of a class member is being suggested.
PARAMETERPACKAGE_NAME
The name of a pub package is being suggested.
A message associated with a diagnostic.
For example, if the diagnostic is reporting that a variable has been
referenced before it was declared, it might have a diagnostic message that
indicates where the variable is declared.
Information about an element (something that can be declared in code).
If the format of a file path in a request is not valid, e.g. the path is
not absolute or is not normalized, then an error of type
INVALID_FILE_PATH_FORMAT will be generated.
This object matches the format and documentation of the Entry object
documented in the
Kythe Storage
Model.
This object matches the format and documentation of the Vector-Name object
documented in the
Kythe
Storage Model.
A collection of positions that should be linked (edited simultaneously)
for the purposes of updating code after a source change. For example, if a
set of edits introduced a new variable name, the group would contain all
of the positions of the variable name so that if the client wanted to let
the user edit the variable name after the operation, all occurrences of
the name could be edited simultaneously.
A suggestion of a value that could be used to replace all of the linked
edit regions in a LinkedEditGroup.
An enumeration of the kind of values that can be suggested for a linked
edit.
METHODPARAMETERTYPEVARIABLE
A location (character range) within a file.
A description of a region from which the user can navigate to the
declaration of an element.
A description of a target to which the user can navigate.
A description of the references to a single element within a single file.
An node in the outline structure of a file.
A description of a member that is being overridden.
An enumeration of the types of parameters.
OPTIONAL_NAMED
An optional named parameter.
OPTIONAL_POSITIONAL
An optional positional parameter.
REQUIRED_NAMED
A required named parameter.
REQUIRED_POSITIONAL
A required positional parameter.
A position within a file.
An enumeration of the kinds of refactorings that can be created.
A description of a parameter in a method refactoring.
An enumeration of the kinds of parameters.
REQUIREDPOSITIONALNAMED
A description of a problem related to a refactoring.
An enumeration of the severities of problems that can be returned by the
refactoring requests.
INFO
A minor code problem. No example, because it is not used yet.
WARNING
A minor code problem. For example names of local variables should be
camel case and start with a lower case letter. Staring the name of a
variable with an upper case is OK from the language point of view, but
it is nice to warn the user.
ERROR
The refactoring technically can be performed, but there is a logical
problem. For example the name of a local variable being extracted
conflicts with another name in the scope, or duplicate parameter names
in the method being extracted, or a conflict between a parameter name
and a local variable, etc. In some cases the location of the problem
is also provided, so the IDE can show user the location and the
problem, and let the user decide whether they want to perform the
refactoring. For example the name conflict might be expected, and the
user wants to fix it afterwards.
FATAL
A fatal error, which prevents performing the refactoring. For example
the name of a local variable being extracted is not a valid
identifier, or selection is not a valid expression.
A directive to remove an existing file content overlay. After processing
this directive, the file contents will once again be read from the file
system.
If this directive is used on a file that doesn't currently have a content
overlay, it has no effect.
A description of a set of edits that implement a single conceptual change.
A description of a single change to a single file.
A description of a set of changes to a single file.