1 11 package org.eclipse.debug.internal.ui.model.elements; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.model.IThread; 15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; 16 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; 17 import org.eclipse.debug.ui.IDebugUIConstants; 18 19 22 public class ThreadContentProvider extends ElementContentProvider { 23 24 27 protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 28 return ((IThread)element).getStackFrames().length; 29 } 30 31 34 protected boolean supportsContextId(String id) { 35 return IDebugUIConstants.ID_DEBUG_VIEW.equals(id); 36 } 37 38 41 protected Object [] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 42 return getElements(((IThread)parent).getStackFrames(), index, length); 43 } 44 45 protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 46 return ((IThread)element).hasStackFrames(); 47 } 48 49 } 50 | Popular Tags |