void (LookupElement item) { if (isFinished()) { return; } if (item != null) { ExpressionContext context = getCurrentExpressionContext(); for (TemplateCompletionProcessor processor : TemplateCompletionProcessor.EP_NAME.getExtensionList()) { if (!processor.nextTabOnItemSelected(context, item)) { return; } } } TextRange range = getCurrentVariableRange(); if (range != null && range.getLength() > 0) { int caret = getEditor().getCaretModel().getOffset(); if (caret == range.getEndOffset() || isCaretInsideOrBeforeNextVariable()) { nextTab(); } else if (caret > range.getEndOffset()) { gotoEnd(true); } } }