Skip to content

Commit 84dfe5a

Browse files
committed
Fix FormEditor.dispose() calling super.dispose() first
Common pattern for init/dispose, setup/teardown is that on init, super is called first and on dispose last. This is always done this way to allow super class initialize whatever needed first and subclass work on that, and the dispose should always perform cleanup in the opposite direction. Otherwise super code might cleanup things that are still needed for the subclass to properly cleanup. Probably related to eclipse-pde/eclipse.pde#1963
1 parent 862d9d1 commit 84dfe5a

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor

1 file changed

+1
-1
lines changed

bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ public void editorDirtyStateChanged() {
400400
*/
401401
@Override
402402
public void dispose() {
403-
super.dispose();
404403
for (Object page : pages) {
405404
if (page instanceof IFormPage) {
406405
IFormPage fpage = (IFormPage) page;
@@ -417,6 +416,7 @@ public void dispose() {
417416
toolkit.dispose();
418417
toolkit = null;
419418
}
419+
super.dispose();
420420
}
421421

422422
/**

0 commit comments

Comments
 (0)