public static IJavaElement[] codeResolveOrInputForked(JavaEditor editor) throws InvocationTargetException, InterruptedException { ITypeRoot input= getInput(editor); if (input == null) return EMPTY_RESULT; ITextSelection selection= (ITextSelection)editor.getSelectionProvider().getSelection(); IJavaElement[] result= performForkedCodeResolve(input, selection); if (result.length == 0) { result= new IJavaElement[] {input}; } return result; }
public static IJavaElement[] codeResolveOrInputForked(JavaEditor editor) throws InvocationTargetException, InterruptedException { IJavaElement input= getInput(editor); ITextSelection selection= (ITextSelection)editor.getSelectionProvider().getSelection(); IJavaElement[] result= performForkedCodeResolve(input, selection); if (result.length == 0) { result= new IJavaElement[] {input}; } return result; }
/** * Perform a code resolve in a separate thread. * @param primaryOnly if <code>true</code> only primary working copies will be returned * @throws InterruptedException * @throws InvocationTargetException * @since 3.2 */ public static IJavaElement[] codeResolveForked(JavaEditor editor, boolean primaryOnly) throws InvocationTargetException, InterruptedException { return performForkedCodeResolve(getInput(editor, primaryOnly), (ITextSelection)editor.getSelectionProvider().getSelection()); }
public static IJavaElement[] codeResolveOrInputForked(JavaEditor editor) throws InvocationTargetException, InterruptedException { ITypeRoot input= getInput(editor); if (input == null) return EMPTY_RESULT; ITextSelection selection= (ITextSelection)editor.getSelectionProvider().getSelection(); IJavaElement[] result= performForkedCodeResolve(input, selection); if (result.length == 0) { result= new IJavaElement[] {input}; } return result; }
/** * Perform a code resolve in a separate thread. * * @param editor the editor * @param primaryOnly if <code>true</code> only primary working copies will be returned * @return the resolved elements * @throws InvocationTargetException which wraps any exception or error which occurs while * running the runnable * @throws InterruptedException propagated by the context if the runnable acknowledges * cancelation by throwing this exception * @since 3.2 */ public static IJavaElement[] codeResolveForked(JavaEditor editor, boolean primaryOnly) throws InvocationTargetException, InterruptedException { ITypeRoot input= getInput(editor, primaryOnly); if (input != null) return performForkedCodeResolve(input, (ITextSelection) editor.getSelectionProvider().getSelection()); return EMPTY_RESULT; }
/** * Perform a code resolve in a separate thread. * * @param editor the editor * @param primaryOnly if <code>true</code> only primary working copies will be returned * @return the resolved elements * @throws InvocationTargetException which wraps any exception or error which occurs while * running the runnable * @throws InterruptedException propagated by the context if the runnable acknowledges * cancelation by throwing this exception * @since 3.2 */ public static IJavaElement[] codeResolveForked(JavaEditor editor, boolean primaryOnly) throws InvocationTargetException, InterruptedException { ITypeRoot input= getInput(editor, primaryOnly); if (input != null) return performForkedCodeResolve(input, (ITextSelection) editor.getSelectionProvider().getSelection()); return EMPTY_RESULT; }