@Override public SourcePosition findFunctionPositionFromCursor(String functionName) { Scope func = getSession() .getMode() .getCodeModel() .findFunctionDefinitionFromUsage(getCursorPosition(), functionName); if (func != null) { Position position = func.getPreamble(); return SourcePosition.create(position.getRow(), position.getColumn()); } else { return null; } }
private void fireRecordNavigationPosition(Position pos) { SourcePosition srcPos = SourcePosition.create(pos.getRow(), pos.getColumn()); fireEvent(new RecordNavigationPositionEvent(srcPos)); }
public void scrollToBottom() { SourcePosition pos = SourcePosition.create(getCurrentLineCount() - 1, 0); navigate(pos, false); }