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.IRegisterGroup; 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 24 public class RegisterGroupContentProvider extends ElementContentProvider { 25 26 protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 27 return ((IRegisterGroup)element).getRegisters().length; 28 } 29 30 protected Object [] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 31 return getElements(((IRegisterGroup)parent).getRegisters(), index, length); 32 } 33 34 protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 35 return ((IRegisterGroup)element).hasRegisters(); 36 } 37 38 protected boolean supportsContextId(String id) { 39 return IDebugUIConstants.ID_REGISTER_VIEW.equals(id); 40 } 41 42 } 43 | Popular Tags |