1 11 package org.eclipse.jdt.internal.debug.ui.monitors; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; 15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; 16 17 22 public class ContendedMonitorContentProvider extends JavaElementContentProvider { 23 24 27 protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 28 if (((JavaContendedMonitor)element).getOwningThread() != null) { 29 return 1; 30 } 31 return 0; 32 } 33 34 37 protected Object [] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 38 JavaOwningThread owningThread= ((JavaContendedMonitor)parent).getOwningThread(); 39 if (owningThread == null) { 40 return EMPTY; 41 } 42 return new Object []{owningThread}; 43 } 44 45 } 46 | Popular Tags |