How can i disable code analysis pop-up?



I have wrote a logic to pick the files which has been modified using the following code. 

new FileDocumentManagerAdapter() {
public void beforeDocumentSaving(@NotNull Document document) {
PsiFile file = PsiDocumentManager.getInstance(focusedProject).getPsiFile(document);


But whenever this method executed I get an pop-up for code analysis in the IDE. Please see the attached screenshot herewith,

Is there any way disable this code inspection or is there any other API I can use to get the modified files without triggering the code analysis? 


What do you want to achieve with your plugin? PSI won't be up-to-date in _before_DocumentSaving


I want get the `PsiFile` of the the edited file in the open editor. I can get the `PsiFile` but the issue is this code analysis pop-up appears each and every time when I edit the file in the editor.

What I Want is: I want get the `PsiFile` object if a file is edited or saved the changes without triggering any pop-up to user. Specially the code analysis pop-up since it take some time to finish the analysis depends on the project. 


What exactly do you want to do with PsiFile of current editor?


I want to keep `PsiElement` object list of the changed files to get details(file name, absolute path, etc...) later for my logic. I can create the `PsiElement` list. But the `Code Analysis` pop-up will come every time I do a change in a file. Is there any way to disable that pop-up programmatically?

And also I am using `ScheduledFuture' interface to schedule an action whenever a file is changed(it is like maintaining a queue of changed files which have actions scheduled). Is this can cause that `Code Analysis` pop-up to appear? 


So the popup does not appear once you delete the line obtaining the PsiFile?

For just storing affected files, com.intellij.openapi.fileEditor.FileDocumentManager#getFile with VirtualFile is enough.


Yes, it is enough to get the file. But is there a way to get the file when it is saved. Is there a listener for the save event? 



Thanks Yann Cebron ! I will look into that.


Please sign in to leave a comment.