"Non-project Files Protection" FileEditorManager.getInstance(psiFile.getProject()).openFile(vf, true, true);
已回答
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
请先登录再写评论。
Hi,
Please be more specific. What is the use case? What tips do you want to hide? Screenshots would be nice.
Hello
Screenshots info,always show this dialog,i want disable display how to code。
my code
Hi,
It is not possible. See
NonProjectFileWritingAccessProvider.isWriteAccessAllowed():https://github.com/JetBrains/intellij-community/blob/master/platform/ide-core-impl/src/com/intellij/openapi/fileEditor/impl/NonProjectFileWritingAccessProvider.java#L95-L125
Hi,
“new scratch file ” how does it work,
Whether it indexes the newly created file into the project?
Hi,
You can check how scratch files are created here: https://github.com/JetBrains/intellij-community/blob/master/platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java#L226