1 /*******************************************************************************2 * Copyright (c) 2000, 2005 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 * 8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/11 package org.eclipse.debug.internal.ui.elements.adapters;12 13 import org.eclipse.debug.core.DebugException;14 import org.eclipse.debug.core.model.IThread;15 import org.eclipse.debug.ui.DeferredDebugElementWorkbenchAdapter;16 import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;17 18 19 /**20 * Default deferred content provider for a debug target 21 */22 public class DeferredThread extends DeferredDebugElementWorkbenchAdapter implements IDeferredWorkbenchAdapter {23 24 /* (non-Javadoc)25 * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)26 */27 public Object [] getChildren(Object parent) {28 try {29 return ((IThread)parent).getStackFrames();30 } catch (DebugException e) {31 }32 return EMPTY;33 }34 35 /* (non-Javadoc)36 * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)37 */38 public Object getParent(Object element) {39 return ((IThread)element).getDebugTarget();40 }41 42 43 44 }45