blob: d191b0cf6cd053d96c7f22246bbc07ca863cb66e [file] [log] [blame]
package org.eclipse.jdt.internal.ui.snippeteditor;
/*
* Licensed Materials - Property of IBM,
* WebSphere Studio Workbench
* (c) Copyright IBM Corp 1999, 2000
*/
import org.eclipse.jdt.internal.ui.JavaPluginImages;
/**
* Stops the VM used to run a snippet.
*
*/
public class StopAction extends SnippetAction {
public StopAction(JavaSnippetEditor editor, String label) {
super(editor, label);
setDescription("Restarts the page");
setToolTipText("Terminate");
setImageDescriptor(JavaPluginImages.DESC_TOOL_TERMSNIPPET);
}
/**
* The user has invoked this action.
*/
public void run() {
fEditor.shutDownVM();
}
public void snippetStateChanged(JavaSnippetEditor editor) {
setEnabled(editor != null && editor.isVMLaunched());
}
}