Bug 118479 [api] Need a way to get a shared instance of JavaTextTools
JavaTextTools contains tools required to cofigure a java text viewer, and those tools can be shared via JavaTextTools. Currently, when clients want to use those tools, they need to first create a new instance of JavaTextTools and then share their instance of JavaTextTools in order to share the tools in JavaTextTools. This seems like it goes against the purpose of JavaTextTools. You should only really have 1 instance of JavaTextTools (at least per preferenceStore) Plus, you also need to make sure you dispose JavaTextTools, so by having only 1 instance, it'll be easier to keep track of to dispose. JDT is already kind of doing this by only creating one instance of JavaTextTools in JavaPlugin. I think this one instance should be shared amongst other clients instead of just the jdt plugin. A new method should be added to JavaUI, getJavaTextTools, which gets JavaTextTools from JavaPlugin.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* @param parent the parent shell of the dialog to be created
	 * @param context the runnable context used to show progress when the dialog
	 *   is being populated
	 * @param scope the scope that limits which types are included
	 * @param style flags defining the style of the dialog; the only valid values are
	 *   <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>,
	 *   <code>CONSIDER_EXTERNAL_JARS</code>, or their bitwise OR, or <code>0</code>
	 * @param multipleSelection <code>true</code> if multiple selection is allowed
	 * @return a new selection dialog
	 */
	public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection) {
		return createMainTypeDialog(parent, context, scope, style, multipleSelection, "");
	}
	
	/**
	 * Opens a Java editor on the given Java element. The element can be a compilation unit 
	 * or class file. If there already is an open Java editor for the given element, it is returned.
	 *
	 * @param element the input element; either a compilation unit 
	 *   (<code>ICompilationUnit</code>) or a class file (</code>IClassFile</code>)
	 * @return the editor, or </code>null</code> if wrong element type or opening failed
	 * @exception PartInitException if the editor could not be initialized
	 * @exception JavaModelException if this element does not exist or if an
	 *		exception occurs while accessing its underlying resource
	 */
	public static IEditorPart openInEditor(IJavaElement element) throws JavaModelException, PartInitException {
		return EditorUtility.openInEditor(element);
	}
	/** 
	 * Reveals the source range of the given source reference element in the