public class ParameterizedCompletionInsertionInfo
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ParameterizedCompletionInsertionInfo.ReplacementCopy
Information about a replacement.
|
| Constructor and Description |
|---|
ParameterizedCompletionInsertionInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addReplacementCopy(java.lang.String id,
int start,
int end) |
void |
addReplacementLocation(int start,
int end)
Marks a region of the replacement text as representing a variable name
or some other construct that the user should replace.
|
int |
getDefaultEndOffs() |
javax.swing.text.Position |
getMaxOffset()
Returns the maximum offset the caret can move to before being outside
of the text inserted for this completion.
|
int |
getMinOffset()
Returns the minimum offset the caret can move to before being outside
of the text inserted for this completion.
|
ParameterizedCompletionInsertionInfo.ReplacementCopy |
getReplacementCopy(int index) |
int |
getReplacementCopyCount() |
int |
getReplacementCount()
Returns the number of replacements in the completion.
|
org.fife.ui.rsyntaxtextarea.DocumentRange |
getReplacementLocation(int index)
Returns the starting- and ending-offsets of the replacement regions
in the completion.
|
int |
getSelectionEnd()
Returns the offset that should be the end of the initially selected
text when the completion is inserted (i.e., the end offset of the first
replacement region).
|
int |
getSelectionStart()
Returns the offset that should be the start of the initially selected
text when the completion is inserted (i.e., the start offset of the
first replacement region).
|
java.lang.String |
getTextToInsert()
Returns the actual text to insert when the completion is selected.
|
boolean |
hasSelection()
Returns whether or not there is an initial selected region for the
completion (i.e., whether the completion actually has any parameters).
|
void |
setCaretRange(int minOffs,
javax.swing.text.Position maxOffs)
Sets the document range the caret can move around in before being
outside of the text inserted for the completion.
|
void |
setDefaultEndOffs(int end) |
void |
setInitialSelection(int selStart,
int selEnd)
Sets the initially selected region for the completion.
|
void |
setTextToInsert(java.lang.String text)
Sets the text to insert for the completion.
|
public ParameterizedCompletionInsertionInfo()
public void addReplacementCopy(java.lang.String id,
int start,
int end)
public void addReplacementLocation(int start,
int end)
start - The start offset.end - The end offset.getReplacementCount(),
getReplacementLocation(int)public int getDefaultEndOffs()
public javax.swing.text.Position getMaxOffset()
getMinOffset()public int getMinOffset()
getMaxOffset()public int getReplacementCopyCount()
public int getReplacementCount()
public ParameterizedCompletionInsertionInfo.ReplacementCopy getReplacementCopy(int index)
public org.fife.ui.rsyntaxtextarea.DocumentRange getReplacementLocation(int index)
index - The replacement region.getReplacementCount()public int getSelectionEnd()
getSelectionStart()public int getSelectionStart()
getSelectionEnd()public java.lang.String getTextToInsert()
setTextToInsert(String)public boolean hasSelection()
public void setInitialSelection(int selStart,
int selEnd)
selStart - The selection start.selEnd - The selection end.getSelectionEnd(),
getSelectionStart()public void setCaretRange(int minOffs,
javax.swing.text.Position maxOffs)
minOffs - The minimum offset.maxOffs - The maximum offset, that will track its location as the
document is modified.getMinOffset(),
getMaxOffset()public void setDefaultEndOffs(int end)
public void setTextToInsert(java.lang.String text)
text - The text to insert.getTextToInsert()