1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import org.eclipse.jface.action.IAction; 15 import org.eclipse.jface.text.source.IVerticalRulerInfo; 16 import org.eclipse.ui.IEditorPart; 17 import org.eclipse.ui.texteditor.AbstractRulerActionDelegate; 18 import org.eclipse.ui.texteditor.ITextEditor; 19 20 public class ManageBreakpointRulerActionDelegate extends AbstractRulerActionDelegate { 21 22 private ManageBreakpointRulerAction targetAction; 23 private IEditorPart activeEditor; 24 25 28 protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { 29 targetAction = new ManageBreakpointRulerAction(rulerInfo, editor); 30 return targetAction; 31 } 32 33 36 public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) { 37 if (activeEditor != null) { 38 if (targetAction != null) { 39 targetAction.dispose(); 40 targetAction = null; 41 } 42 } 43 activeEditor = targetEditor; 44 super.setActiveEditor(callerAction, targetEditor); 45 } 46 } 47 | Popular Tags |