Result (@NotNull Editor editor, @NotNull PsiFile psiFile) { final Document document = editor.getDocument(); final CaretModel caretModel = editor.getCaretModel(); final int offset = caretModel.getOffset(); final CharSequence text = document.getCharsSequence(); int line = caretModel.getLogicalPosition().line; final int endLineOffset = document.getLineEndOffset(line); final LogicalPosition endLineLogicalPosition = editor.offsetToLogicalPosition(endLineOffset); // Stop processing if there are non-white space symbols after the current caret position. final int lastNonWsSymbolOffset = CharArrayUtil.shiftBackward(text, endLineOffset, " \t"); if (lastNonWsSymbolOffset > offset || caretModel.getLogicalPosition().column > endLineLogicalPosition.column) { return Result.CONTINUE; } final Pair<JavadocHelper.JavadocParameterInfo,List<JavadocHelper.JavadocParameterInfo>> pair = ourHelper.parse(psiFile, editor, offset); if (pair.first == null || pair.first.parameterDescriptionStartPosition != null) { return Result.CONTINUE; } final LogicalPosition position = ourHelper.calculateDescriptionStartPosition(psiFile, pair.second, pair.first); ourHelper.navigate(position, editor, psiFile.getProject()); return Result.STOP; }