KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > registers > DeferredRegisterViewStackFrame


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.views.registers;
12
13 import org.eclipse.debug.core.DebugException;
14 import org.eclipse.debug.core.model.IRegisterGroup;
15 import org.eclipse.debug.core.model.IStackFrame;
16 import org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame;
17
18 public class DeferredRegisterViewStackFrame extends DeferredStackFrame {
19     
20     /* (non-Javadoc)
21      * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
22      */

23     public Object JavaDoc[] getChildren(Object JavaDoc parent) {
24         try {
25             return ((IStackFrame)parent).getRegisterGroups();
26         } catch (DebugException e) {
27         }
28         return EMPTY;
29     }
30     
31     /* (non-Javadoc)
32      * @see org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame#hasChildren(java.lang.Object)
33      */

34     protected boolean hasChildren(Object JavaDoc child) {
35         IRegisterGroup group = (IRegisterGroup) child;
36         try {
37             return group.hasRegisters();
38         } catch (DebugException e) {
39         }
40         return false;
41     }
42 }
43
Popular Tags