| /******************************************************************************* |
| * Copyright (c) 2004, 2005 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.debug.internal.ui.views.memory.renderings; |
| |
| import org.eclipse.debug.internal.ui.DebugPluginImages; |
| import org.eclipse.debug.internal.ui.DebugUIMessages; |
| import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; |
| import org.eclipse.debug.ui.memory.AbstractTableRendering; |
| import org.eclipse.jface.action.Action; |
| |
| /** |
| * Reest MemoryViewTab to the base address of a memory block |
| * |
| * @since 3.0 |
| */ |
| public class ResetToBaseAddressAction extends Action { |
| |
| private AbstractTableRendering fRendering; |
| |
| public ResetToBaseAddressAction(AbstractTableRendering rendering) { |
| fRendering = rendering; |
| setText(DebugUIMessages.ResetMemoryBlockAction_title); |
| setToolTipText(DebugUIMessages.ResetMemoryBlockAction_tootip); |
| |
| setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESET_MEMORY)); |
| setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_RESET_MEMORY)); |
| setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESET_MEMORY)); |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.jface.action.IAction#run() |
| */ |
| public void run() { |
| fRendering.reset(); |
| } |
| } |