1 11 package org.eclipse.debug.internal.ui.model.elements; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.IExpressionManager; 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 ExpressionManagerContentProvider extends ElementContentProvider { 23 24 27 protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 28 return ((IExpressionManager) element).getExpressions().length; 29 } 30 31 34 protected Object [] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 35 return getElements(((IExpressionManager) parent).getExpressions(), index, length); 36 } 37 38 41 protected boolean supportsContextId(String id) { 42 return id.equals(IDebugUIConstants.ID_EXPRESSION_VIEW); 43 } 44 45 protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 46 return ((IExpressionManager)element).hasExpressions(); 47 } 48 49 50 51 } 52 | Popular Tags |