1 11 package org.eclipse.jdt.internal.junit.ui; 12 13 14 import org.eclipse.jface.action.Action; 15 import org.eclipse.ui.PlatformUI; 16 17 20 public class ScrollLockAction extends Action { 21 22 private TestRunnerViewPart fRunnerViewPart; 23 24 public ScrollLockAction(TestRunnerViewPart viewer) { 25 super(JUnitMessages.ScrollLockAction_action_label); 26 fRunnerViewPart= viewer; 27 setToolTipText(JUnitMessages.ScrollLockAction_action_tooltip); 28 setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/lock.gif")); setHoverImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/lock.gif")); setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/lock.gif")); PlatformUI.getWorkbench().getHelpSystem().setHelp( 32 this, 33 IJUnitHelpContextIds.OUTPUT_SCROLL_LOCK_ACTION); 34 setChecked(false); 35 } 36 37 40 public void run() { 41 fRunnerViewPart.setAutoScroll(!isChecked()); 42 } 43 } 44 45 | Popular Tags |