1 11 package org.eclipse.debug.internal.ui.actions; 12 13 14 import org.eclipse.debug.core.DebugException; 15 import org.eclipse.debug.core.model.ITerminate; 16 import org.eclipse.debug.internal.ui.views.launch.LaunchView; 17 18 public class TerminateAndRemoveActionDelegate extends AbstractDebugActionDelegate { 19 20 23 protected void doAction(Object element) throws DebugException { 24 LaunchView.terminateAndRemove(element); 25 } 26 27 30 protected boolean isRunInBackground() { 31 return true; 32 } 33 34 37 protected boolean isEnabledFor(Object element) { 38 if (element instanceof ITerminate) { 39 ITerminate terminate= (ITerminate)element; 40 return terminate.canTerminate() || terminate.isTerminated(); 43 } 44 return false; 45 } 46 47 50 protected String getStatusMessage() { 51 return ActionMessages.TerminateAndRemoveActionDelegate_Exceptions_occurred_attempting_to_terminate_and_remove_2; } 53 54 57 protected String getErrorDialogMessage() { 58 return ActionMessages.TerminateAndRemoveActionDelegate_Terminate_and_remove_failed_1; } 60 61 } 62 | Popular Tags |