I would like to know what the best way is to take an action in the code of the file when renaming a file and vice versa. I want to do something similar like in Java, where you can rename the class name when you rename the file name and vice versa. Can somebody point me to the documentation about that? I already found (and implemented) how to perform renames of elements in the files themselves, to perform renames of functions and so on, but renaming the file seems to elude me. The only documentation I found about that mentioned something like using the VirtualFileManager's event handler, but that dated from 2003. If that is really the case, where is the best place to register such an event handler in a plugin?