Get contents of editor verbatim
Good morning,
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!
Cheers,
James
请先登录再写评论。
Hello James,
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.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks very much!