@Override public void projectOpened() { super.projectOpened(); addRootsToWatch(); AppListener applicationListener = new AppListener(); ApplicationManager.getApplication().addApplicationListener(applicationListener, myProject); }