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 205371

Summary: New watch invoked by popup on selection in editor doesn't use whole selection
Product: editor Reporter: Petr Cyhelsky <cyhelsky>
Component: Actions/Menu/ToolbarAssignee: Miloslav Metelka <mmetelka>
Status: VERIFIED FIXED    
Severity: normal CC: cevarief, eascott, mentlicher, mmirilovic, ralphbenjamin, swpalmer
Priority: P1 Keywords: REGRESSION
Version: 7.1   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Petr Cyhelsky 2011-11-21 16:59:13 UTC
Product Version: NetBeans IDE 7.1 RC1 (Build 201111202200)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

Steps:
Have some debugging session stop on some breakpoint -> select some meaningful selection of code to use as a new watch -> right click on the selection to invoke popup menu -> select new watch -> new watch is created but only the piece of selection up to the mouseclick location is used in the new watch dialog - in 7.0.1 this worked fine -> regression
Comment 1 Jiri Kovalsky 2011-11-22 08:51:48 UTC
Yes, the editor behavior is different compared to 7.0.1, where selection was preserved. In 7.1 it only takes left context of caret i.e. sta|tus.setValue(taken) gives status, status.set|Value(taken) gives status.setValue which is obviously non-sense. status.setValue(ta|ken) gives taken which makes sense.
Comment 2 Martin Entlicher 2011-11-22 10:24:16 UTC
This must have been introduced recently. In build from 20111104 all works fine.

The problem is not in debugger. The problem is, that the selection disappears on the right-click.
Comment 3 Miloslav Metelka 2011-11-22 15:42:03 UTC
It was because of issue #205150.

http://hg.netbeans.org/jet-main/rev/bfe7d36a2b19

It needs propagation into NB 7.1. I'd like to ask QE for verification and jlahoda for fix review. Thanks in advance.
Comment 4 Petr Cyhelsky 2011-11-22 16:02:55 UTC
will verify when it gets to nightly build
Comment 5 Jiri Kovalsky 2011-11-22 20:57:53 UTC
*** Bug 205444 has been marked as a duplicate of this bug. ***
Comment 6 Jiri Skrivanek 2011-11-23 09:38:43 UTC
*** Bug 205448 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2011-11-23 15:59:20 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/bfe7d36a2b19
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #205371 - New watch invoked by popup on selection in editor doesn't use whole selection.
Comment 8 Petr Cyhelsky 2011-11-24 08:39:02 UTC
verified on:
Product Version: NetBeans IDE Dev (Build 201111230600)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Linux version 2.6.38-12-generic running on amd64; UTF-8; en_US (nb)
Comment 9 Miloslav Metelka 2011-11-24 16:28:10 UTC
In release71:
bfe7d36a2b19 transplanted to ebac1e4cde75
Comment 10 Quality Engineering 2011-11-25 06:18:11 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/ebac1e4cde75
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #205371 - New watch invoked by popup on selection in editor doesn't use whole selection.
(transplanted from bfe7d36a2b19e01a1cce0d52e62d5f241b2413b7)
Comment 11 Jiri Prox 2011-12-01 14:18:07 UTC
*** Bug 205623 has been marked as a duplicate of this bug. ***