Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2015-07-06 12:17:41 +0000
committerSebastian Struckmann2015-07-06 12:17:41 +0000
commitce120d712bc8e0916524af81232e970983cbbb54 (patch)
tree70a9468551703de0a7fd236cde517d65b8efcbf0 /org.eclipse.jubula.client.ui.rcp
parentc0ef6b1273fe8e7da95b0576c720146c45caa0b0 (diff)
downloadorg.eclipse.jubula.core-ce120d712bc8e0916524af81232e970983cbbb54.tar.gz
org.eclipse.jubula.core-ce120d712bc8e0916524af81232e970983cbbb54.tar.xz
org.eclipse.jubula.core-ce120d712bc8e0916524af81232e970983cbbb54.zip
Sprint task - Fix problem of not removed listeners, see http://eclip.se/470788
Diffstat (limited to 'org.eclipse.jubula.client.ui.rcp')
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractTestCaseEditor.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractTestCaseEditor.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractTestCaseEditor.java
index d7ea23ef7..bbd704754 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractTestCaseEditor.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractTestCaseEditor.java
@@ -120,6 +120,11 @@ import org.eclipse.ui.menus.CommandContributionItem;
@SuppressWarnings("synthetic-access")
public abstract class AbstractTestCaseEditor extends AbstractJBEditor
implements IParamChangedListener {
+
+ /** central test data update listener */
+ private CentralTestDataUpdateListener m_ctdUpdateListener =
+ new CentralTestDataUpdateListener();
+
/**
* Creates the initial Context of this Editor.<br>
* Subclasses may override this method.
@@ -149,8 +154,7 @@ public abstract class AbstractTestCaseEditor extends AbstractJBEditor
GuiEventDispatcher.getInstance()
.addEditorDirtyStateListener(this, true);
- ded.addDataChangedListener(
- new CentralTestDataUpdateListener(), false);
+ ded.addDataChangedListener(m_ctdUpdateListener, false);
ded.addParamChangedListener(this, true);
}
@@ -717,6 +721,8 @@ public abstract class AbstractTestCaseEditor extends AbstractJBEditor
public void dispose() {
try {
DataEventDispatcher ded = DataEventDispatcher.getInstance();
+ ded.removeParamChangedListener(this);
+ ded.removeDataChangedListener(m_ctdUpdateListener);
if (CAPRecordedCommand.getRecordListener() == this) {
CAPRecordedCommand.setRecordListener(null);
TestExecutionContributor.getInstance().getClientTest()
@@ -727,7 +733,6 @@ public abstract class AbstractTestCaseEditor extends AbstractJBEditor
ded.fireRecordModeStateChanged(RecordModeState.notRunning);
removeGlobalActionHandler();
}
- ded.removeParamChangedListener(this);
} finally {
super.dispose();
}

Back to the top