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.
INFOWARNINGERRORAn enumeration of the possible types of analysis errors.
CHECKED_MODE_COMPILE_TIME_ERRORCOMPILE_TIME_ERRORHINTLINTSTATIC_TYPE_WARNINGSTATIC_WARNINGSYNTACTIC_ERRORTODOA 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.
PARAMETERA 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).
An enumeration of the kinds of elements.
CLASSCLASS_TYPE_ALIASCOMPILATION_UNITCONSTRUCTORCONSTRUCTOR_INVOCATIONENUMENUM_CONSTANTEXTENSIONFIELDFILEFUNCTIONFUNCTION_INVOCATIONFUNCTION_TYPE_ALIASGETTERLABELLIBRARYLOCAL_VARIABLEMETHODMIXINPARAMETERPREFIXSETTERTOP_LEVEL_VARIABLETYPE_PARAMETERUNIT_TEST_GROUPUNIT_TEST_TESTUNKNOWNThe absolute, normalized path of a file.
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.
An enumeration of the kinds of folding regions.
ANNOTATIONSCLASS_BODYDIRECTIVESDOCUMENTATION_COMMENTFILE_HEADERFUNCTION_BODYINVOCATIONLITERALA description of a region that can be folded.
A description of a region that could have special highlighting associated with it.
An enumeration of the kinds of highlighting that can be applied to files.
ANNOTATIONBUILT_INCLASSCOMMENT_BLOCKCOMMENT_DOCUMENTATIONCOMMENT_END_OF_LINECONSTRUCTORDIRECTIVEDYNAMIC_TYPE
Only for version 1 of highlight.
DYNAMIC_LOCAL_VARIABLE_DECLARATION
Only for version 2 of highlight.
DYNAMIC_LOCAL_VARIABLE_REFERENCE
Only for version 2 of highlight.
DYNAMIC_PARAMETER_DECLARATION
Only for version 2 of highlight.
DYNAMIC_PARAMETER_REFERENCE
Only for version 2 of highlight.
ENUMENUM_CONSTANTFIELD
Only for version 1 of highlight.
FIELD_STATIC
Only for version 1 of highlight.
FUNCTION
Only for version 1 of highlight.
FUNCTION_DECLARATION
Only for version 1 of highlight.
FUNCTION_TYPE_ALIASGETTER_DECLARATION
Only for version 1 of highlight.
IDENTIFIER_DEFAULTIMPORT_PREFIXINSTANCE_FIELD_DECLARATION
Only for version 2 of highlight.
INSTANCE_FIELD_REFERENCE
Only for version 2 of highlight.
INSTANCE_GETTER_DECLARATION
Only for version 2 of highlight.
INSTANCE_GETTER_REFERENCE
Only for version 2 of highlight.
INSTANCE_METHOD_DECLARATION
Only for version 2 of highlight.
INSTANCE_METHOD_REFERENCE
Only for version 2 of highlight.
INSTANCE_SETTER_DECLARATION
Only for version 2 of highlight.
INSTANCE_SETTER_REFERENCE
Only for version 2 of highlight.
INVALID_STRING_ESCAPE
Only for version 2 of highlight.
KEYWORDLABELLIBRARY_NAME
Only for version 2 of highlight.
LITERAL_BOOLEANLITERAL_DOUBLELITERAL_INTEGERLITERAL_LISTLITERAL_MAPLITERAL_STRINGLOCAL_FUNCTION_DECLARATION
Only for version 2 of highlight.
LOCAL_FUNCTION_REFERENCE
Only for version 2 of highlight.
LOCAL_VARIABLE
Only for version 1 of highlight.
LOCAL_VARIABLE_DECLARATIONLOCAL_VARIABLE_REFERENCE
Only for version 2 of highlight.
METHOD
Only for version 1 of highlight.
METHOD_DECLARATION
Only for version 1 of highlight.
METHOD_DECLARATION_STATIC
Only for version 1 of highlight.
METHOD_STATIC
Only for version 1 of highlight.
PARAMETER
Only for version 1 of highlight.
SETTER_DECLARATION
Only for version 1 of highlight.
TOP_LEVEL_VARIABLE
Only for version 1 of highlight.
PARAMETER_DECLARATION
Only for version 2 of highlight.
PARAMETER_REFERENCE
Only for version 2 of highlight.
STATIC_FIELD_DECLARATION
Only for version 2 of highlight.
STATIC_GETTER_DECLARATION
Only for version 2 of highlight.
STATIC_GETTER_REFERENCE
Only for version 2 of highlight.
STATIC_METHOD_DECLARATION
Only for version 2 of highlight.
STATIC_METHOD_REFERENCE
Only for version 2 of highlight.
STATIC_SETTER_DECLARATION
Only for version 2 of highlight.
STATIC_SETTER_REFERENCE
Only for version 2 of highlight.
TOP_LEVEL_FUNCTION_DECLARATION
Only for version 2 of highlight.
TOP_LEVEL_FUNCTION_REFERENCE
Only for version 2 of highlight.
TOP_LEVEL_GETTER_DECLARATION
Only for version 2 of highlight.
TOP_LEVEL_GETTER_REFERENCE
Only for version 2 of highlight.
TOP_LEVEL_SETTER_DECLARATION
Only for version 2 of highlight.
TOP_LEVEL_SETTER_REFERENCE
Only for version 2 of highlight.
TOP_LEVEL_VARIABLE_DECLARATION
Only for version 2 of highlight.
TYPE_NAME_DYNAMICTYPE_PARAMETERUNRESOLVED_INSTANCE_MEMBER_REFERENCE
Only for version 2 of highlight.
VALID_STRING_ESCAPE
Only for version 2 of highlight.
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.
METHODPARAMETERTYPEVARIABLEA 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.
NAMED
A named parameter.
OPTIONAL
An optional parameter.
REQUIRED
A required parameter.
A position within a file.
An enumeration of the kinds of refactorings that can be created.
CONVERT_GETTER_TO_METHODCONVERT_METHOD_TO_GETTEREXTRACT_LOCAL_VARIABLEEXTRACT_METHODEXTRACT_WIDGETINLINE_LOCAL_VARIABLEINLINE_METHODMOVE_FILERENAMEA description of a parameter in a method refactoring.
An enumeration of the kinds of parameters.
REQUIREDPOSITIONALNAMEDA 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.