Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Medeiros2017-01-25 13:28:16 +0000
committerGerrit Code Review @ Eclipse.org2017-01-30 17:41:59 +0000
commit5c93171cbcc689fa9255f5f4d1db41d5e3e45ffc (patch)
treedf2214fd338eb40563dd1cc39387f39a0096a8d3 /debug/org.eclipse.cdt.debug.ui/src
parentd45c67967abca38c187d8e6920e801ea75a6e9bb (diff)
downloadorg.eclipse.cdt-5c93171cbcc689fa9255f5f4d1db41d5e3e45ffc.tar.gz
org.eclipse.cdt-5c93171cbcc689fa9255f5f4d1db41d5e3e45ffc.tar.xz
org.eclipse.cdt-5c93171cbcc689fa9255f5f4d1db41d5e3e45ffc.zip
Bug 511029 - Debug views become permanently pinned...
... if they are closed and reopened whilst pinned. This was because IPartListener2 was being removed before #partClosed() was called. Change-Id: I16de016387131b775237b5d61639bb32107231fe Signed-off-by: Bruno Medeiros <bruno.do.medeiros@gmail.com>
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui/src')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
index 8cfaa085c61..ec5c5a1286d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
@@ -145,10 +145,7 @@ public class PinDebugContextActionDelegate implements IViewActionDelegate, IActi
public void partClosed(IWorkbenchPartReference partRef) {
IWorkbenchPart part = partRef.getPart(false);
if (part.equals(fPart)) {
- if (fAction.isChecked()) {
- DebugEventFilterService.getInstance().removeDebugEventFilter(fPart);
- fAction.setChecked(false);
- }
+ unpinPart();
}
}
@Override
@@ -174,6 +171,14 @@ public class PinDebugContextActionDelegate implements IViewActionDelegate, IActi
public void dispose() {
DebugUITools.removePartDebugContextListener(fPart.getSite(), this);
fPart.getSite().getWorkbenchWindow().getPartService().removePartListener(fPartListener);
+ unpinPart();
+ }
+
+ protected void unpinPart() {
+ if (fAction.isChecked()) {
+ DebugEventFilterService.getInstance().removeDebugEventFilter(fPart);
+ fAction.setChecked(false);
+ }
}
protected ISelection getActiveDebugContext() {

Back to the top