diff options
Diffstat (limited to 'org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java')
-rw-r--r-- | org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java index 2f3250e7a..3b95d2909 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java @@ -44,7 +44,7 @@ import org.eclipse.ui.progress.UIJob; */ public class DataStackView extends AbstractDebugView implements IDebugContextListener { - private PDAThread fThread; + private PDAThread fThread; class StackViewContentProvider implements ITreeContentProvider { @@ -118,46 +118,46 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis @Override public void dispose() { - DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextListener(this); + DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextListener(this); super.dispose(); } @Override public void debugContextChanged(final DebugContextEvent event) { new UIJob(getSite().getShell().getDisplay(), "DataStackView update") { //$NON-NLS-1$ - { - setSystem(true); - } + { + setSystem(true); + } - @Override + @Override public IStatus runInUIThread(IProgressMonitor monitor) { - if (getViewer() != null) { // runs asynchronously, view may be disposed - update(event.getContext()); - } - return Status.OK_STATUS; - } - }.schedule(); + if (getViewer() != null) { // runs asynchronously, view may be disposed + update(event.getContext()); + } + return Status.OK_STATUS; + } + }.schedule(); } - /** - * Updates the view for the selected thread (if suspended) - */ - private void update(ISelection context) { - fThread = null; - - if (context instanceof IStructuredSelection) { - Object element = ((IStructuredSelection)context).getFirstElement(); - if (element instanceof PDAThread) { - fThread = (PDAThread)element; - } else if (element instanceof PDAStackFrame) { - fThread = (PDAThread)((PDAStackFrame)element).getThread(); - } - } + /** + * Updates the view for the selected thread (if suspended) + */ + private void update(ISelection context) { + fThread = null; + + if (context instanceof IStructuredSelection) { + Object element = ((IStructuredSelection)context).getFirstElement(); + if (element instanceof PDAThread) { + fThread = (PDAThread)element; + } else if (element instanceof PDAStackFrame) { + fThread = (PDAThread)((PDAStackFrame)element).getThread(); + } + } Object input = null; if (fThread != null && fThread.isSuspended()) { - input = fThread; + input = fThread; } getViewer().setInput(input); getViewer().refresh(); - } + } } |