This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Select next element could be improved with somewhat finer granularity. 1) When the cursor is in a string constant, pressing alt-shift-period (select-next-element) selects the entire string including the quotes. It would be nice if the first use of select-next-element would select the string but excluding the quote characters. The second use would then include the quote characters too. 2) Currently, if an entire line is selected, the next use of select-next-element select the enclosing block including the curly braces. It would be nice if it selected the block but _excluding_ the curly braces. Then the next level of inclusion.
*** Bug 113968 has been marked as a duplicate of this bug. ***
Created attachment 135995 [details] Proposed patch I like to propose a patch to improve the "select next element" action. The patch introduces the following changes * a) support content selection within the string literal too (simple change to copy the IDEA behaviour and even useful): for example "A|BC" -> ABC then "ABC" * b) support content selection within the {}-block too: for example {A|BC} -> ABC then {ABC} * c) don't create line selection for empty selections (makes no sense to select a blank line) @Dusan: Please review and commit if appropriate. I guess this will be post-7.4. IMHO a)+c) are no-brainers. But I don't know whether b) is really neccessary (it was the second requirement in #146602).
Makes sense. Patch applied. Thank you for your contribution. http://hg.netbeans.org/jet-main/rev/7bec088a5b52
Integrated into 'main-silver', will be available in build *201405170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7bec088a5b52 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #146602 - Patch for: Finer granularity would improve select_next_element - applied.