Top Description Fields Constructors Methods
org.eclipse.lsp4j

public Class InlayHint

extends Object
Class Inheritance
Annotations
@SuppressWarnings:all
Imports
com.google.gson.annotations.JsonAdapter, java.util.List, org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter, org.eclipse.lsp4j.jsonrpc.messages.Either, org.eclipse.lsp4j.jsonrpc.util.Preconditions, .ToStringBuilder, org.eclipse.lsp4j.jsonrpc.validation.NonNull

Inlay hint information.

Since 3.17.0

Field Summary

Modifier and TypeField and Description
private Object
data

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

private InlayHintKind
kind

The kind of this hint.

private Either<String, List<InlayHintLabelPart>>
label

The label of this hint.

private Boolean
paddingLeft

Render padding before the hint.

private Boolean
paddingRight

Render padding after the hint.

private Position
position

The position of this hint.

private List<TextEdit>
textEdits

Optional text edits that are performed when accepting this inlay hint.

private Either<String, MarkupContent>
tooltip

The tooltip text when you hover over this item.

Constructor Summary

AccessConstructor and Description
public
public
InlayHint(final Position position, final Either<String, List<InlayHintLabelPart>> label)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Object
getData()

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

public InlayHintKind
getKind()

The kind of this hint.

public Either<String, List<InlayHintLabelPart>>
getLabel()

The label of this hint.

public Boolean
getPaddingLeft()

Render padding before the hint.

public Boolean
getPaddingRight()

Render padding after the hint.

public Position
getPosition()

The position of this hint.

public List<TextEdit>
getTextEdits()

Optional text edits that are performed when accepting this inlay hint.

public Either<String, MarkupContent>
getTooltip()

The tooltip text when you hover over this item.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public void
setData(final Object data)

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

public void
setKind(final InlayHintKind kind)

The kind of this hint.

public void
setLabel(final Either<String, List<InlayHintLabelPart>> label)

The label of this hint.

public void
setLabel(final String label)

public void
public void
setPaddingLeft(final Boolean paddingLeft)

Render padding before the hint.

public void
setPaddingRight(final Boolean paddingRight)

Render padding after the hint.

public void
setPosition(final Position position)

The position of this hint.

public void
setTextEdits(final List<TextEdit> textEdits)

Optional text edits that are performed when accepting this inlay hint.

public void
setTooltip(final Either<String, MarkupContent> tooltip)

The tooltip text when you hover over this item.

public void
setTooltip(final String tooltip)

public void
setTooltip(final MarkupContent tooltip)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

databack to summary
private Object data

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

Annotations
@JsonAdapter:Factory
kindback to summary
private InlayHintKind kind

The kind of this hint. Can be omitted in which case the client should fall back to a reasonable default.

labelback to summary
private Either<String, List<InlayHintLabelPart>> label

The label of this hint. A human readable string or an array of InlayHintLabelPart label parts.

*Note* that neither the string nor the label part can be empty.

Annotations
@NonNull
paddingLeftback to summary
private Boolean paddingLeft

Render padding before the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

paddingRightback to summary
private Boolean paddingRight

Render padding after the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

positionback to summary
private Position position

The position of this hint.

Annotations
@NonNull
textEditsback to summary
private List<TextEdit> textEdits

Optional text edits that are performed when accepting this inlay hint.

*Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is now part of the document and the inlay hint itself is now obsolete.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

tooltipback to summary
private Either<String, MarkupContent> tooltip

The tooltip text when you hover over this item.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

Constructor Detail

InlayHintback to summary
public InlayHint()
InlayHintback to summary
public InlayHint(final Position position, final Either<String, List<InlayHintLabelPart>> label)

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getDataback to summary
public Object getData()

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

getKindback to summary
public InlayHintKind getKind()

The kind of this hint. Can be omitted in which case the client should fall back to a reasonable default.

getLabelback to summary
public Either<String, List<InlayHintLabelPart>> getLabel()

The label of this hint. A human readable string or an array of InlayHintLabelPart label parts.

*Note* that neither the string nor the label part can be empty.

Annotations
@NonNull
getPaddingLeftback to summary
public Boolean getPaddingLeft()

Render padding before the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

getPaddingRightback to summary
public Boolean getPaddingRight()

Render padding after the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

getPositionback to summary
public Position getPosition()

The position of this hint.

Annotations
@NonNull
getTextEditsback to summary
public List<TextEdit> getTextEdits()

Optional text edits that are performed when accepting this inlay hint.

*Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is now part of the document and the inlay hint itself is now obsolete.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

getTooltipback to summary
public Either<String, MarkupContent> getTooltip()

The tooltip text when you hover over this item.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
setDataback to summary
public void setData(final Object data)

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

setKindback to summary
public void setKind(final InlayHintKind kind)

The kind of this hint. Can be omitted in which case the client should fall back to a reasonable default.

setLabelback to summary
public void setLabel(final Either<String, List<InlayHintLabelPart>> label)

The label of this hint. A human readable string or an array of InlayHintLabelPart label parts.

*Note* that neither the string nor the label part can be empty.

setLabelback to summary
public void setLabel(final String label)
setLabelback to summary
public void setLabel(final List<InlayHintLabelPart> label)
setPaddingLeftback to summary
public void setPaddingLeft(final Boolean paddingLeft)

Render padding before the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

setPaddingRightback to summary
public void setPaddingRight(final Boolean paddingRight)

Render padding after the hint.

Note

Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

setPositionback to summary
public void setPosition(final Position position)

The position of this hint.

setTextEditsback to summary
public void setTextEdits(final List<TextEdit> textEdits)

Optional text edits that are performed when accepting this inlay hint.

*Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is now part of the document and the inlay hint itself is now obsolete.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

setTooltipback to summary
public void setTooltip(final Either<String, MarkupContent> tooltip)

The tooltip text when you hover over this item.

Depending on the client capability InlayHintCapabilities#resolveSupport clients might resolve this property late using the resolve request.

setTooltipback to summary
public void setTooltip(final String tooltip)
setTooltipback to summary
public void setTooltip(final MarkupContent tooltip)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override