public static final class StructureProvider.Builder extends Object
StructureElement
instances.Modifier and Type | Method and Description |
---|---|
StructureProvider.Builder |
addTag(StructureElement.Tag tag)
Adds tag for this structure element.
|
StructureElement |
build()
Builds structure element.
|
StructureProvider.Builder |
children(List<StructureElement> children)
Sub elements of this structure element.
|
StructureProvider.Builder |
children(StructureElement... children)
Adds sub element for this structure element.
|
StructureProvider.Builder |
detail(String detail)
The detail of
StructureElement , e.g the signature of a
function. |
StructureProvider.Builder |
expandedEndOffset(int expandedEndOffset)
The expanded range is offset range that is typically used to
determine if the cursors inside the element to reveal in the element
in the UI.
|
StructureProvider.Builder |
expandedStartOffset(int expandedStartOffset)
The expanded range is offset range that is typically used to
determine if the cursors inside the element to reveal in the element
in the UI.
|
StructureProvider.Builder |
file(FileObject f)
Sets file which contains the structure element.
|
StructureProvider.Builder |
kind(StructureElement.Kind name)
Kind of this structure element.
|
StructureProvider.Builder |
name(String name)
The name of
StructureElement is displayed in the structure
tree and other ui. |
StructureProvider.Builder |
selectionEndOffset(int selectionEndOffset)
The end of offset range where this element should be selected and
revealed in document when selected in outline view.
|
StructureProvider.Builder |
selectionStartOffset(int selectionStartOffset)
The start of offset range where this element should be selected and
revealed in document when selected in outline view.
|
StructureProvider.Builder |
tags(Set<StructureElement.Tag> tags)
Tags for this structure element.
|
@NonNull public StructureProvider.Builder name(@NonNull String name)
StructureElement
is displayed in the structure
tree and other ui.@NonNull public StructureProvider.Builder kind(@NonNull StructureElement.Kind name)
@NonNull public StructureProvider.Builder detail(@NonNull String detail)
StructureElement
, e.g the signature of a
function. If not provided only the name is used.@NonNull public StructureProvider.Builder selectionStartOffset(int selectionStartOffset)
@NonNull public StructureProvider.Builder selectionEndOffset(int selectionEndOffset)
@NonNull public StructureProvider.Builder expandedStartOffset(int expandedStartOffset)
@NonNull public StructureProvider.Builder expandedEndOffset(int expandedEndOffset)
@NonNull public StructureProvider.Builder addTag(@NonNull StructureElement.Tag tag)
@NonNull public StructureProvider.Builder tags(@NonNull Set<StructureElement.Tag> tags)
@NonNull public StructureProvider.Builder children(@NonNull StructureElement... children)
@NonNull public StructureProvider.Builder children(@NonNull List<StructureElement> children)
public StructureProvider.Builder file(FileObject f)
null
stands
for either implicit or inaccessible.f
- file object@NonNull public StructureElement build()