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 87288 - Better Algorithm for prefilling 'New Breakpoint'
Summary: Better Algorithm for prefilling 'New Breakpoint'
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-17 11:30 UTC by tomzi
Modified: 2006-10-17 12:01 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 tomzi 2006-10-17 11:30:02 UTC
(NB5.5 rc2)

The alorithm to find out where the cursor rests in the source view and thus
prefills the 'New Breakpoint' popup view seems to be too simple. This algorithm
should be more context sensitive

eg. every word i select is recognized to be a variable when i press
STRG-SHIFT-F8. Even if i select, parts of names, Classnames, Exceptions....
Thats very unfriendly

I propose that there should be no difference if i select/mark a variable/class
or just put my cursor there. I would totally get rid of the 'mark/select'
sensitivity.

Ideas for general functionality: If I 'Run/New Breakpoint' or 'bp-view/New
Breakpoint' or STRG-SHIFT-F8 and my cursor 'stays' on
a) an Exception -> open and prefill Exception bp
b) a variable -> open and prefill variable bp
c) a classname or is within class scope, but outside method scope -> class bp
d) on a method signature (not in method scope) -> method bp
e) otherwise (in method scope but not on a variable/Exception/Class/method
signature) -> line breakpoint

Currently I only get c) & partly d).

BTW in 55.rc2 there seems to be another bug:

.) place your cursor with method a(), press STRL-SHIFT-F8 and close popup again
.) place your cursor in method b(), press STRL-SHIFT-F8 
-> popup with prefilled method-bp from method a() (!!) popsup
.) close popup and open it with STRL-SHIFT-F8 again
-> no it correctly opens it, prefilled with method b().
Comment 1 tomzi 2006-10-17 11:58:21 UTC
Oh, got ya, thanks for the hint - I didn't try run/new breakpoint there ever
before... :)

I looked first in bp-view and there 'New Breakpoint' didn't prefill the values.

The current alorithm to find out where the cursor is placed seems to be too
simple. Since eg
everything i select is recognized to be a variable, this should be more context
sensitive! Opened a RFE for this bug #87288.

However, i still think it would make sense to put some context-sensitivity for
breakpoint creation into the context-menu. Like

.) 'New Class BP', if cursor is placed on classname or wihtin classcope, but not
in method scope
.) 'New Method BP', if cursor is placed only in the method signature
.) 'New Variable BP', if cursor is placed on a variablename.
.) 'New Exception BP', if cursor is placed on an Exception.
.) 'New Line BP', if cursor is in method scope(,...) and not placed on a
classname, variable, exception.

Only one option should show at the same time. Additionally the 'Toggle
Breakpoint' should then be renamed to 'Toggle Line Breakpoint' to distinct it
from the other breakpoints 

You could also have them all work like 'Toggle Breakpoint' eg. named 'Toggle
Method Breakpoint' and then be customizable like in 'Toggle Breakpoint'.
Comment 2 tomzi 2006-10-17 12:01:07 UTC
Please ignore the message above, it belongs to bug #87235