@Nullable
    private String getScriptDirectory() {
        final File inputFile = EditorUtils.getLocalFileFromInput(getEditorInput());
        if (inputFile != null) {
            return inputFile.getParent();
        }
        final DBPWorkspaceDesktop workspace = DBPPlatformDesktop.getInstance().getWorkspace();
        final IFolder root = workspace.getResourceDefaultRoot(workspace.getActiveProject(), ScriptsHandlerImpl.class, false);
        if (root != null) {
            URI locationURI = root.getLocationURI();
            if (IOUtils.isLocalURI(locationURI)) {
                return new File(locationURI).toString();
            }
        }
        return null;
    }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java