Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-03-30 23:50:31 +0000
committerPawel Piech2012-03-30 23:50:31 +0000
commit11b41a7de12d45ce028d0665d3bb931236e09574 (patch)
tree10f89bc58f1d39339ee95cb97f612f6662bef255
parent895fcfdf948e3c31a7bb2fc4aa2e1e6671d780e0 (diff)
downloadeclipse.platform.debug-11b41a7de12d45ce028d0665d3bb931236e09574.tar.gz
eclipse.platform.debug-11b41a7de12d45ce028d0665d3bb931236e09574.tar.xz
eclipse.platform.debug-11b41a7de12d45ce028d0665d3bb931236e09574.zip
Bug 375351 - [debug view] Copy Stack action in Debug view returns wrong label
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java1
2 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index 51502945c..1a8c6789b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -213,6 +213,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
SWT.VIRTUAL,
makeVirtualPresentationContext(clientViewer.getPresentationContext()),
validator);
+ virtualViewer.setFilters(clientViewer.getFilters());
virtualViewer.addLabelUpdateListener(listener);
virtualViewer.getTree().addItemListener(listener);
virtualViewer.setInput(input);
@@ -235,6 +236,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
Tree parentTree = selection[i].getParent();
index = parentTree.indexOf(selection[i]);
}
+ index = ((ITreeModelContentProvider)clientViewer.getContentProvider()).viewToModelIndex(parentPath, index);
vSelection.add( parentVItem.getItem(new Index(index)) );
}
}
@@ -254,7 +256,6 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
*/
public void run(final IAction action) {
if (fClientViewer.getSelection().isEmpty()) {
- writeBufferToClipboard(new StringBuffer(""));
return;
}
@@ -319,6 +320,8 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
protected void writeBufferToClipboard(StringBuffer buffer) {
+ if (buffer.length() == 0) return;
+
TextTransfer plainTextTransfer = TextTransfer.getInstance();
Clipboard clipboard= new Clipboard(fClientViewer.getControl().getDisplay());
try {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
index 08fc6ee63..47a2d47f7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
@@ -159,6 +159,7 @@ public class VirtualFindAction extends Action implements IUpdate {
clientViewer.getDisplay(),
SWT.NONE,
makeVirtualPresentationContext(clientViewer.getPresentationContext()));
+ fVirtualViewer.setFilters(clientViewer.getFilters());
fVirtualViewer.addViewerUpdateListener(listener);
fVirtualViewer.addLabelUpdateListener(listener);
fVirtualViewer.setInput(input);

Back to the top