Bug 2345 [Editor Mgmt] Open with a different type of editor has no effect if file already open (1GEWMSQ)
Reproduce the steps in: 1GEWMOZ: ITPUI:WIN2000 - Scripted resource editor example opens on XML files by default - new basic project - new file test.xml - the editor used is the scripted resource editor example, which totally ignores the XML file content - select test.xml in Navigator - choose Open With... / Default Text Editor - nothing happens; it's reactivating the scripted resource editor example Searching for an existing open file should also consider editor types. It should open a new editor on the file, because the editor type is different. NOTES:
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
/* (non-Javadoc)
     * Returns whether this menu is dynamic.
     */
    public boolean isDynamic() {
        return true;
    }
    /**
     * Opens the given editor on the selected file.
     *
     * @param editor the editor descriptor, or null for the system editor
     */
    private void openEditor(IEditorDescriptor editor) {
        IFile file = getFileResource();
        if (file == null) {
            return;
        }
        try {
            String editorId = editor == null ? IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID
                    : editor.getId();
            page.openEditor(new FileEditorInput(file), editorId);
            
            IDE.setDefaultEditor(file, editorId);
        } catch (PartInitException e) {
            DialogUtil.openError(page.getWorkbenchWindow().getShell(),
                    IDEWorkbenchMessages.OpenWithMenu_dialogTitle,
                    e.getMessage(), e);
        }
    }
    /**
     * Creates the menu item for clearing the current selection.