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.ISuspendResume; 16 17 public class SuspendActionDelegate extends AbstractListenerActionDelegate { 18 19 22 protected void doAction(Object element) throws DebugException { 23 if (element instanceof ISuspendResume) { 24 ((ISuspendResume) element).suspend(); 25 } 26 } 27 28 31 protected boolean isRunInBackground() { 32 return true; 33 } 34 35 38 protected boolean isEnabledFor(Object element) { 39 return element instanceof ISuspendResume && ((ISuspendResume)element).canSuspend(); 40 } 41 42 45 protected String getStatusMessage() { 46 return ActionMessages.SuspendActionDelegate_Exceptions_occurred_attempting_to_suspend__2; } 48 49 52 protected String getErrorDialogMessage() { 53 return ActionMessages.SuspendActionDelegate_Suspend_failed_1; } 55 56 } 57 | Popular Tags |