Bug 82541 [Dialogs] SaveAsDialog should better handle closed projects
I20050111-0800 The SaveAsDialog show closed projects and even enables the OK button. This makes no sense since we cannot save the file into a closed projects. An error dialog is the result. I suggest to disable the OK button if a closed project is selected.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/SaveAsDialog.java
String question = NLS.bind(IDEWorkbenchMessages.SaveAsDialog_overwriteQuestion, path.toOSString());
            MessageDialog d = new MessageDialog(getShell(),
                    IDEWorkbenchMessages.Question,
                    null, question, MessageDialog.QUESTION, buttons, 0);
            int overwrite = d.open();
            switch (overwrite) {
            case 0: 
                break;
            case 1: 
                return;
            case 2: 
            default:
                cancelPressed();
                return;
            }
        }
        
        result = path;
        close();
    }
    /**
     * Sets the completion state of this dialog and adjusts the enable state of
     * the Ok button accordingly.
     *
     * @param value <code>true</code> if this dialog is compelete, and
     *  <code>false</code> otherwise
     */
    protected void setDialogComplete(boolean value) {
        okButton.setEnabled(value);
    }