Get contents of editor verbatim 关注
How can one access the current contents of a PSI file verbatim?
Currently I am using the following code:
This, however, always appears to output the file with Unix line separators. In projects containing files with Windows line separators the 'contents' variable is hence incorrect, containing data with Unix rather than Windows separators.
Am I going about this in the right way, or missing something important?
Many thanks for your help!
IntelliJ IDEA always stores the current content of a PSI file with Unix line
separators. The line separators are converted to the correct format on save.
"Develop with Pleasure!"
Thanks very much!