/** * Disposes of the tabbed workspace. This removes any tabs in the workspace and disposes of them. */ @Override public void dispose() { save(); // Remove the tabs and call their dispose method for (WorkspaceTab tab : workspaceTabs) { try { tab.dispose(); } catch (Exception e) { LOGGER.warn("BAD TAB: " + tab.getClass().getSimpleName() + " - Exception during dispose: " + e.getMessage()); } } workspaceTabs.clear(); tabbedPane.removeAll(); super.dispose(); } }
/** * Disposes of the tabbed workspace. This removes any tabs in the workspace and disposes of them. */ @Override public void dispose() { save(); // Remove the tabs and call their dispose method for (WorkspaceTab tab : workspaceTabs) { try { tab.dispose(); } catch (Exception e) { LOGGER.warn("BAD TAB: " + tab.getClass().getSimpleName() + " - Exception during dispose: " + e.getMessage()); } } workspaceTabs.clear(); tabbedPane.removeAll(); super.dispose(); } }
/** * Disposes of the tabbed workspace. This removes any tabs in the workspace and disposes of them. */ @Override public void dispose() { save(); // Remove the tabs and call their dispose method for (WorkspaceTab tab : workspaceTabs) { try { tab.dispose(); logger.info("Disposed of '{}' tab", tab.getLabel()); } catch (Exception e) { logger.warn("The {} tab threw an exception whilst being disposed.", tab.getLabel(), e); } } workspaceTabs.clear(); tabbedPane.removeAll(); super.dispose(); logger.info("Disposed of workspace"); } }
/** * Closes an <code>EditorKit</code>. This disposes of the clsdescriptioneditor kit's <code>Workspace</code>, and * closes the clsdescriptioneditor kit's model manager. */ public void disposeOfEditorKit(EditorKit editorKit) { ProtegeManager.getInstance().getEditorKitManager().removeEditorKit(editorKit); try { // Dispose of the workspace editorKit.getWorkspace().dispose(); // Dispose of the model editorKit.getModelManager().dispose(); editorKit.dispose(); } catch (Exception e) { ProtegeApplication.getErrorLog().logError(e); } System.gc(); application.handleClose(); }