1 /******************************************************************************* 2 * Copyright (c) 2000, 2015 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jdt.internal.debug.ui.actions; 15 16 17 import org.eclipse.core.runtime.IAdaptable; 18 import org.eclipse.debug.core.model.IDebugElement; 19 import org.eclipse.jdt.debug.core.IJavaStackFrame; 20 21 /** 22 * Action that opens a type associated with a selected stack frame. 23 */ 24 public abstract class OpenStackFrameAction extends OpenTypeAction { 25 26 /* (non-Javadoc) 27 * @see org.eclipse.jdt.internal.debug.ui.actions.OpenTypeAction#getDebugElement(org.eclipse.core.runtime.IAdaptable) 28 */ 29 @Override getDebugElement(IAdaptable element)30 protected IDebugElement getDebugElement(IAdaptable element) { 31 return element.getAdapter(IJavaStackFrame.class); 32 } 33 } 34