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.

Bug 113968 - Enhancements to "Select next / prev element" actions
Summary: Enhancements to "Select next / prev element" actions
Status: RESOLVED DUPLICATE of bug 146602
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-28 10:36 UTC by cjkent
Modified: 2013-06-18 20:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cjkent 2007-08-28 10:36:05 UTC
The "select next element" editor action is almost identical to "widen selection" in IntelliJ IDEA but IDEA's
implementation has a couple of differences that improve its usability. In IDEA if the action is invoked with no
selection then the current word is selected regardless of the context. In NetBeans the current structural element is
selected. This makes a difference in string literals where IDEA initially selects the current word, then the whole
string on the second invocation, followed by the whole string including quotes on the third. NetBeans immediately
selects the whole string including quotes which is a lot less useful.

Also in Ruby when assigning to the return value of an "if" statement this action immediately selects the whole block
when invoked on the variable name. It would be a lot more useful and natural to initially select just the variable name
and only expand to the block on the second invocation.

When selecting the previous element NetBeans never returns to having no selection - however many times you invoke it the
minimum selection is the whole structural element where the caret was when "select next" was first invoked. IDEA's
implementation will return the editor to its inital state - no selection and the caret returned to its original position.
Comment 1 markiewb 2013-03-31 16:54:36 UTC
(In reply to comment #0)
> When selecting the previous element NetBeans never returns to having no
> selection - however many times you invoke it the
> minimum selection is the whole structural element where the caret was when
> "select next" was first invoked. IDEA's
> implementation will return the editor to its inital state - no selection and
> the caret returned to its original position.

This is already fixed in NB 7.3 by https://netbeans.org/bugzilla/show_bug.cgi?id=104891
Comment 2 markiewb 2013-06-18 20:37:46 UTC
> This makes a difference in string literals where IDEA initially
selects the current word, then the whole
string on the second invocation, followed by the whole string including quotes
on the third. --> Duplicate of 146602 a)

> Also in Ruby when assigning...
Please file a separate issue for ruby. The ruby support is community-driven. Where is their bugtracker?
http://plugins.netbeans.org/plugin/38549/ruby-and-rails
https://blogs.oracle.com/geertjan/entry/ruby_on_rails_in_netbeans

*** This bug has been marked as a duplicate of bug 146602 ***