| java.lang.Object org.eclipse.ui.ide.ResourceUtil
ResourceUtil | final public class ResourceUtil (Code) | | Utility class for manipulating resources and determining correspondences
between resources and workbench objects.
This class provides all its functionality via static methods.
It is not intended to be instantiated or subclassed.
since: 3.1 |
Method Summary | |
public static IEditorPart | findEditor(IWorkbenchPage page, IFile file) Returns the editor in the given page whose input represents the given file,
or null if there is no such editor. | public static Object | getAdapter(Object element, Class adapterType, boolean forceLoad) Returns the specified adapter for the given element, or null
if no such adapter was found. | public static IFile | getFile(IEditorInput editorInput) Returns the file corresponding to the given editor input, or null
if there is no applicable file. | public static IFile | getFile(Object element) Returns the file corresponding to the given model element, or null
if there is no applicable file. | public static IResource | getResource(IEditorInput editorInput) Returns the resource corresponding to the given editor input, or null
if there is no applicable resource. | public static IResource | getResource(Object element) Returns the resource corresponding to the given model element, or null
if there is no applicable resource. | public static ResourceMapping | getResourceMapping(Object element) Returns the resource mapping corresponding to the given model element, or null
if there is no applicable resource mapping. |
findEditor | public static IEditorPart findEditor(IWorkbenchPage page, IFile file)(Code) | | Returns the editor in the given page whose input represents the given file,
or null if there is no such editor.
Parameters: page - the workbench page Parameters: file - the file the matching editor, or null |
getAdapter | public static Object getAdapter(Object element, Class adapterType, boolean forceLoad)(Code) | | Returns the specified adapter for the given element, or null
if no such adapter was found.
Parameters: element - the model element Parameters: adapterType - the type of adapter to look up Parameters: forceLoad - true to force loading of the plug-in providing the adapter, false otherwise the adapter since: 3.2 |
getFile | public static IFile getFile(IEditorInput editorInput)(Code) | | Returns the file corresponding to the given editor input, or null
if there is no applicable file.
Returns null if the given editor input is null .
Parameters: editorInput - the editor input, or null the file corresponding to the editor input, or null |
getFile | public static IFile getFile(Object element)(Code) | | Returns the file corresponding to the given model element, or null
if there is no applicable file.
Parameters: element - the model element, or null the resource corresponding to the model element, or null since: 3.2 |
getResource | public static IResource getResource(IEditorInput editorInput)(Code) | | Returns the resource corresponding to the given editor input, or null
if there is no applicable resource.
Returns null if the given editor input is null .
Parameters: editorInput - the editor input the file corresponding to the editor input, or null |
getResource | public static IResource getResource(Object element)(Code) | | Returns the resource corresponding to the given model element, or null
if there is no applicable resource.
Parameters: element - the model element, or null the resource corresponding to the model element, or null since: 3.2 |
getResourceMapping | public static ResourceMapping getResourceMapping(Object element)(Code) | | Returns the resource mapping corresponding to the given model element, or null
if there is no applicable resource mapping.
Parameters: element - the model element, or null the resource mapping corresponding to the model element, or null since: 3.2 |
|
|