1 11 package org.eclipse.debug.internal.ui.actions; 12 13 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView; 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 23 public class LinkBreakpointsWithDebugViewAction implements IViewActionDelegate { 24 25 private BreakpointsView fView; 26 private IAction fAction= null; 27 28 public LinkBreakpointsWithDebugViewAction() { 29 } 30 31 34 public void init(IViewPart view) { 35 fView= (BreakpointsView) view; 36 } 37 38 41 public void run(IAction action) { 42 fView.setTrackSelection(action.isChecked()); 43 } 44 45 48 public void selectionChanged(IAction action, ISelection selection) { 49 if (fAction == null) { 50 action.setChecked(fView.isTrackingSelection()); 51 fAction= action; 52 } 53 } 54 55 } 56 | Popular Tags |