I'm writing an IDEA plugin, which needs to get the content of a file when it's renamed.
I just use
to get the content. For plain text files, which is working well, but for Java files, it's a little bit different.
Because when I rename a Java file, it will try to also rename the class name inside the file (file content will change), but that code will just get the content before changed.
Is there any way to get the memory content(which has not been persistent to disk yet)?