1 11 package org.eclipse.debug.internal.ui.model.elements; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.ILaunchManager; 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 LaunchManagerContentProvider extends ElementContentProvider { 23 24 27 protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { 28 return ((ILaunchManager)element).getLaunches().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(((ILaunchManager)parent).getLaunches(),index, length); 43 } 44 45 } 46 | Popular Tags |