"Non-project Files Protection" FileEditorManager.getInstance(psiFile.getProject()).openFile(vf, true, true);

Answered

hello:

I used  this code

“FileEditorManager.getInstance(psiFile.getProject()).openFile(vf, true, true); ”

when developing idea plugins to open files and show

"Non-project Files Protection" when editing,

how to not show this tips ,  like edit "scratches files" .

thank you

0
5 comments

Hi,

Please be more specific. What is the use case? What tips do you want to hide? Screenshots would be nice.

0

Hello

Screenshots info,always show this dialog,i want disable display how to code。

my code

VirtualFile vf = LocalFileSystem.getInstance().findFileByIoFile(new File(path));
FileEditorManager.getInstance(psiFile.getProject()).openFile(vf, true, true);

 

0

Hi,

“new scratch file ” how does it work,

Whether it indexes the newly created file into the project?

0

Please sign in to leave a comment.