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.
Class org.netbeans.modules.profiler.categories.MarkerProcessor which is used for classes mark has method "addImplementorMethods" . The latter method is used for marking classes an their methods which extends/implements some given class/interface. This method uses ClassIndex.SearchScope.SOURCE only for classes search . Such approach could work ( actually it doesn't work , see below ) when user choses Profile only Project classes settings. F.e. in case of profiling ALL classes such approach will miss marks for classes in binary jars classpath. There is f.e. marks for classes in the package "sun.java2d". ALL classes in this package will be marked with Java 2D category ( when all classes are profiled ). This is inconsistent with approach for subtypes definition: algorithm apply marks only for classes in the project source root. I suggest to use both scopes ClassIndex.SearchScope.SOURCE and ClassIndex.SearchScope.DEPENDENCIES for search. This will always work . In Project classes only profile case it will just takes more time . Current approach has the following issue anyway : "addImplementorMethods" method needs to "recursively" find all classes which are extends/implements given class/interface. But result of usage only scope ClassIndex.SearchScope.SOURCE leads to miss part of such implementors. Consider f.e. JPanel. This class extends JComponent with UI/Painters category. The current algorithm will not include JPanel as implementor of JComponent. As result all custom hierarchy of JPanel ( any class in the project source code which extends JPanel directly or indirectly ) will not be included in implementors list. So the current approach should be changed . I believe the most appropriate way to do this : just uses both search scopes.
Suggestion implemented - http://hg.netbeans.org/profiler-main/rev/da0b53f3fd82
Integrated into 'main-golden', will be available in build *201011170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/da0b53f3fd82 User: Jaroslav Bachorik <yardus@netbeans.org> Log: #187773: Searching for implementors (for marking purposes) in binaries too