/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package net.sourceforge.phpdt.ui;
import net.sourceforge.phpdt.core.IBufferFactory;
import net.sourceforge.phpdt.core.IJavaElement;
import net.sourceforge.phpdt.core.IWorkingCopy;
import net.sourceforge.phpdt.core.JavaCore;
import net.sourceforge.phpdt.core.JavaModelException;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.phpeditor.EditorUtility;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.internal.SharedImages;
import org.eclipse.ui.texteditor.IDocumentProvider;
/**
* Central access point for the Java UI plug-in (id
* "net.sourceforge.phpdt.ui"
). This class provides static
* methods for:
*
* This class provides static methods and fields only; it is not intended to be * instantiated or subclassed by clients. *
*/ public final class JavaUI { private static ISharedImages fgSharedImages = null; private JavaUI() { // prevent instantiation of JavaUI. } /** * The id of the Java plugin (value"net.sourceforge.phpdt.ui"
).
*/
// public static final String ID_PLUGIN= "net.sourceforge.phpdt.ui";
// //$NON-NLS-1$
/**
* The id of the Java perspective (value
* "net.sourceforge.phpdt.ui.JavaPerspective"
).
*/
// public static final String ID_PERSPECTIVE=
// "net.sourceforge.phpdt.ui.JavaPerspective"; //$NON-NLS-1$
/**
* The id of the Java hierarchy perspective (value
* "net.sourceforge.phpdt.ui.JavaHierarchyPerspective"
).
*/
// public static final String ID_HIERARCHYPERSPECTIVE=
// "net.sourceforge.phpdt.ui.JavaHierarchyPerspective"; //$NON-NLS-1$
/**
* The id of the Java action set (value
* "net.sourceforge.phpdt.ui.JavaActionSet"
).
*/
// public static final String ID_ACTION_SET=
// "net.sourceforge.phpdt.ui.JavaActionSet"; //$NON-NLS-1$
/**
* The id of the Java Element Creation action set (value
* "net.sourceforge.phpdt.ui.JavaElementCreationActionSet"
).
*
* @since 2.0
*/
// public static final String ID_ELEMENT_CREATION_ACTION_SET=
// "net.sourceforge.phpdt.ui.JavaElementCreationActionSet"; //$NON-NLS-1$
/**
* The id of the Java Coding action set (value
* "net.sourceforge.phpdt.ui.CodingActionSet"
).
*
* @since 2.0
*/
// public static final String ID_CODING_ACTION_SET=
// "net.sourceforge.phpdt.ui.CodingActionSet"; //$NON-NLS-1$
/**
* The id of the Java action set for open actions (value
* "net.sourceforge.phpdt.ui.A_OpenActionSet"
).
*
* @since 2.0
*/
// public static final String ID_OPEN_ACTION_SET=
// "net.sourceforge.phpdt.ui.A_OpenActionSet"; //$NON-NLS-1$
/**
* The id of the Java Search action set (value
* net.sourceforge.phpdt.ui.SearchActionSet"
).
*
* @since 2.0
*/
// public static final String ID_SEARCH_ACTION_SET=
// "net.sourceforge.phpdt.ui.SearchActionSet"; //$NON-NLS-1$
/**
* The editor part id of the editor that presents Java compilation units
* (value "net.sourceforge.phpdt.ui.CompilationUnitEditor"
).
*/
// public static final String ID_CU_EDITOR=
// "net.sourceforge.phpdt.ui.PHPUnitEditor"; //$NON-NLS-1$
/**
* The editor part id of the editor that presents Java binary class files
* (value "net.sourceforge.phpdt.ui.ClassFileEditor"
).
*/
// public static final String ID_CF_EDITOR=
// "net.sourceforge.phpdt.ui.ClassFileEditor"; //$NON-NLS-1$
/**
* The editor part id of the code snippet editor (value
* "net.sourceforge.phpdt.ui.SnippetEditor"
).
*/
// public static final String ID_SNIPPET_EDITOR=
// "net.sourceforge.phpdt.ui.SnippetEditor"; //$NON-NLS-1$
/**
* The view part id of the Packages view (value
* "net.sourceforge.phpdt.ui.PackageExplorer"
).
*
* When this id is used to access a view part with
* IWorkbenchPage.findView
or showView
, the
* returned IViewPart
can be safely cast to an
* IPackagesViewPart
.
*
"net.sourceforge.phpdt.ui.TypeHierarchy"
).
*
* When this id is used to access a view part with
* IWorkbenchPage.findView
or showView
, the
* returned IViewPart
can be safely cast to an
* ITypeHierarchyViewPart
.
*
"net.sourceforge.phpdt.ui.JavaBrowsingPerspective"
).
*
* @since 2.0
*/
// public static String ID_BROWSING_PERSPECTIVE=
// "net.sourceforge.phpdt.ui.JavaBrowsingPerspective"; //$NON-NLS-1$
/**
* The view part id of the Java Browsing Projects view (value
* "net.sourceforge.phpdt.ui.ProjectsView"
).
*
* @since 2.0
*/
// public static String ID_PROJECTS_VIEW=
// "net.sourceforge.phpdt.ui.ProjectsView"; //$NON-NLS-1$
/**
* The view part id of the Java Browsing Packages view (value
* "net.sourceforge.phpdt.ui.PackagesView"
).
*
* @since 2.0
*/
// public static String ID_PACKAGES_VIEW=
// "net.sourceforge.phpdt.ui.PackagesView"; //$NON-NLS-1$
/**
* The view part id of the Java Browsing Types view (value
* "net.sourceforge.phpdt.ui.TypesView"
).
*
* @since 2.0
*/
// public static String ID_TYPES_VIEW= "net.sourceforge.phpdt.ui.TypesView";
// //$NON-NLS-1$
/**
* The view part id of the Java Browsing Members view (value
* "net.sourceforge.phpdt.ui.MembersView"
).
*
* @since 2.0
*/
// public static String ID_MEMBERS_VIEW=
// "net.sourceforge.phpdt.ui.MembersView"; //$NON-NLS-1$
/**
* The class org.eclipse.debug.core.model.IProcess allows attaching String
* properties to processes. The Java UI contributes a property page for
* IProcess that will show the contents of the property with this key. The
* intent of this property is to show the command line a process was
* launched with.
*
* @deprecated
*/
// public final static String ATTR_CMDLINE=
// "net.sourceforge.phpdt.ui.launcher.cmdLine"; //$NON-NLS-1$
/**
* Returns the shared images for the Java UI.
*
* @return the shared images manager
*/
public static ISharedImages getSharedImages() {
if (fgSharedImages == null)
fgSharedImages = new SharedImages();
return fgSharedImages;
}
/**
* Creates a selection dialog that lists all packages of the given Java
* project. The caller is responsible for opening the dialog with
* Window.open
, and subsequently extracting the selected
* package (of type IPackageFragment
) via
* SelectionDialog.getResult
.
*
* @param parent
* the parent shell of the dialog to be created
* @param project
* the Java project
* @param style
* flags defining the style of the dialog; the valid flags are:
* IJavaElementSearchConstants.CONSIDER_BINARIES
,
* indicating that packages from binary package fragment roots
* should be included in addition to those from source package
* fragment roots;
* IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS
,
* indicating that packages from required projects should be
* included as well.
* @param filter
* the initial pattern to filter the set of packages. For example
* "com" shows all packages starting with "com". The meta
* character '?' representing any character and '*' representing
* any string are supported. Clients can pass an empty string if
* no filtering is required.
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*
* @since 2.0
*/
// public static SelectionDialog createPackageDialog(Shell parent,
// IJavaProject project, int style, String filter) throws JavaModelException
// {
// Assert.isTrue((style | IJavaElementSearchConstants.CONSIDER_BINARIES |
// IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS) ==
// (IJavaElementSearchConstants.CONSIDER_BINARIES |
// IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS));
//
// IPackageFragmentRoot[] roots= null;
// if ((style & IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS) !=
// 0) {
// roots= project.getAllPackageFragmentRoots();
// } else {
// roots= project.getPackageFragmentRoots();
// }
//
// List consideredRoots= null;
// if ((style & IJavaElementSearchConstants.CONSIDER_BINARIES) != 0) {
// consideredRoots= Arrays.asList(roots);
// } else {
// consideredRoots= new ArrayList(roots.length);
// for (int i= 0; i < roots.length; i++) {
// IPackageFragmentRoot root= roots[i];
// if (root.getKind() != IPackageFragmentRoot.K_BINARY)
// consideredRoots.add(root);
//
// }
// }
//
// int flags= JavaElementLabelProvider.SHOW_DEFAULT;
// if (consideredRoots.size() > 1)
// flags= flags | JavaElementLabelProvider.SHOW_ROOT;
//
// List packages= new ArrayList();
// Iterator iter= consideredRoots.iterator();
// while(iter.hasNext()) {
// IPackageFragmentRoot root= (IPackageFragmentRoot)iter.next();
// packages.addAll(Arrays.asList(root.getChildren()));
// }
// ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent,
// new JavaElementLabelProvider(flags));
// dialog.setIgnoreCase(false);
// dialog.setElements(packages.toArray()); // XXX inefficient
// dialog.setFilter(filter);
// return dialog;
// }
/**
* Creates a selection dialog that lists all packages of the given Java
* project. The caller is responsible for opening the dialog with
* Window.open
, and subsequently extracting the selected
* package (of type IPackageFragment
) via
* SelectionDialog.getResult
.
*
* @param parent
* the parent shell of the dialog to be created
* @param project
* the Java project
* @param style
* flags defining the style of the dialog; the valid flags are:
* IJavaElementSearchConstants.CONSIDER_BINARIES
,
* indicating that packages from binary package fragment roots
* should be included in addition to those from source package
* fragment roots;
* IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS
,
* indicating that packages from required projects should be
* included as well.
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*/
// public static SelectionDialog createPackageDialog(Shell parent,
// IJavaProject project, int style) throws JavaModelException {
// return createPackageDialog(parent, project, style, ""); //$NON-NLS-1$
// }
/**
* Creates a selection dialog that lists all packages under the given
* package fragment root. The caller is responsible for opening the dialog
* with Window.open
, and subsequently extracting the
* selected package (of type IPackageFragment
) via
* SelectionDialog.getResult
.
*
* @param parent
* the parent shell of the dialog to be created
* @param root
* the package fragment root
* @param filter
* the initial pattern to filter the set of packages. For example
* "com" shows all packages starting with "com". The meta
* character '?' representing any character and '*' representing
* any string are supported. Clients can pass an empty string if
* no filtering is required.
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*
* @since 2.0
*/
// public static SelectionDialog createPackageDialog(Shell parent,
// IPackageFragmentRoot root, String filter) throws JavaModelException {
// ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent,
// new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT));
// dialog.setIgnoreCase(false);
// dialog.setElements(root.getChildren());
// dialog.setFilter(filter);
// return dialog;
// }
/**
* Creates a selection dialog that lists all packages under the given
* package fragment root. The caller is responsible for opening the dialog
* with Window.open
, and subsequently extracting the
* selected package (of type IPackageFragment
) via
* SelectionDialog.getResult
.
*
* @param parent
* the parent shell of the dialog to be created
* @param root
* the package fragment root
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*/
// public static SelectionDialog createPackageDialog(Shell parent,
// IPackageFragmentRoot root) throws JavaModelException {
// return createPackageDialog(parent, root, ""); //$NON-NLS-1$
// }
/**
* Creates a selection dialog that lists all types in the given scope. The
* caller is responsible for opening the dialog with
* Window.open
, and subsequently extracting the selected
* type(s) (of type IType
) via
* SelectionDialog.getResult
.
*
* @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 IJavaElementSearchConstants.CONSIDER_CLASSES
,
* CONSIDER_INTERFACES
, or their bitwise OR
* (equivalent to CONSIDER_TYPES
)
* @param multipleSelection
* true
if multiple selection is allowed
* @param filter
* the initial pattern to filter the set of types. For example
* "Abstract" shows all types starting with "abstract". The meta
* character '?' representing any character and '*' representing
* any string are supported. Clients can pass an empty string if
* no filtering is required.
* @exception JavaModelException
* if the selection dialog could not be opened
*
* @since 2.0
*/
// public static SelectionDialog createTypeDialog(Shell parent,
// IRunnableContext context, IJavaSearchScope scope, int style, boolean
// multipleSelection, String filter) throws JavaModelException {
// int elementKinds= 0;
// if (style == IJavaElementSearchConstants.CONSIDER_TYPES) {
// elementKinds= IJavaSearchConstants.TYPE;
// } else if (style == IJavaElementSearchConstants.CONSIDER_INTERFACES) {
// elementKinds= IJavaSearchConstants.INTERFACE;
// } else if (style == IJavaElementSearchConstants.CONSIDER_CLASSES) {
// elementKinds= IJavaSearchConstants.CLASS;
// } else {
// Assert.isTrue(false, "illegal style"); //$NON-NLS-1$
// }
// if (multipleSelection) {
// MultiTypeSelectionDialog dialog= new MultiTypeSelectionDialog(parent,
// context, elementKinds, scope);
// dialog.setMessage(JavaUIMessages.getString("JavaUI.defaultDialogMessage"));
// //$NON-NLS-1$
// dialog.setFilter(filter);
// return dialog;
// } else {
// TypeSelectionDialog dialog= new TypeSelectionDialog(parent, context,
// elementKinds, scope);
// dialog.setMessage(JavaUIMessages.getString("JavaUI.defaultDialogMessage"));
// //$NON-NLS-1$
// dialog.setFilter(filter);
// return dialog;
// }
// }
/**
* Creates a selection dialog that lists all types in the given scope. The
* caller is responsible for opening the dialog with
* Window.open
, and subsequently extracting the selected
* type(s) (of type IType
) via
* SelectionDialog.getResult
.
*
* @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 IJavaElementSearchConstants.CONSIDER_CLASSES
,
* CONSIDER_INTERFACES
, or their bitwise OR
* (equivalent to CONSIDER_TYPES
)
* @param multipleSelection
* true
if multiple selection is allowed
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*/
// public static SelectionDialog createTypeDialog(Shell parent,
// IRunnableContext context, IJavaSearchScope scope, int style, boolean
// multipleSelection) throws JavaModelException {
// return createTypeDialog(parent, context, scope, style, multipleSelection,
// "");//$NON-NLS-1$
// }
/**
* Creates a selection dialog that lists all types in the given scope
* containing a standard main
method. The caller is
* responsible for opening the dialog with Window.open
, and
* subsequently extracting the selected type(s) (of type IType
)
* via SelectionDialog.getResult
.
*
* @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 IJavaElementSearchConstants.CONSIDER_BINARIES
,
* CONSIDER_EXTERNAL_JARS
, or their bitwise OR,
* or 0
* @param multipleSelection
* true
if multiple selection is allowed
* @param filter
* the initial pattern to filter the set of types containg a main
* method. For example "App" shows all types starting with "app".
* The meta character '?' representing any character and '*'
* representing any string are supported. Clients can pass an
* empty string if no filtering is required.
* @return a new selection dialog
*
* @since 2.0
*/
// public static SelectionDialog createMainTypeDialog(Shell parent,
// IRunnableContext context, IJavaSearchScope scope, int style, boolean
// multipleSelection, String filter) {
// if (multipleSelection) {
// MultiMainTypeSelectionDialog dialog= new
// MultiMainTypeSelectionDialog(parent, context, scope, style);
// dialog.setFilter(filter);
// return dialog;
// } else {
// MainTypeSelectionDialog dialog= new MainTypeSelectionDialog(parent,
// context, scope, style);
// dialog.setFilter(filter);
// return dialog;
// }
// }
/**
* Creates a selection dialog that lists all types in the given scope
* containing a standard main
method. The caller is
* responsible for opening the dialog with Window.open
, and
* subsequently extracting the selected type(s) (of type IType
)
* via SelectionDialog.getResult
.
*
* @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 IJavaElementSearchConstants.CONSIDER_BINARIES
,
* CONSIDER_EXTERNAL_JARS
, or their bitwise OR,
* or 0
* @param multipleSelection
* true
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, "");//$NON-NLS-1$
// }
/**
* Creates a selection dialog that lists all types in the given project. The
* caller is responsible for opening the dialog with
* Window.open
, and subsequently extracting the selected
* type(s) (of type IType
) via
* SelectionDialog.getResult
.
*
* @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 project
* the Java project
* @param style
* flags defining the style of the dialog; the only valid values
* are IJavaElementSearchConstants.CONSIDER_CLASSES
,
* CONSIDER_INTERFACES
, or their bitwise OR
* (equivalent to CONSIDER_TYPES
)
* @param multipleSelection
* true
if multiple selection is allowed
* @return a new selection dialog
* @exception JavaModelException
* if the selection dialog could not be opened
*/
// public static SelectionDialog createTypeDialog(Shell parent,
// IRunnableContext context, IProject project, int style, boolean
// multipleSelection) throws JavaModelException {
// IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new
// IJavaProject[] { JavaCore.create(project) });
// return createTypeDialog(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 (ICompilationUnit
)
* or a class file (IClassFile)
* @return the editor, or null 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
* given editor. No checking is done if the editor displays a compilation
* unit or class file that contains the given source reference. The editor
* simply reveals the source range denoted by the given source reference.
*
* @param part
* the editor displaying the compilation unit or class file
* @param element
* the source reference element defining the source range to be
* revealed
*
* @deprecated use revealInEditor(IEditorPart, IJavaElement)
* instead
*/
// public static void revealInEditor(IEditorPart part, ISourceReference
// element) {
// if (element instanceof IJavaElement)
// revealInEditor(part, (IJavaElement) element);
// }
/**
* Reveals the given java element in the given editor. If the element is not
* an instance of ISourceReference
this method result in a
* NOP. If it is a source reference no checking is done if the editor
* displays a compilation unit or class file that contains the source
* reference element. The editor simply reveals the source range denoted by
* the given element.
*
* @param part
* the editor displaying a compilation unit or class file
* @param element
* the element to be revealed
*
* @since 2.0
*/
// public static void revealInEditor(IEditorPart part, IJavaElement element)
// {
// EditorUtility.revealInEditor(part, element);
// }
/**
* Returns the working copy manager for the Java UI plug-in.
*
* @return the working copy manager for the Java UI plug-in
*/
public static IWorkingCopyManager getWorkingCopyManager() {
return PHPeclipsePlugin.getDefault().getWorkingCopyManager();
}
/**
* Answers the shared working copies currently registered for the Java
* plug-in. Note that the returned array can include working copies that are
* not on the class path of a Java project.
*
* @return the list of shared working copies
*
* @see net.sourceforge.phpdt.core.JavaCore#getSharedWorkingCopies(net.sourceforge.phpdt.core.IBufferFactory)
* @since 2.0
*/
public static IWorkingCopy[] getSharedWorkingCopies() {
return JavaCore.getSharedWorkingCopies(getBufferFactory());
}
/**
* Answers the shared working copies that are on the class path of a Java
* project currently registered for the Java plug-in.
*
*
* @return the list of shared working copies
*
* @see #getSharedWorkingCopies()
* @since 2.1
*/
// public static IWorkingCopy[] getSharedWorkingCopiesOnClasspath() {
// IWorkingCopy[] wcs= getSharedWorkingCopies();
// List result= new ArrayList(wcs.length);
// for (int i = 0; i < wcs.length; i++) {
// IWorkingCopy wc= wcs[i];
// if (wc instanceof IJavaElement) {
// IJavaElement je= (IJavaElement)wc;
// if (je.getJavaProject().isOnClasspath(je)) {
// result.add(wc);
// }
// }
// }
// return (IWorkingCopy[])result.toArray(new IWorkingCopy[result.size()]);
// }
/**
* Returns the BufferFactory for the Java UI plug-in.
*
* @return the BufferFactory for the Java UI plug-in
*
* @see net.sourceforge.phpdt.core.IBufferFactory
* @since 2.0
* @deprecated {@link IBufferFactory} has been replaced by
* {@link net.sourceforge.phpdt.core.WorkingCopyOwner}. The
* Java UI plug-in uses the primary working copy owner
* that can be accessed with null
in API's that
* require an owner
*/
public static IBufferFactory getBufferFactory() {
return PHPeclipsePlugin.getDefault().getBufferFactory();
}
/**
* Returns the DocumentProvider used for Java compilation units.
*
* @return the DocumentProvider for Java compilation units.
*
* @see IDocumentProvider
* @since 2.0
*/
public static IDocumentProvider getDocumentProvider() {
return PHPeclipsePlugin.getDefault()
.getCompilationUnitDocumentProvider();
}
/**
* Sets the Javadoc location for an archive with the given path.
*
* @param archivePath
* the path of the library; this can be an workspace path or an
* external path in case of an external library.
* @param url
* The Javadoc location to set. This location should contain
* index.html and a file 'package-list'. null
* clears the current documentation location.
*
* @since 2.0
*/
// public static void setLibraryJavadocLocation(IPath archivePath, URL url)
// {
// JavaDocLocations.setLibraryJavadocLocation(archivePath, url);
// }
/**
* Returns the Javadoc location for an archive or null
if no
* location is available.
*
* @param archivePath
* the path of the library. This can be an workspace path or an
* external path in case of an external library.
*
* @since 2.0
*/
// public static URL getLibraryJavadocLocation(IPath archivePath) {
// return JavaDocLocations.getLibraryJavadocLocation(archivePath);
// }
/**
* Sets the Javadoc location for a Java project. This location is used for
* all types located in the project's source folders.
*
* @param project
* the project
* @param url
* The Javadoc location to set. This location should contain
* index.html and a file 'package-list'. null
* clears the current documentation location.
*
* @since 2.1
*/
// public static void setProjectJavadocLocation(IJavaProject project, URL
// url) {
// JavaDocLocations.setProjectJavadocLocation(project, url);
// }
/**
* Returns the Javadoc location for a Java project or null
if
* no location is available. This location is used for all types located in
* the project's source folders.
*
* @param project
* the project
*
* @since 2.1
*/
// public static URL getProjectJavadocLocation(IJavaProject project) {
// return JavaDocLocations.getProjectJavadocLocation(project);
// }
/**
* Returns the Javadoc base URL for an element. The base location contains
* the index file. This location doesn't have to exist. Returns
* null
if no javadoc location has been attached to the
* element's library or project. Example of a returned URL is http://www.
* junit. org/junit/javadoc.
*
* @param The
* element for which the doc URL is requested.
*
* @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
* http://www.junit.org/junit/javadoc/junit/extensions/TestSetup.html.
* This returned location doesn't have to exist. Returns null
* if no javadoc location has been attached to the element's library or
* project.
*
* @param The
* element for which the doc URL is requested.
* @param includeAnchor
* If set, the URL contains an anchor for member references:
* http://www.junit.org/junit/javadoc/junit/extensions/TestSetup.html#run(junit.framework.TestResult).
* Note that this involves type resolving and is a more expensive
* call than without anchor.
*
* @since 2.0
*/
// public static URL getJavadocLocation(IJavaElement element, boolean
// includeAnchor) throws JavaModelException {
// return JavaDocLocations.getJavadocLocation(element, includeAnchor);
// }
}