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 element the element for which the documentation URL is requested.
	 * @return the base location
	 * @throws JavaModelException thrown when the element can not be accessed
	 * 
	 * @since 2.0
	 */		
	public static URL getJavadocBaseLocation(IJavaElement element) throws JavaModelException {	
		return JavaDocLocations.getJavadocBaseLocation(element);
	}
	
	/**
	 * Returns the Javadoc URL for an element. Example of a returned URL is
	 * <i>http://www.junit.org/junit/javadoc/junit/extensions/TestSetup.html</i>.
	 * This returned location doesn't have to exist. Returns <code>null</code>
	 * if no javadoc location has been attached to the element's library or
	 * project.
	 * 
	 * @param element the element for which the documentation URL is requested.
	 * @param includeAnchor If set, the URL contains an anchor for member references:
	 * <i>http://www.junit.org/junit/javadoc/junit/extensions/TestSetup.html#run(junit.framework.TestResult)</i>. Note
	 * that this involves type resolving and is a more expensive call than without anchor.
	 * @return the Javadoc URL for the element
	 * @throws JavaModelException thrown when the element can not be accessed
	 * 
	 * @since 2.0
	 */		
	public static URL getJavadocLocation(IJavaElement element, boolean includeAnchor) throws JavaModelException {
		return JavaDocLocations.getJavadocLocation(element, includeAnchor);
	}