diff options
author | Darin Wright | 2010-03-18 13:34:26 +0000 |
---|---|---|
committer | Darin Wright | 2010-03-18 13:34:26 +0000 |
commit | e495846db319468345a25e8cb5e96c807570ab1c (patch) | |
tree | 803e74e471ec77532377bbf4f8178a6cc3123121 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints | |
parent | cfc501054dfcf9a88fe6650e770413cc92acd9ed (diff) | |
download | eclipse.platform.debug-e495846db319468345a25e8cb5e96c807570ab1c.tar.gz eclipse.platform.debug-e495846db319468345a25e8cb5e96c807570ab1c.tar.xz eclipse.platform.debug-e495846db319468345a25e8cb5e96c807570ab1c.zip |
Bug 299963 - [Breakpoints] Copy and Paste keybindings don't work in condition detail pane
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints')
3 files changed, 21 insertions, 22 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java index ae4273452..817e9a730 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 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 @@ -12,6 +12,7 @@ package org.eclipse.debug.internal.ui.views.breakpoints; import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.util.TransferDragSourceListener; import org.eclipse.jface.viewers.AbstractTreeViewer; import org.eclipse.jface.viewers.ISelection; @@ -22,7 +23,6 @@ import org.eclipse.swt.dnd.DragSourceAdapter; import org.eclipse.swt.dnd.DragSourceEvent; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.widgets.Item; -import org.eclipse.ui.views.navigator.LocalSelectionTransfer; /** * A drag adapter for the breakpoints viewer @@ -56,7 +56,7 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe * @see TransferDragSourceListener#getTransfer */ public Transfer getTransfer() { - return LocalSelectionTransfer.getInstance(); + return LocalSelectionTransfer.getTransfer(); } /* non Java-doc @@ -64,8 +64,8 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe */ public void dragStart(DragSourceEvent event) { ISelection selection = fViewer.getSelection(); - LocalSelectionTransfer.getInstance().setSelection(selection); - LocalSelectionTransfer.getInstance().setSelectionSetTime(event.time & 0xFFFFFFFFL); + LocalSelectionTransfer.getTransfer().setSelection(selection); + LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL); if (fViewer instanceof BreakpointsViewer) { BreakpointsViewer viewer = (BreakpointsViewer)fViewer; fItems = viewer.getSelectedItems(); @@ -87,7 +87,7 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe // For consistency set the data to the selection even though // the selection is provided by the LocalSelectionTransfer // to the drop target adapter. - event.data = LocalSelectionTransfer.getInstance().getSelection(); + event.data = LocalSelectionTransfer.getTransfer().getSelection(); } /* non Java-doc @@ -104,7 +104,7 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe } } fItems = null; - LocalSelectionTransfer.getInstance().setSelection(null); - LocalSelectionTransfer.getInstance().setSelectionSetTime(0); + LocalSelectionTransfer.getTransfer().setSelection(null); + LocalSelectionTransfer.getTransfer().setSelectionSetTime(0); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java index 1cf985096..422cea9c6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 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 @@ -14,6 +14,7 @@ package org.eclipse.debug.internal.ui.views.breakpoints; import java.util.ArrayList; import java.util.List; +import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeSelection; @@ -24,7 +25,6 @@ import org.eclipse.swt.dnd.DropTargetEvent; import org.eclipse.swt.dnd.TransferData; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.TreeItem; -import org.eclipse.ui.views.navigator.LocalSelectionTransfer; /** * BreakpointsDropAdapter @@ -54,12 +54,12 @@ public class BreakpointsDropAdapter extends ViewerDropAdapter { public boolean performDrop(Object data) { // This is temporary if (getViewer() instanceof BreakpointsViewer) { - return ((BreakpointsViewer)getViewer()).performDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getInstance().getSelection()); + return ((BreakpointsViewer)getViewer()).performDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection()); } else if (fView != null) { - ISelection selection = LocalSelectionTransfer.getInstance().getSelection(); + ISelection selection = LocalSelectionTransfer.getTransfer().getSelection(); if (fPath != null && selection instanceof ITreeSelection) { if (selection instanceof ITreeSelection) { - return fView.performDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getInstance().getSelection()); + return fView.performDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getTransfer().getSelection()); } } } @@ -91,12 +91,12 @@ public class BreakpointsDropAdapter extends ViewerDropAdapter { public boolean validateDrop(Object target, int operation, TransferData transferType) { // This is temporary if (getViewer() instanceof BreakpointsViewer) { - return ((BreakpointsViewer)getViewer()).canDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getInstance().getSelection()); + return ((BreakpointsViewer)getViewer()).canDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection()); } else { - ISelection selection = LocalSelectionTransfer.getInstance().getSelection(); + ISelection selection = LocalSelectionTransfer.getTransfer().getSelection(); if (fPath != null && selection instanceof ITreeSelection) { if (selection instanceof ITreeSelection) { - return fView.canDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getInstance().getSelection()); + return fView.canDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getTransfer().getSelection()); } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java index d31ebecc2..b77bec40d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java @@ -54,6 +54,7 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.Separator; +import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeSelection; @@ -72,9 +73,7 @@ import org.eclipse.ui.IMemento; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.actions.SelectionListenerAction; -import org.eclipse.ui.views.navigator.LocalSelectionTransfer; /** * This class implements the breakpoints view. @@ -198,7 +197,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager menu.add(getAction(ACTION_GOTO_MARKER)); menu.add(new Separator(IDebugUIConstants.EMPTY_BREAKPOINT_GROUP)); menu.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP)); - menu.add(getAction(ActionFactory.PASTE.getCommandId())); + menu.add(getAction(PASTE_ACTION)); IAction action = getAction(ACTION_REMOVE_FROM_GROUP); if (action != null && action.isEnabled()) { menu.add(action); @@ -228,7 +227,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager fClipboard = new Clipboard(getSite().getShell().getDisplay()); PasteBreakpointsAction paste = new PasteBreakpointsAction(this); - configure(paste, ActionFactory.PASTE.getCommandId(), ActionFactory.PASTE.getCommandId(), ISharedImages.IMG_TOOL_PASTE); + configure(paste, PASTE_ACTION, PASTE_ACTION, ISharedImages.IMG_TOOL_PASTE); SelectionListenerAction remove = new RemoveFromWorkingSetAction(this); setAction(ACTION_REMOVE_FROM_GROUP, remove); @@ -395,9 +394,9 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager protected void initDragAndDrop(TreeModelViewer viewer) { int ops = DND.DROP_MOVE | DND.DROP_COPY; // drop - viewer.addDropSupport(ops, new Transfer[] {LocalSelectionTransfer.getInstance()}, new BreakpointsDropAdapter(viewer, this)); + viewer.addDropSupport(ops, new Transfer[] {LocalSelectionTransfer.getTransfer()}, new BreakpointsDropAdapter(viewer, this)); // Drag - viewer.addDragSupport(ops, new Transfer[] {LocalSelectionTransfer.getInstance()}, new BreakpointsDragAdapter(viewer, this)); + viewer.addDragSupport(ops, new Transfer[] {LocalSelectionTransfer.getTransfer()}, new BreakpointsDragAdapter(viewer, this)); } /* |