Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 11 package org.eclipse.ui.views.framelist; 12 13 import org.eclipse.ui.PlatformUI; 14 import org.eclipse.ui.internal.views.framelist.FrameListMessages; 15 16 19 public class GoIntoAction extends FrameAction { 20 21 26 public GoIntoAction(FrameList frameList) { 27 super(frameList); 28 setText(FrameListMessages.GoInto_text); 29 setToolTipText(FrameListMessages.GoInto_toolTip); 30 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 31 IFrameListHelpContextIds.GO_INTO_ACTION); 32 update(); 33 } 34 35 private Frame getSelectionFrame(int flags) { 36 return getFrameList().getSource().getFrame( 37 IFrameSource.SELECTION_FRAME, flags); 38 } 39 40 44 public void run() { 45 Frame selectionFrame = getSelectionFrame(IFrameSource.FULL_CONTEXT); 46 if (selectionFrame != null) { 47 getFrameList().gotoFrame(selectionFrame); 48 } 49 } 50 51 55 public void update() { 56 super.update(); 57 Frame selectionFrame = getSelectionFrame(0); 58 setEnabled(selectionFrame != null); 59 } 60 } 61
| Popular Tags
|