@Override
 public void projectOpened() {
   super.projectOpened();
   addRootsToWatch();
   AppListener applicationListener = new AppListener();
   ApplicationManager.getApplication().addApplicationListener(applicationListener, myProject);
 }
 @Override
 public void clearScopesCachesForModules() {
   super.clearScopesCachesForModules();
   Module[] modules = ModuleManager.getInstance(myProject).getModules();
   for (Module module : modules) {
     ((ModuleEx) module).clearScopesCache();
   }
 }
 public OrderEntry cloneEntry(
     RootModelImpl rootModel,
     ProjectRootManagerImpl projectRootManager,
     VirtualFilePointerManager filePointerManager) {
   return new ModuleJdkOrderEntryImpl(
       this,
       rootModel,
       ProjectRootManagerImpl.getInstanceImpl(getRootModel().getModule().getProject()),
       VirtualFilePointerManager.getInstance());
 }
 @Override
 protected void clearScopesCaches() {
   super.clearScopesCaches();
   LibraryScopeCache.getInstance(myProject).clear();
 }
 @Override
 public void projectClosed() {
   super.projectClosed();
   LocalFileSystem.getInstance().removeWatchedRoots(myRootsToWatch);
 }
 @Override
 public void initComponent() {
   super.initComponent();
   myConnection.subscribe(BatchUpdateListener.TOPIC, myHandler);
 }