I am developing a plugin that analyzes all source files (Java classes) of an Android Project. I want to start analyzing only after the project is opened and loaded and completely, all types and methods in source files are resolved. If I start to analyze right after opening the project, the project may not be fully resolved. Does any know API to check when a project is opened and loaded completely ?

Thanks.

Votes

0

Share

IntelliJ IDEA resolves types and methods on demand, so there is no point in time when "all types and methods in source files are resolved". However, there is indeed a period during the initialization when some of the indices can't be used. To run your code after the initial initialization is complete, use StartupManager.runWhenProjectIsInitialized(), or use the <postStartupActivity> extension point.