Search in sources :

Example 1 with ShowEnrichmentMapDialogAction

use of org.baderlab.csplugins.enrichmentmap.actions.ShowEnrichmentMapDialogAction in project EnrichmentMapApp by BaderLab.

the class CyActivator method shutDown.

@Override
public void shutDown() {
    try {
        if (injector != null) {
            boolean headless = injector.getInstance(Key.get(Boolean.class, Headless.class));
            // If the App gets updated or restarted we need to save all the data first
            SessionListener sessionListener = injector.getInstance(SessionListener.class);
            sessionListener.appShutdown();
            if (!headless) {
                // Close the legend panel
                LegendPanelMediator legendPanelMediator = injector.getInstance(LegendPanelMediator.class);
                legendPanelMediator.hideDialog();
                // Dispose the creation dialog, or else lots of memory leaks.
                ShowEnrichmentMapDialogAction dialogAction = injector.getInstance(ShowEnrichmentMapDialogAction.class);
                dialogAction.dispose();
            }
        }
    } finally {
        super.shutDown();
    }
}
Also used : LegendPanelMediator(org.baderlab.csplugins.enrichmentmap.view.legend.LegendPanelMediator) Headless(org.baderlab.csplugins.enrichmentmap.ApplicationModule.Headless) SessionListener(org.baderlab.csplugins.enrichmentmap.model.io.SessionListener) ShowEnrichmentMapDialogAction(org.baderlab.csplugins.enrichmentmap.actions.ShowEnrichmentMapDialogAction)

Aggregations

Headless (org.baderlab.csplugins.enrichmentmap.ApplicationModule.Headless)1 ShowEnrichmentMapDialogAction (org.baderlab.csplugins.enrichmentmap.actions.ShowEnrichmentMapDialogAction)1 SessionListener (org.baderlab.csplugins.enrichmentmap.model.io.SessionListener)1 LegendPanelMediator (org.baderlab.csplugins.enrichmentmap.view.legend.LegendPanelMediator)1