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.
Using NetBeans 6 Beta 1. When adding a Stopwatch Profiling Point, I suggest the following. In the Customize Properties screen, when you select a Measure type of "Timestamp and Duration", the Location (end) fields become enabled but are blank. I would say it would be a time saver to auto populate the Location(end) fields with the same values from the Location(start) section, especially the File field. You should also auto-set the Line number to END, instead of defaulting to BEGIN. You wouldn't really have 2 BEGIN points for a Stopwatch. You could even reasonably set the Location(end)'s LINE field to the same line number as the starting line number plus 1. An even more advanced enhancement could access the underlying JAVAC API and make some assumptions. If the starting point line occured at the beginning of an if, else, for-loop, while-loop, etc., then the line number of the Location (end) section could reasonably be set to the suggested line number of the closing curly brace. There could even be a quick shortcut on the Profile Point context menu when you right-click a line of code that begins a for-loop, if, else, while, and so on, that states "Add Stopwatch For Block" that automatically adds a stopwatch start and end point where the block begins and ends.
Thanks for your ideas! The first part related to populating End location will be available in NetBeans 6.0 Beta 2, the second part is not for 6.0. There's one thing which makes creating Stopwatches really easy - editor selection. Just select block of the code you want to measure using Stopwatch and create the Profiling Point - both start & stop locations will be populated according to the selection. Based on this information - do you still think that assumptions about code blocks are really neccessary?
That's great about the editor selection. However, it would save several screens and multiple clicks if there was a submenu under the Profiling menu when you right-click. The submenu can still have an option like 'add stopwatch to selection' that automatically adds the start and end points for the stopwatch without any additional prompts or windows. It might also be cool if you could click the glyphs in the margin for the starting and ending points and drag them up or down to automatically adjust the beginning or ending point of the stopwatch.
What you mean by 'add stopwatch to selection' can probably be accomplished by a keyboard shortcut for creating Profiling Points - make a selection and use Shift + F9 to select Stopwatch, then just release the keys, that's all. This should be mentioned in some docs, now there is a lot of useful undocumented features hidden from the user. As for dragging the glyphs - I'm afraid that NetBeans doesn't support this in any way. On the other side, have you noticed the "Current Line" button in Profiling Point customizer? When already created Profiling Point is being customized, the customizer dialog is not modal, you can move the cursor in the editor to the right place and pick it's position by clicking this button.
Shift + F9 works great. Thanks! On the second part, not sure dragging glyphs is really possible. I've seen the Current Line buttons on the customize window. Just thought IF dragging glyphs was supported that it would be cool feature. Thanks for answering the questions.
Milestone cleanup: future->next