Steps to reproduce:
-in a PHP block invoke code completion for function that has multiple arguments, e.g. array_chunk
- it should be possible to navigate between arguments with the Tab or Enter key, however only Enter works correctly.
Tab increases indent of the whole block instead, which is quite odd.
It is only reproducible for the first code completion with a live template call after IDE start.
Might be a good candidate for the Patch1.
I'm working on this.
I agree to make this a patch candidate.
BTW this problem was rather obscure ;) Code template editing needs to override actions on Enter, Tab and Shift-Tab.
Making a keylistener is too agressive (completion's keys wouldn't work etc.) so we have an overriding ActionMap with the
three actions and parented to original AM. We still use Swing's Keymap interface instead of InputMap/ActionMap but it's
fine since Swing has a wrapper. But instead of IM:[keystroke,Action.NAME] AM:[Action.NAME,actionInstance] the Swing's
Keymap wrapper maps IM:[keystroke,actionInstance] AM:[actionInstance,actionInstance]. We are aware of this so we search
by keystrokes so we can work fine even with this. However in this particular case the Keymap instance gets recreated
(probably by some lazy loading in settigs or whatever) so the "actionInstance" gets recreated as well between the code
templates special mode installation and the time when the "Tab" gets clicked. So the Tab finds a new InsertTabAction
instance in "value" of IM but there is no match in our overriden AM because there is an "old" instance of
InsertTabAction so our overriden action does not get triggered. I have considered overriding InputMap too but I have
finally fixed it by having statically defined actions in BaseKit. We should soon migrate to IM/AM instead of Keymap so
that Swing's Keymap wrapper impl no longer bothers us.
BTW I was not able to reproduce in current trunk so I've tested in release61 directly but since this depends on
something in settings it might reappear in trunk too so the fix is useful in trunk too.
What should I make to make this go into a Patch1?
The issue must be fixed (this part is done) and verified by QE in the trunk. QE should mark the issues with
release61_fixes_candidate1 status-whiteboard value thereafter.
This issue has been nominated for NB IDE 6.1 patch2 although it hasn't been verified by QE yet. If it isn't verified by
12-Jun-08, it's nomination will be removed.
I cannot reproduce it in current trunk build - > verified
The fix has been ported into the release61_fixes branch: