oracle.ide.cmd
Class DeleteTNodeCommand
java.lang.Object
oracle.ide.addin.AbstractCommand
oracle.ide.cmd.DeleteTNodeCommand
- All Implemented Interfaces:
- Command
- public class DeleteTNodeCommand
- extends AbstractCommand
The DeleteTNodeCommand
class implements the command to remove the the selected node(s) from their containing folder(s).
- See Also:
oracle.ide.Command
, oracle.ide.AbstractCommand
Method Summary |
int |
doit()
Iterates through the list of selected TNodes, and for each, removes the node from its containing folder. |
java.lang.String |
getName()
Gets the name of the command to display as the action to undo |
int |
undo()
Undo the deletions, adding the elements back to their containing folders |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteTNodeCommand
public DeleteTNodeCommand()
- Constructor.
DeleteTNodeCommand
protected DeleteTNodeCommand(int cmdId,
int type)
- Constructor.
doit
public int doit()
throws java.lang.Exception
- Iterates through the list of selected TNodes, and for each, removes the node from its containing folder. Does not remove each node's file from disk. After the TNodes are deleted, selection is assigned to a TNode remaining on the tree. Preference is given to a sibling of the last deleted TNode; if no siblings remain, its closest remaining ancestor is selected instead.
-
- Throws:
java.lang.Exception
undo
public int undo()
throws java.lang.Exception
- Undo the deletions, adding the elements back to their containing folders
-
- Specified by:
undo
in interface Command
- Overrides:
undo
in class AbstractCommand
-
- Throws:
java.lang.Exception
getName
public java.lang.String getName()
- Gets the name of the command to display as the action to undo
-
- Specified by:
getName
in interface Command
- Overrides:
getName
in class AbstractCommand
-
- Returns:
- the name of this command
Copyright © 1997, 2004, Oracle. All rights reserved.