/** Create the GeoCatalog view */ private void makeGeoCatalogPanel() { // The geo-catalog view content is read from the SourceContext geoCatalog = new Catalog(mainContext.getDataManager(), editors); // Catalog extensions geoCatalog.registeTrackers(pluginFramework.getHostBundleContext()); // Add the view as a new Docking Panel dockManager.addDockingPanel(geoCatalog); }
/** Free all resources allocated by this object */ public void dispose() { // Close all running jobs final AppContext appContext = AppContext.getAppContext(); ExecutorService executorService = (ExecutorService) appContext.get(SwingWorker.class); if (executorService != null) { executorService.shutdown(); } // Free UI resources if (editors != null) { editors.dispose(); } if (geoCatalog != null) { geoCatalog.dispose(); } if (mainFrame != null) { mainFrame.dispose(); } if (singleFrameTracker != null) { singleFrameTracker.close(); } if (editorFactoryTracker != null) { editorFactoryTracker.close(); } if (editorTracker != null) { editorTracker.close(); } if (toolBarTracker != null) { toolBarTracker.close(); } dockManager.dispose(); loggerCollection.dispose(); // Free libraries resources mainContext.dispose(); UIFactory.setMainFrame(null); }