Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2013-07-15 11:26:49 +0000
committerAnton Leherbauer2013-07-15 11:26:49 +0000
commitd8157b008a26698acf4e444318a453f40110cb34 (patch)
treec2a7d597eae841e79d4bf11690396b93a4d54e4f
parent4e8c2ecad56f68712c7fb2035ecf8006aeb8ab4f (diff)
downloadorg.eclipse.cdt-d8157b008a26698acf4e444318a453f40110cb34.tar.gz
org.eclipse.cdt-d8157b008a26698acf4e444318a453f40110cb34.tar.xz
org.eclipse.cdt-d8157b008a26698acf4e444318a453f40110cb34.zip
Bug 412949 - Double clicking in Disassembly leaks a listener
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
index 1e56cfd7200..38ed0aca955 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * Copyright (c) 2009, 2013 Wind River Systems, Inc. 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
@@ -38,16 +38,20 @@ public class RulerToggleBreakpointHandler extends AbstractHandler {
final IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) part.getAdapter(IVerticalRulerInfo.class);
if (rulerInfo != null) {
final ToggleBreakpointAction toggleBpAction= new ToggleBreakpointAction(part, document, rulerInfo);
- toggleBpAction.update();
- if (toggleBpAction.isEnabled()) {
- if (event.getTrigger() instanceof Event) {
- // Pass through the event that triggered the action.
- // This will give toggle action access to key modifiers
- // (shift, ctrl, etc.)
- toggleBpAction.runWithEvent((Event)event.getTrigger());
- } else {
- toggleBpAction.run();
- }
+ try {
+ toggleBpAction.update();
+ if (toggleBpAction.isEnabled()) {
+ if (event.getTrigger() instanceof Event) {
+ // Pass through the event that triggered the action.
+ // This will give toggle action access to key modifiers
+ // (shift, ctrl, etc.)
+ toggleBpAction.runWithEvent((Event)event.getTrigger());
+ } else {
+ toggleBpAction.run();
+ }
+ }
+ } finally {
+ toggleBpAction.dispose();
}
}
}

Back to the top