public abstract class ParenthesesInsertHandler<T extends LookupElement> extends java.lang.Object implements InsertHandler<T>
Modifier and Type | Field and Description |
---|---|
static ParenthesesInsertHandler<LookupElement> |
NO_PARAMETERS |
static ParenthesesInsertHandler<LookupElement> |
WITH_PARAMETERS |
Modifier | Constructor and Description |
---|---|
protected |
ParenthesesInsertHandler() |
protected |
ParenthesesInsertHandler(boolean spaceBeforeParentheses,
boolean spaceBetweenParentheses,
boolean mayInsertRightParenthesis) |
protected |
ParenthesesInsertHandler(boolean spaceBeforeParentheses,
boolean spaceBetweenParentheses,
boolean mayInsertRightParenthesis,
boolean allowParametersOnNextLine) |
protected |
ParenthesesInsertHandler(boolean spaceBeforeParentheses,
boolean spaceBetweenParentheses,
boolean mayInsertRightParenthesis,
boolean allowParametersOnNextLine,
char leftParenthesis,
char rightParenthesis) |
Modifier and Type | Method and Description |
---|---|
protected PsiElement |
findExistingLeftParenthesis(InsertionContext context) |
protected PsiElement |
findNextToken(InsertionContext context) |
static ParenthesesInsertHandler<LookupElement> |
getInstance(boolean hasParameters) |
static ParenthesesInsertHandler<LookupElement> |
getInstance(boolean hasParameters,
boolean spaceBeforeParentheses,
boolean spaceBetweenParentheses,
boolean insertRightParenthesis,
boolean allowParametersOnNextLine) |
void |
handleInsert(InsertionContext context,
T item)
Invoked inside atomic action.
|
protected abstract boolean |
placeCaretInsideParentheses(InsertionContext context,
T item) |
public static final ParenthesesInsertHandler<LookupElement> WITH_PARAMETERS
public static final ParenthesesInsertHandler<LookupElement> NO_PARAMETERS
protected ParenthesesInsertHandler(boolean spaceBeforeParentheses, boolean spaceBetweenParentheses, boolean mayInsertRightParenthesis)
protected ParenthesesInsertHandler(boolean spaceBeforeParentheses, boolean spaceBetweenParentheses, boolean mayInsertRightParenthesis, boolean allowParametersOnNextLine)
protected ParenthesesInsertHandler(boolean spaceBeforeParentheses, boolean spaceBetweenParentheses, boolean mayInsertRightParenthesis, boolean allowParametersOnNextLine, char leftParenthesis, char rightParenthesis)
protected ParenthesesInsertHandler()
public static ParenthesesInsertHandler<LookupElement> getInstance(boolean hasParameters)
public static ParenthesesInsertHandler<LookupElement> getInstance(boolean hasParameters, boolean spaceBeforeParentheses, boolean spaceBetweenParentheses, boolean insertRightParenthesis, boolean allowParametersOnNextLine)
protected abstract boolean placeCaretInsideParentheses(InsertionContext context, T item)
public void handleInsert(InsertionContext context, T item)
InsertHandler
handleInsert
in interface InsertHandler<T extends LookupElement>
protected PsiElement findExistingLeftParenthesis(InsertionContext context)
protected PsiElement findNextToken(InsertionContext context)