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 78466

Summary: Encapsulate fields ignores selection in Editor
Product: editor Reporter: Lukas Hasik <lhasik>
Component: RefactoringAssignee: issues@java <issues>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: lines selected from begin to end -> all fields checked
lines NOT selected from begin to end -> one fields checked

Description Lukas Hasik 2006-06-20 07:46:44 UTC
nb060614, jdk1.6

-when I select more then one field in a class and want to encapsulate these
fields then the refactoring dialog select wrong fields
-it select either the first one or all fields
-it depends on the selection

-both cases are in attachment. Look at the selection in editor carefully - when
it is from start to end of line then it selects all fields.
Comment 1 Lukas Hasik 2006-06-20 07:48:55 UTC
Created attachment 31202 [details]
lines selected from begin to end -> all fields checked
Comment 2 Lukas Hasik 2006-06-20 07:49:32 UTC
Created attachment 31203 [details]
lines NOT selected from begin to end -> one fields checked
Comment 3 Jiri Prox 2006-06-20 08:17:17 UTC
The encaps. fields depends only on caret position, if it placed over one field
then this field is selected, otherwise all fields are selected. It doesn't
respect selection in editor. There is already filed an enhancement about it.

*** This issue has been marked as a duplicate of 64784 ***
Comment 4 Lukas Hasik 2006-06-20 08:30:44 UTC
ok, thank you for prompt evaluation.