Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse JDT
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

org.eclipse.jdt.ui
Class JavaUI

java.lang.Object
  extended byorg.eclipse.jdt.ui.JavaUI


public final class JavaUI
extends Object

Central access point for the Java UI plug-in (id "org.eclipse.jdt.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.


Field Summary
static String ATTR_CMDLINE
          Deprecated.  
static String ID_ACTION_SET
          The id of the Java action set (value "org.eclipse.jdt.ui.JavaActionSet").
static String ID_BROWSING_PERSPECTIVE
          The id of the Java Browsing Perspective (value "org.eclipse.jdt.ui.JavaBrowsingPerspective").
static String ID_CF_EDITOR
          The editor part id of the editor that presents Java binary class files (value "org.eclipse.jdt.ui.ClassFileEditor").
static String ID_CODING_ACTION_SET
          The id of the Java Coding action set (value "org.eclipse.jdt.ui.CodingActionSet").
static String ID_CU_EDITOR
          The editor part id of the editor that presents Java compilation units (value "org.eclipse.jdt.ui.CompilationUnitEditor").
static String ID_ELEMENT_CREATION_ACTION_SET
          The id of the Java Element Creation action set (value "org.eclipse.jdt.ui.JavaElementCreationActionSet").
static String ID_HIERARCHYPERSPECTIVE
          The id of the Java hierarchy perspective (value "org.eclipse.jdt.ui.JavaHierarchyPerspective").
static String ID_JAVADOC_VIEW
          The view part id of the Javadoc view (value "org.eclipse.jdt.ui.JavadocView").
static String ID_MEMBERS_VIEW
          The view part id of the Java Browsing Members view (value "org.eclipse.jdt.ui.MembersView").
static String ID_OPEN_ACTION_SET
          The id of the Java action set for open actions (value "org.eclipse.jdt.ui.A_OpenActionSet").
static String ID_PACKAGES
          The view part id of the Packages view (value "org.eclipse.jdt.ui.PackageExplorer").
static String ID_PACKAGES_VIEW
          The view part id of the Java Browsing Packages view (value "org.eclipse.jdt.ui.PackagesView").
static String ID_PERSPECTIVE
          The id of the Java perspective (value "org.eclipse.jdt.ui.JavaPerspective").
static String ID_PLUGIN
          The id of the Java plugin (value "org.eclipse.jdt.ui").
static String ID_PROJECTS_VIEW
          The view part id of the Java Browsing Projects view (value "org.eclipse.jdt.ui.ProjectsView").
static String ID_SEARCH_ACTION_SET
          The id of the Java Search action set (value org.eclipse.jdt.ui.SearchActionSet").
static String ID_SNIPPET_EDITOR
          The editor part id of the code snippet editor (value "org.eclipse.jdt.ui.SnippetEditor").
static String ID_SOURCE_VIEW
          The view part id of the source (declaration) view (value "org.eclipse.jdt.ui.SourceView").
static String ID_TYPE_HIERARCHY
          The view part id of the type hierarchy part (value "org.eclipse.jdt.ui.TypeHierarchy").
static String ID_TYPES_VIEW
          The view part id of the Java Browsing Types view (value "org.eclipse.jdt.ui.TypesView").
 
Method Summary
static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection)
          Creates a selection dialog that lists all types in the given scope containing a standard main method.
static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter)
          Creates a selection dialog that lists all types in the given scope containing a standard main method.
static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style)
          Creates a selection dialog that lists all packages of the given Java project.
static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style, String filter)
          Creates a selection dialog that lists all packages of the given Java project.
static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root)
          Creates a selection dialog that lists all packages under the given package fragment root.
static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root, String filter)
          Creates a selection dialog that lists all packages under the given package fragment root.
static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection)
          Creates a selection dialog that lists all types in the given scope.
static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter)
          Creates a selection dialog that lists all types in the given scope.
static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IProject project, int style, boolean multipleSelection)
          Creates a selection dialog that lists all types in the given project.
static IBufferFactory getBufferFactory()
          Deprecated. IBufferFactory has been replaced by 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
static IDocumentProvider getDocumentProvider()
          Returns the DocumentProvider used for Java compilation units.
static URL getJavadocBaseLocation(IJavaElement element)
          Returns the Javadoc base URL for an element.
static URL getJavadocLocation(IJavaElement element, boolean includeAnchor)
          Returns the Javadoc URL for an element.
static Transfer getJavaElementClipboardTransfer()
          Returns the transfer instance used to copy/paste Java elements to and from the clipboard.
static URL getLibraryJavadocLocation(IPath archivePath)
          Returns the Javadoc location for an archive or null if no location is available.
static URL getProjectJavadocLocation(IJavaProject project)
          Returns the Javadoc location for a Java project or null if no location is available.
static ISharedImages getSharedImages()
          Returns the shared images for the Java UI.
static IWorkingCopy[] getSharedWorkingCopies()
          Deprecated. Use JavaCore.getWorkingCopies(org.eclipse.jdt.core.WorkingCopyOwner) instead with null as argument for owner.
static IWorkingCopy[] getSharedWorkingCopiesOnClasspath()
          Deprecated. Use JavaCore.getWorkingCopies(org.eclipse.jdt.core.WorkingCopyOwner) instead and filter the list with IJavaProject.isOnClasspath(IJavaElement).
static IWorkingCopyManager getWorkingCopyManager()
          Returns the working copy manager for the Java UI plug-in.
static IEditorPart openInEditor(IJavaElement element)
          Opens a Java editor on the given Java element.
static void revealInEditor(IEditorPart part, IJavaElement element)
          Reveals the given java element in the given editor.
static void revealInEditor(IEditorPart part, ISourceReference element)
          Deprecated. use revealInEditor(IEditorPart, IJavaElement) instead
static void setLibraryJavadocLocation(IPath archivePath, URL url)
          Sets the Javadoc location for an archive with the given path.
static void setLibraryJavadocLocations(IPath[] archivePaths, URL[] urls)
          Sets the Javadoc locations for archives with the given paths.
static void setProjectJavadocLocation(IJavaProject project, URL url)
          Sets the Javadoc location for a Java project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

 

Field Detail

 

 

ID_PLUGIN

public static final String ID_PLUGIN

The id of the Java plugin (value "org.eclipse.jdt.ui").

See Also:
Constant Field Values


 

 

ID_PERSPECTIVE

public static final String ID_PERSPECTIVE

The id of the Java perspective (value "org.eclipse.jdt.ui.JavaPerspective").

See Also:
Constant Field Values


 

 

ID_HIERARCHYPERSPECTIVE

public static final String ID_HIERARCHYPERSPECTIVE

The id of the Java hierarchy perspective (value "org.eclipse.jdt.ui.JavaHierarchyPerspective").

See Also:
Constant Field Values


 

 

ID_ACTION_SET

public static final String ID_ACTION_SET

The id of the Java action set (value "org.eclipse.jdt.ui.JavaActionSet").

See Also:
Constant Field Values


 

 

ID_ELEMENT_CREATION_ACTION_SET

public static final String ID_ELEMENT_CREATION_ACTION_SET

The id of the Java Element Creation action set (value "org.eclipse.jdt.ui.JavaElementCreationActionSet").

Since:
2.0
See Also:
Constant Field Values


 

 

ID_CODING_ACTION_SET

public static final String ID_CODING_ACTION_SET

The id of the Java Coding action set (value "org.eclipse.jdt.ui.CodingActionSet").

Since:
2.0
See Also:
Constant Field Values


 

 

ID_OPEN_ACTION_SET

public static final String ID_OPEN_ACTION_SET

The id of the Java action set for open actions (value "org.eclipse.jdt.ui.A_OpenActionSet").

Since:
2.0
See Also:
Constant Field Values


 

 

ID_SEARCH_ACTION_SET

public static final String ID_SEARCH_ACTION_SET

The id of the Java Search action set (value org.eclipse.jdt.ui.SearchActionSet").

Since:
2.0
See Also:
Constant Field Values


 

 

ID_CU_EDITOR

public static final String ID_CU_EDITOR

The editor part id of the editor that presents Java compilation units (value "org.eclipse.jdt.ui.CompilationUnitEditor").

See Also:
Constant Field Values


 

 

ID_CF_EDITOR

public static final String ID_CF_EDITOR

The editor part id of the editor that presents Java binary class files (value "org.eclipse.jdt.ui.ClassFileEditor").

See Also:
Constant Field Values


 

 

ID_SNIPPET_EDITOR

public static final String ID_SNIPPET_EDITOR

The editor part id of the code snippet editor (value "org.eclipse.jdt.ui.SnippetEditor").

See Also:
Constant Field Values


 

 

ID_PACKAGES

public static final String ID_PACKAGES

The view part id of the Packages view (value "org.eclipse.jdt.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.

See Also:
IPackagesViewPart, IWorkbenchPage.findView(java.lang.String), IWorkbenchPage.showView(java.lang.String), Constant Field Values


 

 

ID_TYPE_HIERARCHY

public static final String ID_TYPE_HIERARCHY

The view part id of the type hierarchy part (value "org.eclipse.jdt.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.

See Also:
ITypeHierarchyViewPart, IWorkbenchPage.findView(java.lang.String), IWorkbenchPage.showView(java.lang.String), Constant Field Values


 

 

ID_SOURCE_VIEW

public static final String ID_SOURCE_VIEW

The view part id of the source (declaration) view (value "org.eclipse.jdt.ui.SourceView").

Since:
3.0
See Also:
IWorkbenchPage.findView(java.lang.String), IWorkbenchPage.showView(java.lang.String), Constant Field Values


 

 

ID_JAVADOC_VIEW

public static final String ID_JAVADOC_VIEW

The view part id of the Javadoc view (value "org.eclipse.jdt.ui.JavadocView").

Since:
3.0
See Also:
IWorkbenchPage.findView(java.lang.String), IWorkbenchPage.showView(java.lang.String), Constant Field Values


 

 

ID_BROWSING_PERSPECTIVE

public static String ID_BROWSING_PERSPECTIVE

The id of the Java Browsing Perspective (value "org.eclipse.jdt.ui.JavaBrowsingPerspective").

Since:
2.0


 

 

ID_PROJECTS_VIEW

public static String ID_PROJECTS_VIEW

The view part id of the Java Browsing Projects view (value "org.eclipse.jdt.ui.ProjectsView").

Since:
2.0


 

 

ID_PACKAGES_VIEW

public static String ID_PACKAGES_VIEW

The view part id of the Java Browsing Packages view (value "org.eclipse.jdt.ui.PackagesView").

Since:
2.0


 

 

ID_TYPES_VIEW

public static String ID_TYPES_VIEW

The view part id of the Java Browsing Types view (value "org.eclipse.jdt.ui.TypesView").

Since:
2.0


 

 

ID_MEMBERS_VIEW

public static String ID_MEMBERS_VIEW

The view part id of the Java Browsing Members view (value "org.eclipse.jdt.ui.MembersView").

Since:
2.0


 

 

ATTR_CMDLINE

public static final String ATTR_CMDLINE

Deprecated.  

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.

See Also:
Constant Field Values
Method Detail

 

 

getSharedImages

public static ISharedImages getSharedImages()

Returns the shared images for the Java UI.

Returns:
the shared images manager


 

 

createPackageDialog

public static SelectionDialog createPackageDialog(Shell parent,
                                                  IJavaProject project,
                                                  int style,
                                                  String filter)
                                           throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
project - the Java project
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.
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.
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened
Since:
2.0


 

 

createPackageDialog

public static SelectionDialog createPackageDialog(Shell parent,
                                                  IJavaProject project,
                                                  int style)
                                           throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
project - the Java project
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.
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened


 

 

createPackageDialog

public static SelectionDialog createPackageDialog(Shell parent,
                                                  IPackageFragmentRoot root,
                                                  String filter)
                                           throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
root - the package fragment root
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.
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened
Since:
2.0


 

 

createPackageDialog

public static SelectionDialog createPackageDialog(Shell parent,
                                                  IPackageFragmentRoot root)
                                           throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
root - the package fragment root
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened


 

 

createTypeDialog

public static SelectionDialog createTypeDialog(Shell parent,
                                               IRunnableContext context,
                                               IJavaSearchScope scope,
                                               int style,
                                               boolean multipleSelection,
                                               String filter)
                                        throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
context - the runnable context used to show progress when the dialog is being populated
scope - the scope that limits which types are included
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)
multipleSelection - true if multiple selection is allowed
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.
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened
Since:
2.0


 

 

createTypeDialog

public static SelectionDialog createTypeDialog(Shell parent,
                                               IRunnableContext context,
                                               IJavaSearchScope scope,
                                               int style,
                                               boolean multipleSelection)
                                        throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
context - the runnable context used to show progress when the dialog is being populated
scope - the scope that limits which types are included
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)
multipleSelection - true if multiple selection is allowed
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened


 

 

createMainTypeDialog

public static SelectionDialog createMainTypeDialog(Shell parent,
                                                   IRunnableContext context,
                                                   IJavaSearchScope scope,
                                                   int style,
                                                   boolean multipleSelection,
                                                   String filter)

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.

Parameters:
parent - the parent shell of the dialog to be created
context - the runnable context used to show progress when the dialog is being populated
scope - the scope that limits which types are included
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
multipleSelection - true if multiple selection is allowed
filter - the initial pattern to filter the set of types containing 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.
Returns:
a new selection dialog
Since:
2.0


 

 

createMainTypeDialog

public static SelectionDialog createMainTypeDialog(Shell parent,
                                                   IRunnableContext context,
                                                   IJavaSearchScope scope,
                                                   int style,
                                                   boolean multipleSelection)

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.

Parameters:
parent - the parent shell of the dialog to be created
context - the runnable context used to show progress when the dialog is being populated
scope - the scope that limits which types are included
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
multipleSelection - true if multiple selection is allowed
Returns:
a new selection dialog


 

 

createTypeDialog

public static SelectionDialog createTypeDialog(Shell parent,
                                               IRunnableContext context,
                                               IProject project,
                                               int style,
                                               boolean multipleSelection)
                                        throws JavaModelException

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.

Parameters:
parent - the parent shell of the dialog to be created
context - the runnable context used to show progress when the dialog is being populated
project - the Java project
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)
multipleSelection - true if multiple selection is allowed
Returns:
a new selection dialog
Throws:
JavaModelException - if the selection dialog could not be opened


 

 

openInEditor

public static IEditorPart openInEditor(IJavaElement element)
                                throws JavaModelException,
                                       PartInitException

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.

Parameters:
element - the input element; either a compilation unit (ICompilationUnit) or a class file (IClassFile)
Returns:
the editor, or null if wrong element type or opening failed
Throws:
PartInitException - if the editor could not be initialized
JavaModelException - if this element does not exist or if an exception occurs while accessing its underlying resource


 

 

revealInEditor

public static void revealInEditor(IEditorPart part,
                                  ISourceReference element)

Deprecated. use revealInEditor(IEditorPart, IJavaElement) instead

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.

Parameters:
part - the editor displaying the compilation unit or class file
element - the source reference element defining the source range to be revealed


 

 

revealInEditor

public static void revealInEditor(IEditorPart 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.

Parameters:
part - the editor displaying a compilation unit or class file
element - the element to be revealed
Since:
2.0


 

 

getWorkingCopyManager

public static IWorkingCopyManager getWorkingCopyManager()

Returns the working copy manager for the Java UI plug-in.

Returns:
the working copy manager for the Java UI plug-in


 

 

getSharedWorkingCopies

public static IWorkingCopy[] getSharedWorkingCopies()

Deprecated. Use JavaCore.getWorkingCopies(org.eclipse.jdt.core.WorkingCopyOwner) instead with null as argument for owner.

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.

Returns:
the list of shared working copies
Since:
2.0
See Also:
JavaCore.getSharedWorkingCopies(org.eclipse.jdt.core.IBufferFactory)


 

 

getSharedWorkingCopiesOnClasspath

public static IWorkingCopy[] getSharedWorkingCopiesOnClasspath()

Deprecated. Use JavaCore.getWorkingCopies(org.eclipse.jdt.core.WorkingCopyOwner) instead and filter the list with IJavaProject.isOnClasspath(IJavaElement).

Answers the shared working copies that are on the class path of a Java project currently registered for the Java plug-in.

Returns:
the list of shared working copies
Since:
2.1
See Also:
getSharedWorkingCopies()


 

 

getBufferFactory

public static IBufferFactory getBufferFactory()

Deprecated. IBufferFactory has been replaced by 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

Returns the buffer factory for the Java UI plug-in.

Returns:
the buffer factory for the Java UI plug-in
Since:
2.0
See Also:
IBufferFactory


 

 

getDocumentProvider

public static IDocumentProvider getDocumentProvider()

Returns the DocumentProvider used for Java compilation units.

Returns:
the DocumentProvider for Java compilation units.
Since:
2.0
See Also:
IDocumentProvider


 

 

setLibraryJavadocLocation

public static void setLibraryJavadocLocation(IPath archivePath,
                                             URL url)

Sets the Javadoc location for an archive with the given path.

Parameters:
archivePath - the path of the library; this can be an workspace path or an external path in case of an external library.
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


 

 

setLibraryJavadocLocations

public static void setLibraryJavadocLocations(IPath[] archivePaths,
                                              URL[] urls)

Sets the Javadoc locations for archives with the given paths.

Parameters:
archivePaths - the paths of the libraries. can be workspace paths or external paths in case of an external library.
urls - the Javadoc locations to set. Each location corresponds to the archive path of the same index. A location should contain index.html and a file 'package-list'. null is a valid location entry and clears the current documentation location. The length of the location array must be equals to the number of archive paths passed.
Since:
3.0


 

 

getLibraryJavadocLocation

public static URL getLibraryJavadocLocation(IPath archivePath)

Returns the Javadoc location for an archive or null if no location is available.

Parameters:
archivePath - the path of the library. This can be an workspace path or an external path in case of an external library.
Returns:
the Javadoc location for an archive or null.
Since:
2.0


 

 

setProjectJavadocLocation

public static void setProjectJavadocLocation(IJavaProject project,
                                             URL url)

Sets the Javadoc location for a Java project. This location is used for all types located in the project's source folders.

Parameters:
project - the project
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


 

 

getProjectJavadocLocation

public static URL getProjectJavadocLocation(IJavaProject project)

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.

Parameters:
project - the project
Returns:
the Javadoc location for a Java project or null
Since:
2.1


 

 

getJavadocBaseLocation

public static URL getJavadocBaseLocation(IJavaElement element)
                                  throws JavaModelException

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.

Parameters:
element - the element for which the documentation URL is requested.
Returns:
the base location
Throws:
JavaModelException - thrown when the element can not be accessed
Since:
2.0


 

 

getJavadocLocation

public static URL getJavadocLocation(IJavaElement element,
                                     boolean includeAnchor)
                              throws JavaModelException

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.

Parameters:
element - the element for which the documentation URL is requested.
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.
Returns:
the Javadoc URL for the element
Throws:
JavaModelException - thrown when the element can not be accessed
Since:
2.0


 

 

getJavaElementClipboardTransfer

public static Transfer getJavaElementClipboardTransfer()

Returns the transfer instance used to copy/paste Java elements to and from the clipboard. Objects managed by this transfer instance are of type IJavaElement[]. So to access data from the clipboard clients should use the following code snippet:
   IJavaElement[] elements=
     (IJavaElement[])clipboard.getContents(JavaUI.getJavaElementClipboardTransfer());
 
To put elements into the clipboard use the following snippet:
    IJavaElement[] javaElements= ...;
    clipboard.setContents(
     new Object[] { javaElements },
     new Transfer[] { JavaUI.getJavaElementClipboardTransfer() } );
 

Returns:
returns the transfer object used to copy/paste Java elements to and from the clipboard
Since:
3.0


 

Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse JDT
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.