1 11 12 package org.eclipse.debug.internal.ui.views.memory; 13 14 import org.eclipse.jface.action.IAction; 15 import org.eclipse.jface.viewers.ISelection; 16 import org.eclipse.ui.IViewActionDelegate; 17 import org.eclipse.ui.IViewPart; 18 19 25 public class PinMemoryBlockAction implements IViewActionDelegate { 26 27 private MemoryView fView; 28 public void init(IViewPart view) { 29 if (view instanceof MemoryView) 30 fView = (MemoryView)view; 31 32 } 33 34 public void run(IAction action) { 35 if (fView == null) 36 return; 37 38 boolean pin = !fView.isPinMBDisplay(); 39 fView.setPinMBDisplay(pin); 40 41 action.setChecked(pin); 42 } 43 44 public void selectionChanged(IAction action, ISelection selection) { 45 } 46 47 } 48 | Popular Tags |