Skip navigation links
oracle.ide.cmd
Class RemoveFromDiskCommand
java.lang.Object
oracle.ide.controller.Command
oracle.ide.cmd.RemoveFileCommand
oracle.ide.cmd.RemoveFromDiskCommand
-
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:
Command
, Command
Method Summary |
protected UpdateMessage |
createUpdateMessage()
Creates an UpdateMessage whose ID is UpdateMessage.CHILD_REMOVED and stores the command ID as a user property. |
int |
doit()
Presents the user with the selected list of element files to delete from disk using SelectFilesPanel.showDialog(). |
protected boolean |
isNeedConfirmClose()
Override default behavior to suppress the 'Save Files' dialog when files are about to be removed from disk. |
protected boolean |
remove(Node node, Folder owner)
Removes element from owner . |
void |
setSilently(boolean silently)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveFromDiskCommand
public RemoveFromDiskCommand()
- Constructor.
setSilently
public void setSilently(boolean silently)
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().
-
- Overrides:
doit
in class RemoveFileCommand
-
- Throws:
java.lang.Exception
remove
protected boolean remove(Node node,
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.
createUpdateMessage
protected UpdateMessage createUpdateMessage()
- Description copied from class:
RemoveFileCommand
- Creates an
UpdateMessage
whose ID is UpdateMessage.CHILD_REMOVED
and stores the command ID as a user property.
-
- Overrides:
createUpdateMessage
in class RemoveFileCommand
-
- Returns:
- an
UpdateMessage
whose ID is UpdateMessage.CHILD_REMOVED
.
- See Also:
UpdateMessage.CHILD_REMOVED
isNeedConfirmClose
protected boolean isNeedConfirmClose()
- Override default behavior to suppress the 'Save Files' dialog when files are about to be removed from disk.
-
- Overrides:
isNeedConfirmClose
in class RemoveFileCommand
-
- Returns:
true
if the user should be prompted to save dirty nodes prior to removing them. This allows suppression of the 'Save Files' dialog when the files are about to be removed from disk altogether.
Skip navigation links
Copyright © 1997, 2013, Oracle. All rights reserved.