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 199877 - Profiler: find in call tree does not work
Summary: Profiler: find in call tree does not work
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.0
Hardware: PC Other
: P3 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-04 13:10 UTC by vlipatov
Modified: 2011-10-07 14:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vlipatov 2011-07-04 13:10:00 UTC
oracle_java_me_sdk-3_0_5-rr-bin-b29-win-09_may_2011
NetBeans 7.0


Run an application, for example Demos, in Profiler (Profile >
CPU Profiler) and then run some MIDlets and exit.

There will be Profiler info in NetBeans opened.
Choose Combined tab, uncheck autoselection buttons (2 buttons on the right of
View combobox), select a line in Hot Spots part and try to Find it in Call
Tree (right mouse click and select Find in Call Tree).

It doesn't work (if it works at first, try to Find in Call Tree again on
another line).
Comment 1 Alexandr Scherbatiy 2011-09-06 11:03:20 UTC
The same is for the Java projects

Steps to reproduce:

- Profile a Java project CPU mode
- Take a profiler Snapshot
- Select the Combined tab
- Uncheck autoselection buttons (2 buttons on the right of
View combobox)

- In the Hot Spots - Method part of the panel select a method and invoke Find in Call Tree

First time it works.

- In the Hot Spots - Method part of the panel select an another method and invoke Find in Call Tree

Now it does not work. The necessary method is not selected in the Call Tree - Method part of the combined panel
Comment 2 Alexandr Scherbatiy 2011-09-06 11:19:35 UTC
It seems that the performFindFirst()  method of the CPUSnapshotPanel class in NetBeans has incorrect condition in the code 

        } else if (tabs.getSelectedComponent() == combined) {
            if ((combinedViewTracker.getLastFocusOwner() == null)
                    || (combinedViewTracker.getLastFocusOwner() == combinedCCT.getResultsViewReference())) {


The first time the combinedViewTracker.getLastFocusOwner() is null so the search is performed in the combinedCCT panel.

The second time the combinedViewTracker.getLastFocusOwner() has the FlatProfilePanel value and so the search is performed in combinedFlat panel, in the same panel where the Find in Call Tree action was executed.
Comment 3 J Bachorik 2011-10-04 12:48:30 UTC
Applying the simple fix recommended by Alexandr. Thanks!

changeset   : 203376:afb2b59be84f
tags        : tip 
author      : Jaroslav Bachorik <yardus@netbeans.org>
date        : Tue Oct 04 14:47:18 CEST 2011
Comment 4 Quality Engineering 2011-10-07 14:42:19 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/afb2b59be84f
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #199877: Simple fix for buggy "Find in CallTree" in snapshot feature