1 19 20 package org.netbeans.modules.tasklist.docscan; 21 22 import org.openide.modules.ModuleInstall; 23 import org.openide.windows.TopComponent; 24 import org.openide.ErrorManager; 25 26 import javax.swing.*; 27 import java.lang.reflect.InvocationTargetException ; 28 29 30 35 public final class ModuleLifecycle extends ModuleInstall { 36 37 private static final long serialVersionUID = 1; 38 39 public void uninstalled() { 40 super.uninstalled(); 41 42 try { 43 SwingUtilities.invokeAndWait( new Runnable () { 44 public void run() { 45 TopComponent tc = SourceTasksView.getTaskListView(SourceTasksView.CATEGORY); 46 if (tc != null) { 47 tc.close(); 48 } 49 } 50 }); 51 } catch (InterruptedException e) { 52 ErrorManager.getDefault().notify(e); 53 } catch (InvocationTargetException e) { 54 ErrorManager.getDefault().notify(e); 55 } 56 } 57 } 58 | Popular Tags |