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.
JspRunToCursorActionProvider is listening to too many changes - MainProjectManager, TopComponent.Registry, DebuggerManager. This means it updates its enabled/disabled state every time when an event arrives including every notification about TC opening and similar. In my testcase with 4 Java editors opened I see it being invoked 12 times during startup.
Is the behaviour the same as in org.netbeans.modules.debugger.projects.RunToCursorAction ?
Well, I think I can't remove any of the listeners, but I probably do not have to update the state on 'opened' events - activated should be sufficient. I could remove the mime checking, too, and check just the extension in-place - the mime checking does nothing more, actually. But then the flexibility of the code (where mime is defined in one and only one place) is lost. Any suggestions are welcome.
I return immediately on opened events, so I think the action provider shouldn't be expensive now: http://web.netbeans.org/source/browse/web/jspdebug/src/org/netbeans/modules/web/debug/actions/JspRunToCursorActionProvider.java.diff?r1=1.6&r2=1.7
Seems to be fixed.