blob: 34207638bb3a8ecabb2cb6e362461e8ea8550915 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.junit.ui;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jface.action.Action;
/**
* Requests to rerun a test.
*/
public class RerunAction extends Action {
private String fTestId;
private String fClassName;
private String fTestName;
private TestRunnerViewPart fTestRunner;
/**
* Constructor for RerunAction.
*/
public RerunAction(TestRunnerViewPart runner, String testId, String className, String testName) {
super(JUnitMessages.getString("RerunAction.action.label")); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IJUnitHelpContextIds.RERUN_ACTION);
fTestRunner= runner;
fTestId= testId;
fClassName= className;
fTestName= testName;
}
/*
* @see IAction#run()
*/
public void run() {
fTestRunner.rerunTest(fTestId, fClassName, fTestName);
}
}