Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2ca1bca42a1fbe83b81485ff9ece6d2708cb9aa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.internal.ui.views.registers;

import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IRegisterGroup;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame;

public class DeferredRegisterViewStackFrame extends DeferredStackFrame {
    
	/* (non-Javadoc)
     * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
     */
    public Object[] getChildren(Object parent) {
        try {
            return ((IStackFrame)parent).getRegisterGroups();
        } catch (DebugException e) {
        }
        return EMPTY;
    }
    
	/* (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame#hasChildren(java.lang.Object)
	 */
	protected boolean hasChildren(Object child) {
		IRegisterGroup group = (IRegisterGroup) child;
		try {
			return group.hasRegisters();
		} catch (DebugException e) {
		}
		return false;
	}    
}

Back to the top