diff options
author | cvs2svn | 2008-06-12 21:30:34 +0000 |
---|---|---|
committer | cvs2svn | 2008-06-12 21:30:34 +0000 |
commit | 1855d4a026ac352af2b703df28b9476ba10eb089 (patch) | |
tree | 7f5ec407115e081f644d911b825c732e4165148f /org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda | |
parent | 059241a8f9f9b733e7ca6db599dad97a986bd6b4 (diff) | |
download | eclipse.platform.debug-1855d4a026ac352af2b703df28b9476ba10eb089.tar.gz eclipse.platform.debug-1855d4a026ac352af2b703df28b9476ba10eb089.tar.xz eclipse.platform.debug-1855d4a026ac352af2b703df28b9476ba10eb089.zip |
This commit was manufactured by cvs2svn to create branch 'R3_4_maintenance'.
Sprout from master 2008-06-12 21:30:31 UTC Darin Wright <darin> 'Bug 236922 - external tool builder does not run'
Delete:
org.eclipse.debug.examples.core/pdavm/docs/protocol.html
org.eclipse.debug.examples.core/pdavm/pda.pl
org.eclipse.debug.examples.core/pdavm/tests/vmtests.pl
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopAction.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushAction.java
Diffstat (limited to 'org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda')
2 files changed, 0 insertions, 160 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopAction.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopAction.java deleted file mode 100644 index af21fbcc6..000000000 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopAction.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2007 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 - * Bjorn Freeman-Benson - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.examples.ui.pda.views; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IValue; -import org.eclipse.debug.examples.core.pda.model.PDADebugTarget; -import org.eclipse.debug.examples.ui.pda.DebugUIPlugin; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.TreeViewer; - - -/** - * Pops a selected value off the data stack. The selection does <b>not</b> have to be - * the top element on the stack. - */ -public class PopAction extends Action implements ISelectionChangedListener { - - private DataStackView fView; - - /** - * Constructs an action to pop values off the stack - */ - protected PopAction(DataStackView view) { - super("Pop"); - ImageRegistry imageRegistry = DebugUIPlugin.getDefault().getImageRegistry(); - setImageDescriptor(imageRegistry.getDescriptor(DebugUIPlugin.IMG_ELCL_POP)); - setDisabledImageDescriptor(imageRegistry.getDescriptor(DebugUIPlugin.IMG_DLCL_POP)); - setToolTipText("Pop"); - setEnabled(false); - view.getSite().getSelectionProvider().addSelectionChangedListener(this); - fView = view; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) - */ - public void selectionChanged(SelectionChangedEvent event) { - if (event.getSelection().isEmpty()) { - setEnabled(false); - } else { - setEnabled(getDebugTarget().canPop()); - } - } - - public void run() { - TreeViewer viewer = (TreeViewer)fView.getViewer(); - IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); - Object popee = selection.getFirstElement(); - try { - PDADebugTarget target = getDebugTarget(); - IValue[] stack = target.getDataStack(); - List restore = new ArrayList(); - for (int i = 0; i < stack.length; i++) { - Object value = stack[i]; - if (popee.equals(value)) { - // pop & stop - target.pop(); - break; - } else { - // remember value to push back on - restore.add(target.pop()); - } - } - while (!restore.isEmpty()) { - IValue value = (IValue) restore.remove(restore.size() - 1); - target.push(value.getValueString()); - } - } catch (DebugException e) { - } - viewer.refresh(); - } - - /** - * Returns the debug target assocaited with the data view. - * - * @return the debug target assocaited with the data view - */ - protected PDADebugTarget getDebugTarget() { - TreeViewer viewer = (TreeViewer)fView.getViewer(); - return (PDADebugTarget) viewer.getInput(); - } -} diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushAction.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushAction.java deleted file mode 100644 index 8764cf3bc..000000000 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2007 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 - * Bjorn Freeman-Benson - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.examples.ui.pda.views; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.examples.core.pda.model.PDADebugTarget; -import org.eclipse.debug.examples.ui.pda.DebugUIPlugin; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.jface.window.Window; - - -/** - * Pushes a value onto the data stack. - */ -public class PushAction extends Action { - - private PDADebugTarget fTarget; - private DataStackView fView; - - /** - * Constructs an action to pop values off the stack - */ - protected PushAction(DataStackView view) { - super("Push"); - ImageRegistry imageRegistry = DebugUIPlugin.getDefault().getImageRegistry(); - setImageDescriptor(imageRegistry.getDescriptor(DebugUIPlugin.IMG_ELCL_PUSH)); - setDisabledImageDescriptor(imageRegistry.getDescriptor(DebugUIPlugin.IMG_DLCL_PUSH)); - setToolTipText("Push"); - setEnabled(false); - fView = view; - } - - public void run() { - InputDialog dialog = new InputDialog(fView.getSite().getShell(), "Specify Value", "Enter value to push", null, null); - if (dialog.open() == Window.OK) { - try { - fTarget.push(dialog.getValue()); - } catch (DebugException e) { - } - } - fView.getViewer().refresh(); - } - - protected void setDebugTarget(PDADebugTarget target) { - fTarget = target; - setEnabled(fTarget != null && fTarget.canPush()); - } - - -} |