com.ibm.ftt.ui.resources.core.editor
Class EditorUtils

java.lang.Object
  extended by com.ibm.ftt.ui.resources.core.editor.EditorUtils
All Implemented Interfaces:
IEditorUtils

public class EditorUtils
extends Object
implements IEditorUtils

The EditorUtils class can be used to obtain the default editor for a given resource.

The EditorUtils class is intended to handle all known resource types by delegating to the appropriate IEditorUtils instance. Caller should invoke this class instead of resource type specific IEditorUtils implementations directly.


Field Summary
static String COPY_RIGHT
           
 
Method Summary
 IEditorDescriptor getDefaultEditor(Object file)
          Returns the descriptor of the default editor for the given file object.
static EditorUtils getInstance()
          Returns the singleton instance of the EditorUtils class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPY_RIGHT

public static final String COPY_RIGHT
See Also:
Constant Field Values
Method Detail

getInstance

public static EditorUtils getInstance()
Returns the singleton instance of the EditorUtils class

Returns:
the singleton EditorUtils object

getDefaultEditor

public IEditorDescriptor getDefaultEditor(Object file)
Description copied from interface: IEditorUtils
Returns the descriptor of the default editor for the given file object.

Specified by:
getDefaultEditor in interface IEditorUtils
Parameters:
file - the file object that the editor would open
Returns:
a descriptor of the default editor for the file; null if the current class does not know how to handle the given file