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 56561 - Smart selection should be more granular
Summary: Smart selection should be more granular
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-16 17:34 UTC by Jan Pokorsky
Modified: 2013-03-17 01:21 UTC (History)
1 user (show)

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 Jan Pokorsky 2005-03-16 17:34:40 UTC
Now, if the caret is inside a method, you can select identifier -> expresion ->
statement -> method body including braces -> the whole method BUT WITHOUT
javadoc -> the whole class BUT WITHOUT javadoc -> the whole file.

IMHO it should look like:

identifier -> expresion -> statement -> the whole row -> all rows of method body
-> method body including braces -> the whole method WITHOUT javadoc -> the whole
method WITH javadoc -> the whole class WITHOUT javadoc -> the whole class WITH
javadoc -> the whole file.

Moreover if you select whole method the selection should start at beginning of
the first line and end at tail of the last line. Now it starts at the modifier
or possibly the return type of the method.

The same suggestions as for methods except javadoc are valid for if, for, while,
... statements.
Comment 1 Martin Matula 2005-03-16 21:12:24 UTC
Changing to enhancement.
Comment 2 Jan Pokorsky 2005-03-17 10:36:48 UTC
Agreed with Mato that it IS a defect in functionality. Changing back to defect.
Comment 3 Martin Roskanin 2005-03-17 10:49:43 UTC
Hmm, now I have found that it is as designed behaviour, so this is probably not
defect. 
http://ui.netbeans.org/docs/hi/promoD/smartSelection.html
Changing back to enhancement, raising priority...
Comment 4 Jan Pokorsky 2005-03-23 16:15:16 UTC
The documentation seems to be out of date (see shortcut Ctrl+Alt-A) and
especialy the Detailed Specification section would deserve improvements. But if
you insist it is not a defect I am fine with that. Hopefuly this will be honour
in the next release.

I have found some other issues/inconsistences:

* inside method in case of following line
    int a = 1;
  you select identifier -> expresion -> statement. But in case of following line
    return null;
  you select identifier -> statement.

* field declaration
    private static int a;
  you select the whole statement instead of identifier -> statement or in case
the caret is on some modifier then you should select modifier -> all modifiers
-> statement
Comment 5 markiewb 2013-03-17 01:21:36 UTC
IMHO most of your requested use-cases can be solved by http://netbeans.org/bugzilla/show_bug.cgi?id=215552

Please vote there.