1 12 package org.eclipse.debug.internal.ui.actions.context; 13 14 import org.eclipse.core.runtime.IAdaptable; 15 import org.eclipse.debug.internal.ui.DebugPluginImages; 16 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; 17 import org.eclipse.debug.internal.ui.actions.ActionMessages; 18 import org.eclipse.debug.internal.ui.actions.provisional.IAsynchronousStepAdapter; 19 import org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor; 20 import org.eclipse.jface.resource.ImageDescriptor; 21 22 public class StepIntoAction extends StepAction { 23 24 28 protected void checkCapability(Object element, IBooleanRequestMonitor monitor) { 29 if (element instanceof IAdaptable) { 30 IAdaptable adaptable = (IAdaptable) element; 31 IAsynchronousStepAdapter steppy = (IAsynchronousStepAdapter) adaptable.getAdapter(IAsynchronousStepAdapter.class); 32 if (steppy != null) { 33 steppy.canStepInto(element, monitor); 34 } else { 35 notSupported(monitor); 36 } 37 } 38 } 39 40 44 protected void stepAction(Object element) { 45 if (element instanceof IAdaptable) { 46 IAdaptable adaptable = (IAdaptable) element; 47 IAsynchronousStepAdapter steppy = (IAsynchronousStepAdapter) adaptable.getAdapter(IAsynchronousStepAdapter.class); 48 if (steppy != null) 49 steppy.stepInto(element, new ActionRequestMonitor()); 50 } 51 } 52 53 57 protected String getStatusMessage() { 58 return ActionMessages.StepIntoActionDelegate_Exceptions_occurred_attempting_to_step_into_the_frame_2; 59 } 60 61 65 protected String getErrorDialogMessage() { 66 return ActionMessages.StepIntoActionDelegate_Step_into_failed_1; 67 } 68 69 73 public String getText() { 74 return ActionMessages.StepIntoAction_0; 75 } 76 77 81 public String getHelpContextId() { 82 return "step_into_action_context"; } 84 85 89 public String getId() { 90 return "org.eclipse.debug.ui.debugview.toolbar.stepInto"; } 92 93 97 public String getToolTipText() { 98 return ActionMessages.StepIntoAction_3; 99 } 100 101 105 public ImageDescriptor getDisabledImageDescriptor() { 106 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_INTO); 107 } 108 109 113 public ImageDescriptor getHoverImageDescriptor() { 114 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO); 115 } 116 117 121 public ImageDescriptor getImageDescriptor() { 122 return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO); 123 } 124 } 125 | Popular Tags |