Is there a way to progrmatically turn of file watcher for certain roots in Intelllij (via a plugin)/ some setting already present ?. There are a few folders in my project (which contain various file types, hence filtering out by file types is not a option here), which has frequently changing files and causes the IDE to hang. I tried placing one of the folders outside the project sturcture and the IDE hangs have stopped. I was wondering if I could still keep the folders in the project, but turn of file watcher for it.
In particular I was looking for the following:
1. I realised that there is a method I could use in LocalFileSystemImpl - removeWatchedRoots. But this is expecting a list of WatchRequests, how do I get the WatchRequest easily given the folder path for passing to this method.
2. On project initialization, when is the best time to invoke removeWatchedRoots for this folder. I want the project to initialize normally and indexing complete on initialization and then eventually turn off the watcher on this folder.
Would appreciate any other tips or suggestions.