Bug 29633 [EditorMgmt] "Open" menu should have Open With-->Other
While registering file associations in the preferences page is mostly a reasonable proposition, it seems that having an "Open With --> Other" option would be helpful. This came up originally for me registering .sqlj files with the Java Editor. For unrelated reasons Eclipse is getting locked up by external tools, and I keep having to re-specify my preference since I had to kill Eclipse and the workspace was not saved. The implementation may also be helpful for contributers with editors on non-file resources, as they could reuse whatever dialog pops up when Open With --> Other is presented. -Andrew
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
if (file == null) {
            return;
        }
        IEditorDescriptor defaultEditor = registry
                .findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID); 
        IEditorDescriptor preferredEditor = IDE.getDefaultEditor(file); 
        Object[] editors = registry.getEditors(file.getName(), IDE.getContentType(file));
        Collections.sort(Arrays.asList(editors), comparer);
        boolean defaultFound = false;
        
        
        ArrayList alreadyMapped = new ArrayList();
        for (int i = 0; i < editors.length; i++) {
            IEditorDescriptor editor = (IEditorDescriptor) editors[i];
            if (!alreadyMapped.contains(editor)) {
                createMenuItem(menu, editor, preferredEditor);
                if (defaultEditor != null
                        && editor.getId().equals(defaultEditor.getId())) {
					defaultFound = true;
				}
                alreadyMapped.add(editor);
            }
        }
        
        if (editors.length > 0) {
			new MenuItem(menu, SWT.SEPARATOR);
		}
        
        if (!defaultFound && defaultEditor != null) {
            createMenuItem(menu, defaultEditor, preferredEditor);