| Summary: | Bind Specific QuickFix to a Keystroke [quick fix] | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | David Corbin <dcorbin> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | markus.kell.r, martinae |
| Version: | 3.0 | ||
| Target Milestone: | 3.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
David Corbin
This would require to provide actions for all quick fixes. This would be a very useful addition. For instance, if I want to use the cast quickfix, I have to type the following: Subclass x = aObject; Now I need to wait for eclipse to detect the error, which might take time, and then open the quickfix menu, and select the proper quickfix, which might appear at any position in the list, according to whatever other quickfix is available. it would be much nicer to type: Subclass x = aObject; And then some keystroke to directly add the cast. Even nicer would be: Subclass x = | Type the keystroke now and get the (Cast) generated. This would propably require modifying the quickfix itself, so maybe this is a bit overkill. the suggestion of comment #2 is difficult to implement. That would be completly different code and currently be impossible as there's no full AST. It would also be more of a code assist than a quick assist. Are there other (better) examples where a key short cut is desired? I could think of a shortcut for 'Rename in File' (Local rename) I usually know what I'm going to do when I press CTRL-1. For any that I use
frequently ("assign to local variable" being one). I would like to be able to
just avoid the delay (and sometimes selection process) of waiting for the
popup to occurr.
If the specific keystroke is not applicable, it should be ignored, or perhaps
a "bell" sound could be made. The key point is that Eclipse should provide a
way to do this for ANY quickfix (proably with none defined by default).
It's already a problem to list all quick fixes as they depend on the context. Example of a 'dynamic' quick fix is 'Rename to XY' But I was thinking that we give shortcuts to some of them. You would still press CTRL + 1 and see the list, but proposals would get smomething like a mnemonic (speed-key) that you can use to select without using the cursor keys -> CTRL + 1 + r would invoke local rename What do you think? Seems this bug could be closed now, there are key bindings for quick assists. Thanks, that's right. Fixed in 3.1 Verified in I20051102-0010. |