Extension SDK 10.1.2

oracle.ide.cmd
Class CloseNodeCommand

java.lang.Object
  extended byoracle.ide.addin.AbstractCommand
      extended byoracle.ide.cmd.CloseNodeCommand
All Implemented Interfaces:
Command

public class CloseNodeCommand
extends AbstractCommand

The CloseNodeCommand class implements the command to unload the the selected node(s) and revert to an unopen state.

See Also:
Command, AbstractCommand

Field Summary
 
Fields inherited from class oracle.ide.addin.AbstractCommand
cmdId, context, name, type
 
Fields inherited from interface oracle.ide.addin.Command
CANCEL, EXECUTING, NO_CHANGE, NO_UNDO, NORMAL, OK
 
Constructor Summary
CloseNodeCommand()
          Constructor.
CloseNodeCommand(java.util.Map msgMap)
          Constructor.
 
Method Summary
 int checkSave(java.util.Iterator targets)
          Check if the user wants to save dirty documents about to be closed.
 int checkSave(java.util.Iterator targets, boolean canCancel)
          Check if the user wants to save dirty documents about to be closed.
 void clearAffectedDocuments()
          Reset the list of affected documents.
 int close(Document node)
          Close the specified document.
 int close(Document node, boolean uncache, boolean removeUnsavedNode)
          Close the specified node.
 int close(java.util.Iterator nodes, Context context, boolean uncache, boolean removeUnsavedNodes)
          Closes the nodes specified by the Iterator.
 int close(java.util.List nodes, boolean uncache, boolean removeUnsavedNodes)
          Close the documents listed in nodes.
protected  int close(java.util.List nodes, Context context, boolean uncache, boolean removeUnsavedNodes)
           
protected  void collectDirtyNodes(java.util.Iterator targets, java.util.List dirtyNodes)
           
protected  java.util.List confirmClose(Element element)
           
protected  java.util.List confirmClose(TNode[] tnodes)
           
 int doit()
          Executes the actions associated with a specific command.
 Document[] getAffectedDocuments()
          Returns an array of the documents closed.
 boolean isNeedConfirm()
           
 void setNeedConfirm(boolean confirm)
           
 
Methods inherited from class oracle.ide.addin.AbstractCommand
getContext, getData, getId, getName, getType, setContext, setData, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseNodeCommand

public CloseNodeCommand()
Constructor.


CloseNodeCommand

public CloseNodeCommand(java.util.Map msgMap)
Constructor.

Method Detail

doit

public int doit()
         throws java.lang.Exception
Description copied from interface: Command
Executes the actions associated with a specific command. When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.

Throws:
java.lang.Exception

isNeedConfirm

public boolean isNeedConfirm()

setNeedConfirm

public void setNeedConfirm(boolean confirm)

close

public int close(java.util.List nodes,
                 boolean uncache,
                 boolean removeUnsavedNodes)
Close the documents listed in nodes. If the uncache parameter is true nodes are uncached from the node factory. When the removeUnsavedNodes parameter is true, nodes that have not yet been persited are removed from their container.


close

public int close(Document node,
                 boolean uncache,
                 boolean removeUnsavedNode)
Close the specified node. If the uncache parameter is true nodes are uncached from the node factory. When the removeUnsavedNodes parameter is true, nodes that have not yet been persited are removed from their container.


close

public int close(Document node)
Close the specified document. If document contains other documents those documents will also be closed. The user will be asked to save any dirty document about to be closed. Users can choose to save or not save the document, but they have no option to cancel the close operation.


getAffectedDocuments

public Document[] getAffectedDocuments()
Returns an array of the documents closed.

Specified by:
getAffectedDocuments in interface Command
Overrides:
getAffectedDocuments in class AbstractCommand

clearAffectedDocuments

public void clearAffectedDocuments()
Reset the list of affected documents.


checkSave

public int checkSave(java.util.Iterator targets)
Check if the user wants to save dirty documents about to be closed. Users are given a chance to cancel.


checkSave

public int checkSave(java.util.Iterator targets,
                     boolean canCancel)
Check if the user wants to save dirty documents about to be closed. If the canCancel parameter is true the user is given the choice to cancel.


close

public int close(java.util.Iterator nodes,
                 Context context,
                 boolean uncache,
                 boolean removeUnsavedNodes)
Closes the nodes specified by the Iterator. If the uncache parameter is true nodes are uncached from the node factory. When the removeUnsavedNodes parameter is true, nodes that have not yet been persited are removed from their container.


close

protected int close(java.util.List nodes,
                    Context context,
                    boolean uncache,
                    boolean removeUnsavedNodes)

collectDirtyNodes

protected void collectDirtyNodes(java.util.Iterator targets,
                                 java.util.List dirtyNodes)

confirmClose

protected java.util.List confirmClose(TNode[] tnodes)

confirmClose

protected java.util.List confirmClose(Element element)

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.