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.
090105. If I open, say, JarClassLoader.java from o.n.bootstrap, and place the caret inside the body of initializeCache(), and choose Profiling > Add as Profiling Root Method from the context menu, the IDE says "No method found at current position". It seems that it only works if the caret is actually on the identifier of the method name or right after the opening parenthesis. This is in contrast to other IDE functions which are much more forgiving. I guess SourceUtils.resolveMethodAtPosition is at fault: TreeUtilities.getPathFor is right (*) but should be asked to traverse upwards, as in contrib/java.gotoimpl/src/org/netbeans/modules/java/gotoimpl/GoToImplementation.java, which it seems should be made into some kind of convenience API. (*) This class has little Javadoc so it is hard to know for sure.
This is not a defect, the feature works (already several years) as designed -> changing to ENHANCEMENT. I agree that resolving the root method should be more user-friendly: if there's no method at the caret, the profiler should try to resolve an enclosing method. However, there's a potential usability issue with this approach - whereas for example Find Usages action immediately displays a dialog with highlighted resolved element, the profiler uses a different workflow and doesn't display this information. It's not a good idea to continue with some guessed element without letting know the user. Implementing this enhancement requires some UI & workflow changes, not for 6.7.
Integrated into 'main-golden', will be available in build *200903250219* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/97e9ab05b19b User: Jaroslav Bachorik <yardus@netbeans.org> Log: #156387 - improved handling of GoToSource for java files in live profiling results
Milestone cleanup: future->next
changing owner