1 11 package org.eclipse.jdt.internal.debug.ui.sourcelookup; 12 13 import org.eclipse.core.runtime.IAdapterFactory; 14 import org.eclipse.jdt.debug.core.IJavaStackFrame; 15 import org.eclipse.ui.part.IShowInSource; 16 import org.eclipse.ui.part.IShowInTargetList; 17 18 22 public class JavaDebugShowInAdapterFactory implements IAdapterFactory { 23 24 27 public Object getAdapter(Object adaptableObject, Class adapterType) { 28 if (adapterType == IShowInSource.class) { 29 if (adaptableObject instanceof IJavaStackFrame) { 30 IJavaStackFrame frame = (IJavaStackFrame) adaptableObject; 31 return new StackFrameShowInSourceAdapter(frame); 32 } 33 } 34 if (adapterType == IShowInTargetList.class) { 35 if (adaptableObject instanceof IJavaStackFrame) { 36 return new StackFrameShowInTargetListAdapter(); 37 } 38 } 39 return null; 40 } 41 42 45 public Class [] getAdapterList() { 46 return new Class []{IShowInSource.class, IShowInTargetList.class}; 47 } 48 49 } 50 | Popular Tags |