1 19 20 package org.netbeans.modules.javacore; 21 import java.util.HashSet ; 22 import java.util.Set ; 23 import org.netbeans.api.mdr.MDRManager; 24 import org.netbeans.modules.javacore.internalapi.JavaMetamodel; 25 import org.netbeans.modules.mdr.MDRManagerImpl; 26 import org.openide.modules.ModuleInstall; 27 import org.openide.windows.WindowManager; 28 29 34 public class JavaCoreModule extends ModuleInstall { 35 36 private static volatile boolean startupInProgress = true; 37 38 42 static boolean isStartupInProgress() { 43 return startupInProgress; 44 } 45 46 public void restored() { 47 final MDRManager manager = MDRManager.getDefault(); 48 if (manager instanceof MDRManagerImpl) { 49 ((MDRManagerImpl) manager).setProgressListener(new ShutDownProgressListener()); 50 } 51 WindowManager.getDefault().invokeWhenUIReady(new Runnable () { 53 public void run () { 54 if (startupInProgress) { 55 startupInProgress = false; 56 ((JMManager) JMManager.getManager()).startupFinished(); 57 } 58 } 59 }); 60 org.netbeans.modules.javacore.internalapi.JavaMetamodel.getManager(); 61 } 62 63 public boolean closing() { 64 ((JMManager) JavaMetamodel.getManager()).removeListener(); 65 return true; 66 } 67 68 } 69 | Popular Tags |