public static class EditMostRecentFileAction.EditFileActionHandler
extends java.lang.Object
The method workWithFile(File)
of the default instance
getInstance()
is used by EditMostRecentFileAction
to edit the last opened file or to open the last used directory.
The advantage of this class is, that it is possible to exchange the implementation. This is for instance done in the Eclipse integration where files are opened inside Eclipse instead of the system editors.
Modifier and Type | Field and Description |
---|---|
static EditMostRecentFileAction.EditFileActionHandler |
instance
The default instance.
|
Constructor and Description |
---|
EditFileActionHandler() |
Modifier and Type | Method and Description |
---|---|
static EditMostRecentFileAction.EditFileActionHandler |
getInstance()
Returns the default instance.
|
static void |
setInstance(EditMostRecentFileAction.EditFileActionHandler instance)
Sets the default instance.
|
void |
workWithFile(java.io.File file)
Opens the given file in the default editor or opens the
given directory.
|
public static EditMostRecentFileAction.EditFileActionHandler instance
public void workWithFile(java.io.File file) throws java.io.IOException
file
- The file to edit or the folder to open.java.io.IOException
- Occurred Exception.public static EditMostRecentFileAction.EditFileActionHandler getInstance()
public static void setInstance(EditMostRecentFileAction.EditFileActionHandler instance)
instance
- The default instance to set.