"Cancel" disk move/rename

I am doing a SourceGear Vault plugin and I have problems when I rename folders. IDEA will rename the file on disk and when I execute the rename command to the Vault server it will rename the folder again (on disk) which causes name collisions sometimes.

Is there a way that I can tell IDEA that the folder/file has already been renamed (by Vault) in for example beforeFileMovement()?

// Tobias

2 comments
Comment actions Permalink

Hello Tobias,

I am doing a SourceGear Vault plugin and I have problems when I rename
folders. IDEA will rename the file on disk and when I execute the
rename command to the Vault server it will rename the folder again (on
disk) which causes name collisions sometimes.

Is there a way that I can tell IDEA that the folder/file has already
been renamed (by Vault) in for example beforeFileMovement()?


You shoud use the LocalFileOperationsHandler interface instead of VirtualFileListener
if you need to handle move/rename operations yourself in your plugin. You
can look at the SVN plugin as an implementation example.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks for the fast reply! It worked like a charm!

// Tobias

0

Please sign in to leave a comment.