Community
Participate
Working Groups
3.6 RC4. Since we added 'Open With' to the Compare editor's context menu I'm constantly missing it in our textual editors. We should add this. See also bug 69681 for a more general solution.
The menu item should appear before 'Show In'.
Created attachment 177052 [details] Patch for 315722
Thanks for the patch Rajesh! Except for a missing mnemonic it looks good. However, we have to do something about the cases where the 'Open With' menu has no entries: I don't like to have a menu entry which grays out when I select it. What would you recommend to fix this?
(In reply to comment #3) > Thanks for the patch Rajesh! Except for a missing mnemonic it looks good. > > However, we have to do something about the cases where the 'Open With' menu has > no entries: I don't like to have a menu entry which grays out when I select it. > What would you recommend to fix this? I did think about this earlier because even for files that are not in the workspace the menu disappears on hover. It would make sense for the menu to be grey on display if it does not have entries. Also, I don't see why for external files of defined type, it wouldn't have any entries. Will look into this.
>It would make sense for the menu to be >grey on display if it does not have entries. Nope. The context menu should be as context-sensitive as possible except there are performance issues which prevent us from doing the checks each time. Which means, if can do checks do mark it gray, we can directly omit the menu item. In our case the check is cheap: the logic used in the OpenWithAction is: org.eclipse.ui.actions.OpenWithMenu.getFileResource() != null ==> we can copy that code and do the same check.
Created attachment 177201 [details] patch (In reply to comment #5) > >It would make sense for the menu to be > >grey on display if it does not have entries. > Nope. The context menu should be as context-sensitive as possible except there > are performance issues which prevent us from doing the checks each time. Which > means, if can do checks do mark it gray, we can directly omit the menu item. > > In our case the check is cheap: the logic used in the OpenWithAction is: > org.eclipse.ui.actions.OpenWithMenu.getFileResource() != null > ==> we can copy that code and do the same check. Done.
Created attachment 177217 [details] Patch Changed mnemonic to 'i' and changed order in which 'open with' and 'show it' are added.
Thansk again. Fixed in HEAD. Available in builds >= I20100824-0800.
Verified in I20100914-0100.
*** Bug 281830 has been marked as a duplicate of this bug. ***