CodeLens class

A code lens represents a Command that should be shown along with source text, like the number of references, a way to run tests, etc.

A code lens is unresolved when no command is associated to it. For performance reasons the creation of a code lens and resolving should be done in two stages.

Implemented types

Constructors

CodeLens({Command? command, LSPAny? data, required Range range})

Properties

command Command?
The command this code lens represents.
final
data → LSPAny?
A data entry field that is preserved on a code lens item between a CodeLensRequest and a CodeLensResolveRequest
final
hashCode int
The hash code for this object.
no setteroverride
range Range
The range in which this code lens is valid. Should only span a single line.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

canParse(Object? obj, LspJsonReporter reporter) bool
fromJson(Map<String, Object?> json) CodeLens

Constants

jsonHandler → const LspJsonHandler<CodeLens>