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
/**
     * Constructs a new instance of <code>OpenWithMenu</code>.  
     *
     * @param page the page where the editor is opened if an item within
     *		the menu is selected
     * @param file the selected file
     */
    public OpenWithMenu(IWorkbenchPage page, IAdaptable file) {
        super(ID);
        this.page = page;
        this.file = file;
    }
    /**
     * Returns an image to show for the corresponding editor descriptor.
     *
     * @param editorDesc the editor descriptor, or null for the system editor
     * @return the image or null
     */
    private Image getImage(IEditorDescriptor editorDesc) {
        ImageDescriptor imageDesc = getImageDescriptor(editorDesc);
        if (imageDesc == null) {
            return null;
        }
        Image image = (Image) imageCache.get(imageDesc);
        if (image == null) {
            image = imageDesc.createImage();
            imageCache.put(imageDesc, image);
        }
        return image;
    }