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.
Summary: | Patch for: Support selecting javadoc/lines when executing "Select next element"/"Expand selection" on a method or class | ||
---|---|---|---|
Product: | java | Reporter: | markiewb |
Component: | Editor | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | markiewb |
Priority: | P3 | Keywords: | PATCH_AVAILABLE |
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Visual example with actual and expected behaviour
Proposed patch Proposed patch v2 - adds line selection and expand selectio |
Created attachment 131212 [details]
Proposed patch
I like to propose the following patch to solve this issue.
The patch allows you to select also javadoc comments of members as requested.
@NetBeans-Dev: Please review, discuss and commit.
FYI: This issue looks like a part of the RFE http://netbeans.org/bugzilla/show_bug.cgi?id=56561 Created attachment 132482 [details]
Proposed patch v2 - adds line selection and expand selectio
I extended the patch
* to support full line selections
* so that the selection start at the end. This way the editor scrolls to the beginning not to the end while expanding
Patch integrated. Thanks for your contribution! http://hg.netbeans.org/jet-main/rev/59f4e0b49dfe (In reply to comment #4) > Patch integrated. Thanks for your contribution! > > http://hg.netbeans.org/jet-main/rev/59f4e0b49dfe @Dusan: Thank very much. I only want to note again that the patch also changed the selection-start-end-behavior. It is inverted now (caret at selection-start). Have you noticed that? What is your opinion? IMHO i like to have to this more useful behavior, so it is nice to have this "multiple-issue"-patch applied, but maybe this will create follow-up issues. All other editor implementations (f.e. PHP, HTML) still use the "caret at selection-end"-behavior. Feel free to revert the 2 lines change in SelectCodeElementAction.select() is necessary OR is there a need for a new umbrella-ticket for changing the other editors? The inverted selection-start-end-behavior makes more sense to me so I've applied whole patch including this particular change. (In reply to comment #6) > The inverted selection-start-end-behavior makes more sense to me so I've > applied whole patch including this particular change. Some opinion! Thanks (In reply to comment #6) > The inverted selection-start-end-behavior makes more sense to me so I've > applied whole patch including this particular change. Typo: Same opinion! |
Created attachment 122032 [details] Visual example with actual and expected behaviour Support selecting javadoc when executing "Select next element"/"Expand selection" on a method or class. Example: <code> /** * My method comment. */ public void doIt() { } </code> Place the cursor into the method name f.e. do|It. Invoke "select next element", then the method gets selected f.e. public ...{}. Invoke "select next element" again, then *Actual:* the class gets selected *Expected:* the comment of the method including the method itself gets selected See the screenshot to see what i mean. The same behaviour can be spotted when doing the procedure with classes and variable comment ---- Product Version: NetBeans IDE 7.2 RC1 (Build 201206272359) Java: 1.6.0_30; Java HotSpot(TM) 64-Bit Server VM 20.5-b03 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)