|
Extension SDK 10.1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.addin.AbstractCommand
oracle.ide.cmd.SaveAsCommand
oracle.ide.cmd.RenameCommand
The RenameCommand class implements the Rename command.
oracle.ide.Command| Field Summary |
| Fields inherited from class oracle.ide.cmd.SaveAsCommand |
_context, _duplicate, _elementOwner, _newURL, _nodeClass, _noPlaceToAdd, CANCELED, OK_NAME_CHANGED, 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 | |
RenameCommand()
Constructor. |
|
| Method Summary | |
int |
doit()
Rename the selected element |
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 rename the elementURL to is the same file. |
protected int |
saveAsNewNode(Document doc)
The specified doc is being renamed. |
protected int |
saveDocument(Document doc)
|
protected java.net.URL |
validateNewURL(Recognizer recognizer,
java.net.URL newURL,
java.net.URL oldURL)
Validates whether the given recognizer can support rename from the oldURL to the newURL. |
| Methods inherited from class oracle.ide.cmd.SaveAsCommand |
convertToDupNode, convertToNewNode, doSaveAs, getElementOwner, saveAsDupNode, saveFileDlgOK |
| 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 |
| Constructor Detail |
public RenameCommand()
| Method Detail |
public int doit()
throws java.lang.Exception
doit in interface Commanddoit in class SaveAsCommandjava.lang.Exceptionprotected int saveDocument(Document doc)
saveDocument in class SaveAsCommandprotected int saveAsNewNode(Document doc)
doc is being renamed.
The doc class has not changed (that is an html document
has not been renamed as a jsp document).
saveAsNewNode in class SaveAsCommand
protected int handleDocumentOwnership(Document doc,
Node node,
java.net.URL oldURL)
throws java.lang.Exception
SaveAsCommand
handleDocumentOwnership in class SaveAsCommanddoc - node - oldURL -
java.lang.Exception
protected boolean isSameFile(java.net.URL newURL,
java.net.URL elementURL)
isSameFile in class SaveAsCommandnewURL - elementURL -
protected java.net.URL validateNewURL(Recognizer recognizer,
java.net.URL newURL,
java.net.URL oldURL)
oldURL to the newURL. If the oldURL
has an extension and the newURL does not, a URL with
the old extension will be returned. If the oldURL has a
.jws or .jpr extension and the newURL does not, the URL
returned will contain the .jws or .jpr extension.
validateNewURL in class SaveAsCommandrecognizer - newURL - oldURL -
|
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.