/** * Finds and returns the Java element that contains the text selection in the given editor. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException if accessing the type root fails */ public static IJavaElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaModelException { return getElementAtOffset(getInput(editor), selection); }
/** * Finds and returns the Java elements for the given editor selection. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException if accessing the type root fails */ public static IJavaElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaModelException { return codeResolve(getInput(editor), selection); }
/** * Finds and returns the Java element that contains the * text selection in the given editor. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException */ public static IJavaElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaModelException { return getElementAtOffset(getInput(editor), selection); }
/** * Finds and returns the Java element that contains the text selection in the given editor. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException if accessing the type root fails */ public static IJavaElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaModelException { return getElementAtOffset(getInput(editor), selection); }
/** * Finds and returns the Java elements for the given editor selection. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException */ public static IJavaElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaModelException { return codeResolve(getInput(editor), selection); }
/** * Finds and returns the Java elements for the given editor selection. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException if accessing the type root fails */ public static IJavaElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaModelException { return codeResolve(getInput(editor), selection); }