|
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.Message oracle.ide.addin.UpdateMessage oracle.ide.cmd.RenameMessage
There are 5 cases to be considered when the OBJECT_RENAMED message
is sent. The RenameMessage
provides the following
information for each case:
Case 1) Simple object rename: getOldURL() retrieves the previous document URL. getRenamedDocument() retrieves the document renamed.
Case 2) Renaming document changes the document's type: getOldURL() retrieves the previous document URL. getRenamedDocument() retrieves the document renamed. getRemovedDocument() retrieves the original node being replaced. getNewDocument() gets the replacing document. This could return null if that document is already in the same container as the original document being replaced.
Case 3) Document being renamed the same as an existing document of the same type: getOldURL() retrieves the previous document URL. getRenamedDocument() retrieves the document renamed. getRemovedDocument() retrieves the original node being renamed. getNewDocument() may contain the existing node instance if that instance is not part of the project containing the original node.
Case 4) Node being renamed the same as an existing node of different type:
Not yet supported.
There are 5 cases to be considered when the CHILD_RENAMED message
is sent. The RenameMessage
provides the following
information for each case:
Case 0) Pre-rename notification. Case 1) Simple object rename: getOldURL() contains the old URL and the child being renamed. getRenamedDocument() retrieves the document renamed.
Case 2) Renaming node changes the node's type getOldURL() retrieves the previous document URL. getRenamedDocument() retrieves the document renamed. getRemovedDocument() retrieves the original node being replaced. getNewDocument() gets the replacing document. This could return null if that document is already in the same container as the original document being replaced.
Case 3) Node being renamed the same as an existing node of the same type: getOldURL() retrieves the previous document URL. getRenamedDocument() retrieves the document renamed. getRemovedDocument() retrieves the original node being renamed. getNewDocument() get the replacing document.
Case 4) Node being renamed the same as an existing node of different type: Not yet supported.
UpdateMessage
,
Subject
Field Summary |
Fields inherited from class oracle.ide.addin.UpdateMessage |
ATTRIBUTE_CHANGED, CHILD_ADDED, CHILD_REMOVED, CHILD_RENAMED, OBJECT_CLOSED, OBJECT_CLOSING, OBJECT_OPENED, OBJECT_RELOADED, OBJECT_RENAMED, PROPERTY_SET, STRUCTURE_CHANGED |
Fields inherited from class oracle.ide.addin.Message |
add, COMMAND_ID_PROP, container, context, messageID, messageProperties, modify, origin, remove |
Constructor Summary | |
RenameMessage(int messageID,
java.lang.Object origin)
Constructs an update message of the specified message id. |
Method Summary | |
static void |
fireChildRenamed(Subject subject,
Document doc,
java.net.URL oldURL,
Document node,
Context context)
Case 3) Child renamed notification. |
static void |
fireChildRenamed(Subject subject,
java.net.URL oldURL,
Document doc,
Context context)
Case 1) Child rename notification. |
static void |
fireChildRenamed(Subject subject,
java.net.URL oldURL,
Document doc,
Document duplicate,
Context context)
Case 2) Child renamed notification. |
static void |
fireObjectRenamed(Document doc,
java.net.URL oldURL,
Document node,
Context context)
Case 3) Object renamed notification. |
static void |
fireObjectRenamed(Subject subject,
java.net.URL oldURL,
Context context)
Case 1) Object rename notification. |
static void |
fireObjectRenamed(Subject subject,
java.net.URL oldURL,
Document doc,
Document duplicate,
Context context)
Case 2) Object renamed notification. |
static void |
firePreChildRenamed(Subject subject,
Context context)
Call this method before the subject is actually renamed. |
Document |
getNewDocument()
Get the new document created when an existing one was renamed. |
java.net.URL |
getOldURL()
Get the document's old url. |
Document |
getRemovedDocument()
Get the document being removed because the rename caused the creation of a new node. |
Document |
getRenamedDocument()
Get the renamed document. |
boolean |
isPreRenameMessage()
Check if this notification message is being sent before the actual object rename happened. |
Methods inherited from class oracle.ide.addin.Message |
getAddObjects, getContext, getExtraData, getMessageID, getModifyObjects, getOrigin, getProperty, getRemoveObjects, setContext, setExtraData, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RenameMessage(int messageID, java.lang.Object origin)
origin
- the Object which originated this message. Usually an
Observer.messageID
- the message identifier.Method Detail |
public boolean isPreRenameMessage()
public java.net.URL getOldURL()
public Document getRenamedDocument()
null
when
isPreDocumentRename()
returns true
.
public Document getRemovedDocument()
public Document getNewDocument()
public static void fireObjectRenamed(Subject subject, java.net.URL oldURL, Context context)
subject
is the
document being renamed, The oldURL
is the previous
document URL. Observers should use the methods:
getOldURL() to get at the old URL.
public static void fireChildRenamed(Subject subject, java.net.URL oldURL, Document doc, Context context)
subject
is the
owner of the document. The oldURL
is the previous
document URL. Observers should use the methods:
getOldURL() to get at the old URL.
getRenamedDocument to get at the document renamed.
public static void fireObjectRenamed(Subject subject, java.net.URL oldURL, Document doc, Document duplicate, Context context)
subject is
the document being renamed. The doc
is the original
document that after being renamed, should be removed from its
owner. The duplicate
is the new document created
with the new URL
. The duplicate
parameter
may be null if the original doc
object was renamed
to an existing node.
Observers should use the methods:
getOldURL() to get at the old URL
getRemovedDocument() to get at the original document being replaced.
getNewDocument() to get the replacing document. This could return
null if that document is already in the same
container as the original document.
public static void fireChildRenamed(Subject subject, java.net.URL oldURL, Document doc, Document duplicate, Context context)
subject is
the owner of the document being renamed. The doc
is the original document that after being renamed, should be removed
from its owner. The duplicate
is the new document created
with the new URL
. The duplicate
parameter
may be null if the original doc
object was renamed
to an existing node.
Observers should use the methods:
getOldURL() to get at the old URL
getRemovedDocument() to get at the original document being replaced.
getNewDocument() to get the replacing document. This could return
null if that document is already in the same
container as the original document.
public static void fireObjectRenamed(Document doc, java.net.URL oldURL, Document node, Context context)
subject is
the document being renamed. The doc
is the original
document that after being renamed, should be removed from its
owner. The node
is the new document created
with the new URL
.
Observers should use the methods:
getOldURL() to get at the old URL
getRemovedDocument() to get at the original document being replaced.
getNewDocument() to get the replacing document.
public static void fireChildRenamed(Subject subject, Document doc, java.net.URL oldURL, Document node, Context context)
subject is
the owner of the document being renamed. The doc
is the original document that after being renamed, should be removed
from its owner. The node
is the new document created
with the new URL
.
Observers should use the methods:
getOldURL() to get at the old URL
getRemovedDocument() to get at the original document being replaced.
getNewDocument() to get the replacing document.
public static void firePreChildRenamed(Subject subject, Context context)
subject
is actually renamed.
|
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.