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.
While checking for possible uses of the API in bug #205798 I found a number of cases where code scattered across the IDE is looking up @ActionID(id="org.netbeans.modules.profiler.actions.SelfSamplerAction", category="Profile") using various code idioms and then asking its eager delegate for various logger-* attributes which get cast to Runnable. main$ hg locate -r . -0 \*\*.java | xargs -0 grep -l SelfSamplerAction core.ui/src/org/netbeans/core/ui/sampler/SelfSamplerAction.java editor.completion/src/org/netbeans/modules/editor/completion/CompletionImplProfile.java jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java o.n.core/src/org/netbeans/core/TimableEventQueue.java parsing.api/src/org/netbeans/modules/parsing/impl/SelfProfile.java performance/src/org/netbeans/modules/performance/utilities/PerformanceTestCase.java profiler/test/unit/src/org/netbeans/modules/profiler/actions/SelfSamplerActionTest.java It is unclear from reading code what this is supposed to do, and seems quite fragile. Recommend introducing and using a proper API for working with the self-sampler, perhaps along the lines of: package TBD; public abstract class SelfSampler { public static void run(String label) { SelfSampler s = Lookup.getDefault().lookup(SelfSampler.class); if (s != null) s.doRun(label); } protected abstract void doRun(String label); }
Weird, I just happened to come across this issue at about the same time as you. :-) *** This bug has been marked as a duplicate of bug 206859 ***