Bug 178235 [EditorMgmt] DBCS 3.3 - Cannot open file with external program
Product Build#: I20070306 Platform/Version : Windows Vista, 2003, XP Language: T.Chinese Releated Test Case #: ECLIPSE3.3 - M5 OPEN FILES WITH OTHER EDITORS JVM: IBM JRE 5.0 SR1 ===== DEFECT DESCRIPTION ===== From Package Explorer view, we failed to open a java file with external program such as notepad or iexplore. ===== STEPS TO RECREATE ===== 1. From Package Explorer view, select a file, and Open With > Other... from the context menu 2. select External Programs radio button 3. Click Browse.. buttom and select Text File(notepad.exe) program, then click OK 4. The error will display "Unable to open editor, unknown editor ID: <XXX>" ===== EXPECTED RESULT ===== notepad.exe can be specified and the file can be opened
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
switch (event.type) {
                case SWT.Selection:
                   	EditorSelectionDialog dialog = new EditorSelectionDialog(
							menu.getShell());
					dialog
							.setMessage(NLS
									.bind(
											IDEWorkbenchMessages.OpenWithMenu_OtherDialogDescription,
											fileResource.getName()));
					if (dialog.open() == Window.OK) {
						IEditorDescriptor editor = dialog.getSelectedEditor();
						if (editor != null) {
							openEditor(editor);
						}
					}
                    break;
                }
            }
        };
        menuItem.addListener(SWT.Selection, listener);
    }
    
    /* (non-Javadoc)
     * Fills the menu with perspective items.
     */
    public void fill(Menu menu, int index) {
        IFile file = getFileResource();
        if (file == null) {
            return;
        }