1 11 package org.eclipse.jdt.internal.ui.infoviews; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.jface.action.Action; 16 17 import org.eclipse.ui.PlatformUI; 18 19 import org.eclipse.jdt.core.IJavaElement; 20 21 import org.eclipse.jdt.ui.actions.OpenAction; 22 23 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 24 import org.eclipse.jdt.internal.ui.JavaPluginImages; 25 26 class GotoInputAction extends Action { 27 28 private AbstractInfoView fInfoView; 29 30 public GotoInputAction(AbstractInfoView infoView) { 31 Assert.isNotNull(infoView); 32 fInfoView= infoView; 33 34 JavaPluginImages.setLocalImageDescriptors(this, "goto_input.gif"); setText(InfoViewMessages.GotoInputAction_label); 36 setToolTipText(InfoViewMessages.GotoInputAction_tooltip); 37 setDescription(InfoViewMessages.GotoInputAction_description); 38 39 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_INPUT_ACTION); 40 } 41 42 public void run() { 43 IJavaElement inputElement= fInfoView.getInput(); 44 new OpenAction(fInfoView.getViewSite()).run(new Object [] { inputElement }); 45 } 46 } 47 | Popular Tags |