/** Gets the completions at the passed offset. */ public ICompletionProposal[] getCompletions(String text, String actTok, int offset) throws Exception { this.text = text; this.actTok = actTok; this.offset = offset; PyStackFrame stackFrame = getCurrentSuspendedPyStackFrame(null); if (stackFrame != null) { AbstractDebugTarget target = (AbstractDebugTarget) stackFrame.getAdapter(IDebugTarget.class); if (target != null) { GetCompletionsCommand cmd = new GetCompletionsCommand( target, actTok, stackFrame.getLocalsLocator().getPyDBLocation()); cmd.setCompletionListener(this); target.postCommand(cmd); } return waitForCommand(); } return EMPTY_COMPLETION_PROPOSALS; }