@Override
    public void dispose() {
        if (extraPresentationManager != null) {
            extraPresentationManager.dispose();
        }

        // Release ds container
        releaseContainer();
        closeAllJobs();

        final IEditorInput editorInput = getEditorInput();
        IFile sqlFile = EditorUtils.getFileFromInput(editorInput);

        logViewer = null;
        outputViewer = null;

        queryProcessors.clear();
        curResultsContainer = null;
        curQueryProcessor = null;

        { // Clean up the add-ins in reverse order
            ListIterator<SQLEditorAddIn> addInsIterator = addIns.listIterator(addIns.size());
            while (addInsIterator.hasPrevious()) {
                SQLEditorAddIn addIn = addInsIterator.previous();
                try {
                    addIn.cleanup(this);
                } catch (Throwable ex) {
                    log.error("Error during SQL editor add-in cleanup", ex); //$NON-NLS-1$
                }
            }
        }

        super.dispose();

        if (sqlFile != null && !PlatformUI.getWorkbench().isClosing() && !DBWorkbench.isDistributed()) {
            deleteFileIfEmpty(sqlFile);
        }

        UIUtils.dispose(editorImage);
        baseEditorImage = null;
        editorImage = null;
    }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java