1 12 13 package org.eclipse.debug.internal.ui.actions.context; 14 15 import org.eclipse.core.runtime.IAdaptable; 16 import org.eclipse.debug.internal.ui.DebugPluginImages; 17 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; 18 import org.eclipse.debug.internal.ui.actions.ActionMessages; 19 import org.eclipse.debug.internal.ui.actions.provisional.IAsynchronousStepAdapter; 20 import org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor; 21 import org.eclipse.jface.resource.ImageDescriptor; 22 23 public class StepOverAction extends StepIntoAction { 24 28 public String getText() { 29 return ActionMessages.StepOverAction_0; 30 } 31 32 36 public ImageDescriptor getDisabledImageDescriptor() { 37 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_OVER); 38 } 39 40 44 public String getHelpContextId() { 45 return "step_over_action_context"; } 47 48 52 public ImageDescriptor getHoverImageDescriptor() { 53 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_OVER); 54 } 55 56 60 public String getId() { 61 return "org.eclipse.debug.ui.debugview.toolbar.stepOver"; } 63 64 68 public ImageDescriptor getImageDescriptor() { 69 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_OVER); 70 } 71 72 76 public String getToolTipText() { 77 return ActionMessages.StepOverAction_3; 78 } 79 80 84 protected void checkCapability(Object element, IBooleanRequestMonitor monitor) { 85 if (element instanceof IAdaptable) { 86 IAdaptable adaptable = (IAdaptable) element; 87 IAsynchronousStepAdapter steppy = (IAsynchronousStepAdapter) adaptable.getAdapter(IAsynchronousStepAdapter.class); 88 if (steppy != null) { 89 steppy.canStepOver(element, monitor); 90 } else { 91 notSupported(monitor); 92 } 93 } 94 } 95 96 100 protected void stepAction(Object element) { 101 if (element instanceof IAdaptable) { 102 IAdaptable adaptable = (IAdaptable) element; 103 IAsynchronousStepAdapter steppy = (IAsynchronousStepAdapter) adaptable.getAdapter(IAsynchronousStepAdapter.class); 104 if (steppy != null) 105 steppy.stepOver(element, new ActionRequestMonitor()); 106 } 107 } 108 109 113 protected String getStatusMessage() { 114 return ActionMessages.StepOverActionDelegate_Exceptions_occurred_attempting_to_step_over_the_frame_2; 115 } 116 117 121 protected String getErrorDialogMessage() { 122 return ActionMessages.StepOverActionDelegate_Step_over_failed_1; 123 } 124 } 125 | Popular Tags |