fileRenamed
void fileRenamed(Project p,
Member newMember,
java.io.File oldFile,
java.io.File newFile)
Called when a file is renamed or deleted through the project system.
The value of oldFile
is always the file that was changed. If
the file is being renamed, then newFile
is the new (and
current) name of the file. If the file is being deleted, then
newFile
will be null
. The value of newMember
may be the project member instance of the newFile
, if one has
already been created. Whether or not it is null
depends on
the source of the rename action. When a file is renamed with the
rename action, it should be available. When the file is being moved
by a drag or paste in the project pane, it will be null
since
the tree is not updated until the entire operation is completed. If
you need to access the new member and the value is null
, you
can post an EventQueue.invokeLater
event that calls
Project.findMember( newFile )
to locate it.
- Parameters:
p
- the project in which the command was issued
newMember
- the new member associated with the file, if
available
oldFile
- the original file name
newFile
- the new file name, or null
if the file was
deleted