本文整理汇总了Java中com.intellij.codeInsight.TailType.DOT属性的典型用法代码示例。如果您正苦于以下问题:Java TailType.DOT属性的具体用法?Java TailType.DOT怎么用?Java TailType.DOT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.codeInsight.TailType
的用法示例。
在下文中一共展示了TailType.DOT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleInsert
@Override
public void handleInsert(final InsertionContext context, LookupElement lookupElement)
{
context.commitDocument();
TailType tailType = getTailType(context.getCompletionChar(), (LookupItem) lookupElement);
final Editor editor = context.getEditor();
editor.getCaretModel().moveToOffset(context.getSelectionEndOffset());
tailType.processTail(editor, context.getSelectionEndOffset());
editor.getSelectionModel().removeSelection();
if(tailType == TailType.DOT || context.getCompletionChar() == '.')
{
AutoPopupController.getInstance(context.getProject()).autoPopupMemberLookup(editor, null);
}
}
示例2: handleInsert
@Override
public void handleInsert(final InsertionContext context, LookupElement lookupElement) {
context.commitDocument();
TailType tailType = getTailType(context.getCompletionChar(), (LookupItem)lookupElement);
final Editor editor = context.getEditor();
editor.getCaretModel().moveToOffset(context.getSelectionEndOffset());
tailType.processTail(editor, context.getSelectionEndOffset());
editor.getSelectionModel().removeSelection();
if (tailType == TailType.DOT || context.getCompletionChar() == '.') {
AutoPopupController.getInstance(context.getProject()).autoPopupMemberLookup(editor, null);
}
}
示例3: handleInsertInner
private void handleInsertInner(InsertionContext context, LookupItem item, final char completionChar) {
final Project project = context.getProject();
final Editor editor = context.getEditor();
final Document document = editor.getDocument();
PsiDocumentManager.getInstance(project).commitDocument(document);
TailType tailType = getTailType(completionChar, item);
InsertHandlerState state = new InsertHandlerState(context.getSelectionEndOffset(), context.getSelectionEndOffset());
if (completionChar == Lookup.REPLACE_SELECT_CHAR) {
removeEndOfIdentifier(context);
}
else if(context.getOffsetMap().getOffset(CompletionInitializationContext.IDENTIFIER_END_OFFSET) != context.getSelectionEndOffset()) {
JavaCompletionUtil.resetParensInfo(context.getOffsetMap());
}
handleParentheses(false, false, tailType, context, state);
context.setTailOffset(state.tailOffset);
state.caretOffset = processTail(tailType, state.caretOffset, state.tailOffset, editor);
editor.getSelectionModel().removeSelection();
if (tailType == TailType.DOT || context.getCompletionChar() == '.') {
AutoPopupController.getInstance(project).autoPopupMemberLookup(editor, null);
}
}
示例4: handleInsert
@Override
public void handleInsert(InsertionContext context) {
super.handleInsert(context);
if (getTailType() == TailType.DOT || context.getCompletionChar() == '.') {
AutoPopupController.getInstance(context.getProject()).scheduleAutoPopup(context.getEditor());
}
}