| /* |
| *(c) Copyright QNX Software Systems Ltd. 2002. |
| * All Rights Reserved. |
| * |
| */ |
| package org.eclipse.cdt.debug.internal.core.model; |
| |
| import org.eclipse.cdt.debug.core.model.IDummyStackFrame; |
| import org.eclipse.debug.core.DebugException; |
| import org.eclipse.debug.core.model.IRegisterGroup; |
| import org.eclipse.debug.core.model.IStackFrame; |
| import org.eclipse.debug.core.model.IThread; |
| import org.eclipse.debug.core.model.IVariable; |
| |
| /** |
| * Enter type comment. |
| * |
| * @since: Nov 13, 2002 |
| */ |
| public class CDummyStackFrame extends CDebugElement implements IStackFrame, IDummyStackFrame |
| { |
| /** |
| * Containing thread. |
| */ |
| private CThread fThread; |
| |
| /** |
| * Constructor for CDummyStackFrame. |
| * @param target |
| */ |
| public CDummyStackFrame( CThread thread ) |
| { |
| super( (CDebugTarget)thread.getDebugTarget() ); |
| setThread( thread ); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getThread() |
| */ |
| public IThread getThread() |
| { |
| return fThread; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getVariables() |
| */ |
| public IVariable[] getVariables() throws DebugException |
| { |
| return new IVariable[0]; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#hasVariables() |
| */ |
| public boolean hasVariables() throws DebugException |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber() |
| */ |
| public int getLineNumber() throws DebugException |
| { |
| return 0; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getCharStart() |
| */ |
| public int getCharStart() throws DebugException |
| { |
| return 0; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd() |
| */ |
| public int getCharEnd() throws DebugException |
| { |
| return 0; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getName() |
| */ |
| public String getName() throws DebugException |
| { |
| return "..."; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups() |
| */ |
| public IRegisterGroup[] getRegisterGroups() throws DebugException |
| { |
| return ((CDebugTarget)getDebugTarget()).getRegisterGroups(); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups() |
| */ |
| public boolean hasRegisterGroups() throws DebugException |
| { |
| return ((CDebugTarget)getDebugTarget()).getRegisterGroups().length > 0; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#canStepInto() |
| */ |
| public boolean canStepInto() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#canStepOver() |
| */ |
| public boolean canStepOver() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#canStepReturn() |
| */ |
| public boolean canStepReturn() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#isStepping() |
| */ |
| public boolean isStepping() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#stepInto() |
| */ |
| public void stepInto() throws DebugException |
| { |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#stepOver() |
| */ |
| public void stepOver() throws DebugException |
| { |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.IStep#stepReturn() |
| */ |
| public void stepReturn() throws DebugException |
| { |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ISuspendResume#canResume() |
| */ |
| public boolean canResume() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend() |
| */ |
| public boolean canSuspend() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended() |
| */ |
| public boolean isSuspended() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ISuspendResume#resume() |
| */ |
| public void resume() throws DebugException |
| { |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ISuspendResume#suspend() |
| */ |
| public void suspend() throws DebugException |
| { |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ITerminate#canTerminate() |
| */ |
| public boolean canTerminate() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ITerminate#isTerminated() |
| */ |
| public boolean isTerminated() |
| { |
| return false; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.core.model.ITerminate#terminate() |
| */ |
| public void terminate() throws DebugException |
| { |
| } |
| |
| /** |
| * Sets the containing thread. |
| * |
| * @param thread the containing thread |
| */ |
| protected void setThread( CThread thread ) |
| { |
| fThread = thread; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class) |
| */ |
| public Object getAdapter( Class adapter ) |
| { |
| if ( adapter.equals( IDummyStackFrame.class ) ) |
| return this; |
| if ( adapter.equals( IStackFrame.class ) ) |
| return this; |
| return super.getAdapter(adapter); |
| } |
| } |