public static final class CompletionUtilities.CompletionItemBuilder extends Object
CompletionItem
instances.
CompletionUtilities.newCompletionItemBuilder(insertText) .startOffset(offset) .iconResource(iconPath) .leftHtmlText("" + label + "") .sortPriority(10) .sortText(label) .build();
Modifier and Type | Method and Description |
---|---|
CompletionItem |
build()
Builds completion item.
|
CompletionUtilities.CompletionItemBuilder |
documentationTask(java.util.function.Supplier<CompletionTask> task)
A task used to obtain a documentation associated with the item if there
is any.
|
CompletionUtilities.CompletionItemBuilder |
endOffset(int offset)
Start offset of the region to be removed on the item's selection.
|
CompletionUtilities.CompletionItemBuilder |
iconResource(String iconResource)
Resource path of the icon.
|
CompletionUtilities.CompletionItemBuilder |
insertText(String insertText)
A text to be inserted into a document when selecting the item.
|
CompletionUtilities.CompletionItemBuilder |
leftHtmlText(String leftHtmlText)
An html text that will be displayed on the left side of the item next to the icon.
|
CompletionUtilities.CompletionItemBuilder |
onSelect(java.util.function.Consumer<CompletionUtilities.OnSelectContext> callback)
A callback to process the item insertion.
|
CompletionUtilities.CompletionItemBuilder |
rightHtmlText(String rightHtmlText)
An html text that will be aligned to the right edge of the item.
|
CompletionUtilities.CompletionItemBuilder |
sortPriority(int sortPriority)
Item's priority.
|
CompletionUtilities.CompletionItemBuilder |
sortText(CharSequence sortText)
A text used to sort items alphabetically.
|
CompletionUtilities.CompletionItemBuilder |
startOffset(int offset)
Start offset of the region to be removed on the item's selection.
|
CompletionUtilities.CompletionItemBuilder |
tooltipTask(java.util.function.Supplier<CompletionTask> task)
A task used to obtain a tooltip hint associated with the item if there
is any.
|
public CompletionUtilities.CompletionItemBuilder insertText(String insertText)
public CompletionUtilities.CompletionItemBuilder startOffset(int offset)
public CompletionUtilities.CompletionItemBuilder endOffset(int offset)
public CompletionUtilities.CompletionItemBuilder iconResource(String iconResource)
public CompletionUtilities.CompletionItemBuilder leftHtmlText(String leftHtmlText)
public CompletionUtilities.CompletionItemBuilder rightHtmlText(String rightHtmlText)
public CompletionUtilities.CompletionItemBuilder sortPriority(int sortPriority)
public CompletionUtilities.CompletionItemBuilder sortText(CharSequence sortText)
public CompletionUtilities.CompletionItemBuilder documentationTask(java.util.function.Supplier<CompletionTask> task)
public CompletionUtilities.CompletionItemBuilder tooltipTask(java.util.function.Supplier<CompletionTask> task)
public CompletionUtilities.CompletionItemBuilder onSelect(java.util.function.Consumer<CompletionUtilities.OnSelectContext> callback)
public CompletionItem build()