Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 214300

Summary: Permit "Show Failures" to be enabled on multiple-node selections
Product: connecteddeveloper Reporter: Jesse Glick <jglick>
Component: HudsonAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED QA Contact: issues <>
Priority: P3 Keywords: NETFIX
Version: 7.2   
Target Milestone: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Report:
Attachments: Start of a patch
Patch - Using NodeAction
Patch - Using ContextAwareAction with @ActionRegistration
Patch - Using ContextAwareAction (no @ActionRegistration)
Patch - Using ContextAwareAction (no @ActionRegistration) v2

Description Jesse Glick 2012-06-15 21:43:46 UTC
Created attachment 120925 [details]
Start of a patch

Sometimes it is useful to display test failures from multiple builds with one gesture. Currently you have to select the menu item on each. I started implementing this but there is some more to do - in order for an action to be enabled on multiselections, it has to be a singleton and accept a context. Could probably use @ActionRegistration if the ctor takes a List<HudsonJobBuild> (but TBD how to handle HudsonMavenModuleBuild - common parent interface?), then use Actions.forID to find the singleton.
Comment 1 Jaroslav Havlin 2013-03-04 18:11:31 UTC
Created attachment 132163 [details]
Patch - Using NodeAction

I've tried to implement it using NodeAction. Seems to work fine. Is it OK, or are there any drawbacks? Thanks.
Comment 2 Jesse Glick 2013-03-06 00:20:12 UTC
You can do it that way if it is easiest, probably using CookieAction rather than NodeAction; last I checked SystemAction was just semideprecated. The best replacement is in spi.actions which is unfortunately still only available to “friends”. Doing it the encouraged way means using @ActionRegistration(eager=true) to define the ContextAwareAction (cannot make it lazy in this case since it has to accept two kinds of cookies).

The overloads in UI.showFailuresAction are now misleading since the result is a singleton, hence my original patch to

The other parts of my patch were to add the action to nodes even when there was not a failure, so that you could multiselect all the builds of a job (for example) and select Show Failures and see just the test results from unstable builds.
Comment 3 Jaroslav Havlin 2013-03-06 14:34:05 UTC
Created attachment 132269 [details]
Patch - Using ContextAwareAction with @ActionRegistration

Implementation that uses eager @ActionRegistration for a ContextAwareAction.
Needs more testing with maven module builds, but seems to work fine so far.
Comment 4 Jaroslav Havlin 2013-03-06 14:52:06 UTC
Created attachment 132270 [details]
Patch - Using ContextAwareAction (no @ActionRegistration)

Similar to attachment 132269 [details], but the action doesn't use @ActionRegistration.

Everything works correctly. There's no need to assign keyboard shortcut or to add the action to main menu, so I think this patch should suffice.
Comment 5 Jaroslav Havlin 2013-03-06 16:20:18 UTC
Created attachment 132280 [details]
Patch - Using ContextAwareAction (no @ActionRegistration) v2

Fixed method ShowFailures.getExtraModuleBuilds.
Comment 6 Jesse Glick 2013-03-06 20:39:56 UTC
That looks right to me.
Comment 7 Jaroslav Havlin 2013-03-07 11:59:14 UTC
Thank you very much, Jesse, for your help and reviewing.
Comment 8 Quality Engineering 2013-03-08 02:04:03 UTC
Integrated into 'main-golden', will be available in build *201303072300* on (upload may still be in progress)
User: Jaroslav Havlin <>
Log: #214300: Permit Show Failures to be enabled on multiple-node selections
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo