|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.addin.AbstractCommand oracle.ide.cmd.SaveAsCommand
The SaveAsCommand
class implements the SaveAs command.
Field Summary | |
protected Context |
_context
|
protected Node |
_duplicate
|
protected Folder |
_elementOwner
|
protected java.net.URL |
_newURL
|
protected java.lang.Class |
_nodeClass
|
protected boolean |
_noPlaceToAdd
|
protected static int |
CANCELED
|
protected static int |
OK_NAME_CHANGED
|
protected static int |
OK_NAME_UNCHANGED
|
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 | |
|
SaveAsCommand()
|
protected |
SaveAsCommand(int cmdId)
|
Method Summary | |
protected int |
convertToDupNode(Document doc)
|
protected int |
convertToNewNode(Document doc)
Rename with node conversion. |
int |
doit()
Executes the actions associated with a specific command. |
protected int |
doSaveAs(java.lang.String dialogTitle)
|
protected Folder |
getElementOwner(Element element,
Context context,
boolean parentOK)
|
protected int |
handleDocumentOwnership(Document doc,
Node node,
java.net.URL oldURL)
This method handles adding/removing/replacing the document from it's owner Subclasses of the command may need to handle ownership differently (eg, RenameCommand should do something different from SaveAsCommand). |
protected boolean |
isSameFile(java.net.URL newURL,
java.net.URL elementURL)
Used to determine if the new URL we're going to Save As is the same as the elementURL. |
protected int |
saveAsDupNode(Document doc)
There is already a node in the cache with the new url. |
protected int |
saveAsNewNode(Document doc)
The specified doc is being saved as a different
name in addition to the name it already has. |
protected int |
saveDocument(Document doc)
|
protected boolean |
saveFileDlgOK(Context context,
Document doc,
java.lang.String dialogTitle)
|
protected java.net.URL |
validateNewURL(Recognizer recognizer,
java.net.URL newURL,
java.net.URL oldURL)
|
Methods inherited from class oracle.ide.addin.AbstractCommand |
getAffectedDocuments, 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 |
Field Detail |
protected static final int OK_NAME_CHANGED
protected static final int OK_NAME_UNCHANGED
protected static final int CANCELED
protected Context _context
protected java.lang.Class _nodeClass
protected Folder _elementOwner
protected java.net.URL _newURL
protected Node _duplicate
protected boolean _noPlaceToAdd
Constructor Detail |
public SaveAsCommand()
protected SaveAsCommand(int cmdId)
Method Detail |
public int doit() throws java.lang.Exception
Command
java.lang.Exception
protected Folder getElementOwner(Element element, Context context, boolean parentOK)
protected java.net.URL validateNewURL(Recognizer recognizer, java.net.URL newURL, java.net.URL oldURL)
protected boolean saveFileDlgOK(Context context, Document doc, java.lang.String dialogTitle)
protected int doSaveAs(java.lang.String dialogTitle)
protected int convertToNewNode(Document doc)
protected int handleDocumentOwnership(Document doc, Node node, java.net.URL oldURL) throws java.lang.Exception
doc
- node
- oldURL
-
java.lang.Exception
protected int convertToDupNode(Document doc)
protected int saveAsNewNode(Document doc)
doc
is being saved as a different
name in addition to the name it already has.
The doc
class has not changed (that is an html document
has not been renamed as a jsp document).
protected int saveDocument(Document doc)
protected int saveAsDupNode(Document doc)
protected boolean isSameFile(java.net.URL newURL, java.net.URL elementURL)
newURL
- elementURL
-
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.