public class PlatformUIUtil extends Object
PlatformUI
Constructor and Description |
---|
PlatformUIUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.ui.IEditorPart |
getActiveEditor()
Get active Editor
|
static org.eclipse.ui.IWorkbenchPage |
getActivePage()
Get active workbench page
|
static String |
getActivePerspectiveId()
Get active perspective ID
|
static org.eclipse.ui.IWorkbenchWindow |
getActiveWindow()
Get active workbench window
|
static org.eclipse.jface.action.IAction |
getGlobalActionHandler(String viewId,
String actionId)
Get global action handler
|
static org.eclipse.ui.help.IWorkbenchHelpSystem |
getHelpSystem()
Get Help System
|
static org.eclipse.jface.resource.ImageDescriptor |
getSharedImageDescriptor(String symbolicName)
Get ImageDescriptor from Shared Images
|
static org.eclipse.ui.ISharedImages |
getSharedImages()
Get SharedImages for the workbench
|
static org.eclipse.swt.widgets.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 org.eclipse.ui.IWorkbenchPage |
showPerspective(String perspectiveId)
Show the specified perspective
|
static org.eclipse.ui.IViewPart |
showView(String viewId)
Show specified View
|
public static org.eclipse.ui.IWorkbenchWindow getActiveWindow()
public static org.eclipse.ui.IWorkbenchPage getActivePage()
public static org.eclipse.swt.widgets.Shell getShell()
IWorkbenchWindow
public static String getActivePerspectiveId()
public static org.eclipse.ui.IWorkbenchPage showPerspective(String perspectiveId)
perspectiveId
- target perspective ID to showIWorkbenchPage
, or null if not availableIWorkbench
public static org.eclipse.ui.IEditorPart getActiveEditor()
public static boolean isViewVisible(String viewId)
viewId
- target view ID to check the visibilitypublic static org.eclipse.ui.IViewPart showView(String viewId)
viewId
- target view ID to showpublic static org.eclipse.jface.action.IAction getGlobalActionHandler(String viewId, String actionId)
viewId
- target view IDactionId
- target action IDpublic static org.eclipse.ui.help.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 org.eclipse.ui.ISharedImages getSharedImages()
public static org.eclipse.jface.resource.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