Re: Features brainstorming
Petr Kuzel <[email protected]> Mon, 02 Feb 2004 22:32:58 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Message-ID | <[email protected]> |
Jesse Glick wrote:
> FWIW I never use the "fix" feature; just want to see the problems. If I
> see an unused variable, and F12 to the line where it is declared, I can
> surely press Home - Home - Shift-Down - Delete faster than it would take
> to open some suggestions window, read it, accept what it is offering,
> and check that it did what it promised (even if it were KB-accessible,
> which currently I think it is not). Even faster for adding an import:
> F12 then Alt-Shift-I is all that is needed.
>
> The only suggestions I can realistically imagine using a "fixer" for (in
> preference to just typing a correction in the editor) would be certain
> parser errors - e.g. missing cast, though usually I am still on or near
> the line where the error is if this comes up, and typing '(' - 'Interf'
> (or some such prefix) - Ctrl-K is not hard; and uncaught exception
> (which BTW the current parser does not even notice!), though here I
> would much prefer that the editor just have a proper shortcut to insert
> the correct try-catch block. Maybe also the PMD warning about
> if-statements without braces would be more easily fixed thru a dialog.
Another (IDEA like) fast import (it does not require shortcut
knowledge) is showing small popup proposing solution that disappears on:
- accepting it (hitting displayed shortcut Alt-Enter),
- ESCaping it,
- leaving wrong line or
- typing on given line.
The same is used for create method, surround with try/catch,
add catch block or add exception to signature, ... except
that auto popup step shows small icon instead of full suggestion.
It expands to full suggestion list on (hidden/tooltip over icon)
shortcut Alt-Enter.
In other words fix action can be made more usefull even for
power users if tightly integrated with editor.
It's questionable how can suggestion framework fit in. I can
imagine that more straitforward implementation goes directly
into java editor implementation. On the other hand it's
'current line suggestion view' (that must be very, very fast).
Cc.