blob: 396a292d8cbbf2f17d936d46e54b95ead79766c0 [file] [log] [blame]
package org.eclipse.debug.internal.ui;
/*
* Licensed Materials - Property of IBM,
* WebSphere Studio Workbench
* (c) Copyright IBM Corp 2000
*/
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.ITerminate;
public class TerminateActionDelegate extends ControlActionDelegate {
private static final String PREFIX= "terminate_action.";
/**
* @see ControlActionDelegate
*/
protected void doAction(Object element) throws DebugException {
if (element instanceof ITerminate) {
((ITerminate)element).terminate();
}
}
/**
* @see ControlActionDelegate
*/
public boolean isEnabledFor(Object element) {
return element instanceof ITerminate && ((ITerminate)element).canTerminate();
}
/**
* @see ControlActionDelegate
*/
protected String getPrefix() {
return PREFIX;
}
}