当前位置: 首页>>代码示例>>Java>>正文


Java TailType.DOT属性代码示例

本文整理汇总了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);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:DefaultInsertHandler.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:DefaultInsertHandler.java

示例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);
  }

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:DefaultInsertHandler.java

示例4: handleInsert

@Override
public void handleInsert(InsertionContext context) {
  super.handleInsert(context);
  if (getTailType() == TailType.DOT || context.getCompletionChar() == '.') {
    AutoPopupController.getInstance(context.getProject()).scheduleAutoPopup(context.getEditor());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:PackageLookupItem.java


注:本文中的com.intellij.codeInsight.TailType.DOT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。