1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 import org.eclipse.core.runtime.IAdapterFactory; 14 import org.eclipse.debug.ui.actions.IRunToLineTarget; 15 import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget; 16 17 24 public class RetargettableActionAdapterFactory implements IAdapterFactory { 25 28 public Object getAdapter(Object adaptableObject, Class adapterType) { 29 if (adapterType == IRunToLineTarget.class) { 30 return new RunToLineAdapter(); 31 } 32 if (adapterType == IToggleBreakpointsTarget.class) { 33 return new ToggleBreakpointAdapter(); 34 } 35 return null; 36 } 37 40 public Class [] getAdapterList() { 41 return new Class []{IRunToLineTarget.class, IToggleBreakpointsTarget.class}; 42 } 43 } 44 | Popular Tags |