oracle.ide.cmd
Class RemoveFromDiskCommand
java.lang.Object
oracle.ide.addin.AbstractCommand
oracle.ide.cmd.RemoveFileCommand
oracle.ide.cmd.RemoveFromDiskCommand
- All Implemented Interfaces:
- Command
- public class RemoveFromDiskCommand
- extends RemoveFileCommand
The RemoveFileCommand class implements the command to delete
the file(s) on disk that are associated with the selected element(s).
- See Also:
oracle.ide.Command,
oracle.ide.AbstractCommand
|
Method Summary |
int |
doit()
Presents the user with the selected list of element files to delete
from disk using SelectFilesPanel.showDialog(). |
protected boolean |
remove(Document document,
Folder owner)
Removes element from owner. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveFromDiskCommand
public RemoveFromDiskCommand()
- Constructor.
doit
public int doit()
throws java.lang.Exception
- Presents the user with the selected list of element files to delete
from disk using SelectFilesPanel.showDialog(). Any files selected
by the user are then removed from their containing folders and
deleted from disk.
Note that although the Action associated with this command is
enabled (otherwise we should never get here), it has been enabled
with a quick check version of canRemove() called on each selected
element's folder. A more thorough version of canRemove() check is
performed here prior to actually performing the remove().
- Specified by:
doit in interface Command- Overrides:
doit in class RemoveFileCommand
- Throws:
java.lang.Exception
remove
protected boolean remove(Document document,
Folder owner)
- Description copied from class:
RemoveFileCommand
- Removes
element from owner.
- Overrides:
remove in class RemoveFileCommand
- Returns:
false if the element could not be removed.
Copyright ©1997, 2003, Oracle. All rights reserved.