Community
Participate
Working Groups
I believe Eclipse usability could be enhanced by providing an interface similar to Emacs' M-x (or Alt-x) name-of-command gesture. What I mean: It was suggested that I might find the fix to another bug by moving from 3.0-M3 to 3.0-M3-I20030930, so I moved. While coding Java, I wanted to open a class which I knew by name, so I did C-S-t to get the Open Type dialog, as I had for many versions, including 3.0-M3. C-S-t did nothing. So I went to prefs>Workbench>Keys to try to track it down. (Note that this particular task would be easier to accomplish if one could print the keybindings https://bugs.eclipse.org/bugs/show_bug.cgi?id=37439 but that is not implemented.) I spent awhile scrolling through the lists but failed to find it--no doubt I did not choose the appropriate category. In Emacs, one can invoke a command directly (M-x name-of-command), as well as by keybinding. This is useful, because often the name of the command (which can be tab-completed in the minibuffer) is more mnemonic than the keybinding. Why not provide similar functionality in Eclipse? M-x could bring up a simple text dialog into which the user could enter a command. The names of the command could be the same as those currently exposed in the Workbench>Keys preference page. This would also be a useful interface for user-defined commands ...
agreed. there is ongoing work (M5?) for rearchitecting commands/actions/etc. most of this work is done now. the api gives a mechanism to programmatically execute a command. once this is complete, it would be easy to write an action for M-x to open a command dialog (with look ahead and autocomplete). i'll need to hang on to this for a while..
Can you provide a link for the API for running commands/actions/etc. by name?
There is no easy-to-use API to look-up commands by name. However, you can do the following: IWorkbenchCommandSupport support = workbench.getCommandSupport(); ICommandManager manager = support.getCommandManager(); Set commandIds = manager.getDefinedCommandIds(); Iterator commandIdItr = commandIds.iterator(); Map commandsByName = new HashMap(); while (commandIdItr.hasNext()) { String commandId = (String) commandIdItr.next(); ICommand command = manager.getCommand(commandId); try { commandsByName.put(command.getName(), command); } catch (NotDefinedException e) { // This shouldn't happen } } If the object building such a map has a long lifespan, then it should listen to the command manager for changes (manager.addCommandListener())
I would like to consider this for 3.1, though it is definitely lower on my list of priorities. (i.e., don't get your hopes up)
Some of this API is deprecated in 3.1M5a, see bug 89149 for my attempt to use the new API.
Deferring from 3.0
Moving Dougs bugs
There are currently no plans to work on this feature. PW
While there are no plans to work on this feature, check out the new CTRL+E dialog in 3.3. It is a filtered tree dialog that brings together a number of sources, including open editors, Commands, a number of menu items, etc. PW
Changes requested on bug 193523
This behavior is available in the current release of the Emacs+ plugin. See: http://www.eclipseplugincentral.com/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=1442 The relevant portion from the doc reads: Command Execution - * Execute Extended Command (Alt-X): Reads a command name from the minibuffer (with completion and wildcards) and executes it [Additional info: Execute Extended Command (Alt-X): Reads a command name from the minibuffer (with completion & wildcards) and executes it. The status area is used as the minibuffer. Entering TAB or SPACE in the minibuffer displays the set of possible completions in a pop-up. Command Selection - Command names follow the Emacs convention of words separated by hyphens (in the case of multiple commands with the same name - see Category below - a number is appended to make the name unique). The set of commands available in a particular context is determined by: * the current editor * the set of command categories in force * commands must have a handler and be enabled * commands must not have any required arguments (NB: Many useful editing commands obtain the selected text once the command is invoked, not as an argument.) Not all commands that the Eclipse command service makes available at a given point necessarily have an effect. Wildcards - Meta X provides simple wildcarding to assist in locating the desired command. The wildcard characters are * and ? and have their usual meaning: * * any character zero or more times * ? any character once Invoking completion on a string with wildcards will pop up the set of all matching commands and replace the minibuffer text with their initial substring (which may be the empty string). Mouse - The completions pop-up provides hover text for each command. Double clicking on a command invokes it. Category Selection - In Eclipse, commands are associated with categories. In the context of text editing some categories are more useful than others. M-X uses an initial set of Eclipse categories which are configurable on the preference page. In the case where multiple categories provide commands with the same name, the unique identifier, along with any provided documentation, can be determined using the hover text.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.