Bug 111509 [api] Need public api for EditorUtility.getActiveEditorJavaInput(..)
We are using internal jdt calls to perform some of our operations. We are using EditorUtility.getActiveEditorJavaInput(..) and would like to replace it with public api. We couldn't find public API to replace this usage. This is blocking our effort to remove access to JDT internal source.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
try {
				IDocument document= getSourceViewer().getDocument();
				fLine= document.getLineOfOffset(offset);
				fColumn= offset - document.getLineOffset(fLine);
				fElement= getElementAt(offset, true);
				fElementLine= getElementLine(document, fElement);
			} catch (BadLocationException e) {
				
				JavaPlugin.log(e);
				clear();
			} catch (JavaModelException e) {
				
				JavaPlugin.log(e.getStatus());
				clear();
			}
		}
		
		/**
		 * Computes the element line of a java element (the start of the element, or the line with
		 * the element's name range).
		 * 
		 * @param document the displayed document for line information
		 * @param element the java element
		 * @return the element's start line, or -1
		 * @throws BadLocationException
		 * @throws JavaModelException
		 */
		private int getElementLine(IDocument document, IJavaElement element) throws BadLocationException, JavaModelException {
			if (element instanceof IMember) {
				ISourceRange range= ((IMember) fElement).getNameRange();