public class PlatformUIUtil extends Object
PlatformUI
Constructor and Description |
---|
PlatformUIUtil() |
Modifier and Type | Method and Description |
---|---|
static IEditorPart |
getActiveEditor()
Get active Editor
|
static IWorkbenchPage |
getActivePage()
Get active workbench page
|
static String |
getActivePerspectiveId()
Get active perspective ID
|
static IWorkbenchWindow |
getActiveWindow()
Get active workbench window
|
static IAction |
getGlobalActionHandler(String viewId,
String actionId)
Get global action handler
|
static IWorkbenchHelpSystem |
getHelpSystem()
Get Help System
|
static ImageDescriptor |
getSharedImageDescriptor(String symbolicName)
Get ImageDescriptor from Shared Images
|
static ISharedImages |
getSharedImages()
Get SharedImages for the workbench
|
static Shell |
getShell()
Get Active Workbench Window's shell
|
static boolean |
isViewVisible(String viewId)
Check if view is visible or not
|
static URL |
resolveHelpURL(String href,
boolean documentOnly)
Resolve the help resource href
|
static IWorkbenchPage |
showPerspective(String perspectiveId)
Show the specified perspective
|
static IViewPart |
showView(String viewId)
Show specified View
|
public static IWorkbenchWindow getActiveWindow()
public static IWorkbenchPage getActivePage()
public static Shell getShell()
IWorkbenchWindow
public static String getActivePerspectiveId()
public static IWorkbenchPage showPerspective(String perspectiveId)
perspectiveId
- target perspective ID to showIWorkbenchPage
, or null if not availableIWorkbench
public static IEditorPart getActiveEditor()
public static boolean isViewVisible(String viewId)
viewId
- target view ID to check the visibilitypublic static IViewPart showView(String viewId)
viewId
- target view ID to showpublic static IAction getGlobalActionHandler(String viewId, String actionId)
viewId
- target view IDactionId
- target action IDpublic static IWorkbenchHelpSystem getHelpSystem()
public static URL resolveHelpURL(String href, boolean documentOnly)
href
- target URLdocumentOnly
- if true, the resulting URL must point at the document
referenced by href. Otherwise, it can be a URL that contains
additional elements like navigation that the help system adds
to the document.IWorkbenchHelpSystem
public static ISharedImages getSharedImages()
public static ImageDescriptor getSharedImageDescriptor(String symbolicName)
symbolicName
- the symbolic name of the image; there are constants declared
in this interface for build-in images that come with the
workbenchISharedImages