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.

View | Details | Raw Unified | Return to bug 189113
Collapse All | Expand All

(-)a/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/ResultWindow.java (-2 / +47 lines)
Lines 65-70 Link Here
65
import javax.swing.JSplitPane;
65
import javax.swing.JSplitPane;
66
import javax.swing.JTabbedPane;
66
import javax.swing.JTabbedPane;
67
import javax.swing.SwingUtilities;
67
import javax.swing.SwingUtilities;
68
import org.openide.awt.ActionID;
69
import org.openide.awt.ActionReference;
70
import org.openide.awt.ActionRegistration;
68
import org.openide.awt.MouseUtils;
71
import org.openide.awt.MouseUtils;
69
import org.openide.awt.TabbedPaneFactory;
72
import org.openide.awt.TabbedPaneFactory;
70
import org.openide.util.Exceptions;
73
import org.openide.util.Exceptions;
Lines 95-101 Link Here
95
    private Map<String,JSplitPane> viewMap = new HashMap<String,JSplitPane>();
98
    private Map<String,JSplitPane> viewMap = new HashMap<String,JSplitPane>();
96
    private Map<String,InputOutput> ioMap = new HashMap<String,InputOutput>();
99
    private Map<String,InputOutput> ioMap = new HashMap<String,InputOutput>();
97
100
98
    private final JTabbedPane tabPane;
101
    private static JTabbedPane tabPane;
99
    private JPopupMenu pop;
102
    private JPopupMenu pop;
100
    private PopupListener popL;
103
    private PopupListener popL;
101
    private CloseListener closeL;
104
    private CloseListener closeL;
Lines 343-349 Link Here
343
        activated = false;
346
        activated = false;
344
    }
347
    }
345
348
346
    private JSplitPane getCurrentResultView(){
349
    private static JSplitPane getCurrentResultView(){
347
        return (JSplitPane)tabPane.getSelectedComponent();
350
        return (JSplitPane)tabPane.getSelectedComponent();
348
    }
351
    }
349
352
Lines 468-473 Link Here
468
        }
471
        }
469
    }
472
    }
470
473
474
    @ActionID(
475
    category = "CommonTestRunner",
476
    id = "org.netbeans.modules.gsf.testrunner.api.ResultWindow.Rerun")
477
    @ActionRegistration(
478
    displayName = "#CTL_Rerun")
479
    @ActionReference(path = "Shortcuts", name = "D-J")
480
    @NbBundle.Messages("CTL_Rerun=Rerun Action private")
481
    public static final class Rerun extends AbstractAction {
482
        @Override
483
        public void actionPerformed(ActionEvent e) {
484
	    StatisticsPanel statisticsPanel = getStatisticsPanel();
485
	    if(statisticsPanel != null) {
486
		statisticsPanel.rerun(false);
487
	    }
488
        }
489
    }
490
491
    @ActionID(
492
    category = "CommonTestRunner",
493
    id = "org.netbeans.modules.gsf.testrunner.api.ResultWindow.RerunFailed")
494
    @ActionRegistration(
495
    displayName = "#CTL_RerunFailed")
496
    @ActionReference(path = "Shortcuts", name = "D-F10")
497
    @NbBundle.Messages("CTL_RerunFailed=Rerun Failed Action private")
498
    public static final class RerunFailed extends AbstractAction {
499
        @Override
500
        public void actionPerformed(ActionEvent e) {
501
	    StatisticsPanel statisticsPanel = getStatisticsPanel();
502
	    if(statisticsPanel != null) {
503
		statisticsPanel.rerun(true);
504
	    }
505
        }
506
    }
507
508
    private static StatisticsPanel getStatisticsPanel() {
509
	JSplitPane view = getCurrentResultView();
510
	if (view == null || !(view.getLeftComponent() instanceof StatisticsPanel)) {
511
	    return null;
512
	}
513
	return (StatisticsPanel) view.getLeftComponent();
514
    }
515
471
    private class Close extends AbstractAction {
516
    private class Close extends AbstractAction {
472
        public Close() {
517
        public Close() {
473
            super(NbBundle.getMessage(ResultWindow.class, "LBL_CloseWindow"));  //NOI18N
518
            super(NbBundle.getMessage(ResultWindow.class, "LBL_CloseWindow"));  //NOI18N
(-)a/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/StatisticsPanel.java (+11 lines)
Lines 303-308 Link Here
303
        treePanel.selectPreviousFailure();
303
        treePanel.selectPreviousFailure();
304
    }
304
    }
305
305
306
    void rerun(boolean failed) {
307
	final RerunHandler rerunHandler = displayHandler.getSession().getRerunHandler();
308
	if (rerunHandler != null) {
309
	    if (failed) {
310
		rerunHandler.rerun(treePanel.getFailedTests());
311
		return;
312
	    }
313
	    rerunHandler.rerun();
314
	}
315
    }
316
306
    void selectNextFailure() {
317
    void selectNextFailure() {
307
        treePanel.selectNextFailure();
318
        treePanel.selectNextFailure();
308
    }
319
    }

Return to bug 189113