summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormhussein2012-07-09 12:29:24 (EDT)
committerMikhail Khodjaiants2012-07-09 12:33:47 (EDT)
commit8f50caf1349944352b9478a6c433940b69c0dcb7 (patch)
tree91026c87e3b2d643326f882b52435dd77c68f8a1
parent6c9fc2930334e4fa19dec5ceb42d56fe6d48041a (diff)
downloadorg.eclipse.cdt-8f50caf1349944352b9478a6c433940b69c0dcb7.zip
org.eclipse.cdt-8f50caf1349944352b9478a6c433940b69c0dcb7.tar.gz
org.eclipse.cdt-8f50caf1349944352b9478a6c433940b69c0dcb7.tar.bz2
Bug 383988
Minor Refactoring to add a method to create external server debug configuration widgets that can be overriden. Add missing dispose method. Update1: add super.dispose Change-Id: I2691d6f64dcd234e966779d30e276ff3f4752fe5 Reviewed-on: https://git.eclipse.org/r/6570 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java7
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java5
3 files changed, 25 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
index 16a0852..9dff20d 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
@@ -19,7 +19,6 @@ import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.layout.GridData;
@@ -68,15 +67,19 @@ public class GDBServerDebuggerPage extends StandardGDBDebuggerPage {
Composite comp = ControlFactory.createCompositeEx( comp1, 2, GridData.FILL_BOTH );
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
comp.setFont( comp1.getFont() );
+
+ createConnectionWidgets(comp);
+ }
+
+ protected void createConnectionWidgets(Composite comp) {
fConnectionField.doFillIntoGrid( comp, 2 );
((GridData)fConnectionField.getComboControl( null ).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
- PixelConverter converter = new PixelConverter( comp );
fConnectionStack = ControlFactory.createCompositeEx( comp, 1, GridData.FILL_BOTH );
StackLayout stackLayout = new StackLayout();
fConnectionStack.setLayout( stackLayout );
((GridData)fConnectionStack.getLayoutData()).horizontalSpan = 2;
fTCPBlock.createBlock( fConnectionStack );
- fSerialBlock.createBlock( fConnectionStack );
+ fSerialBlock.createBlock( fConnectionStack );
}
private ComboDialogField createConnectionField() {
@@ -189,4 +192,12 @@ public class GDBServerDebuggerPage extends StandardGDBDebuggerPage {
super.createTabs( tabFolder );
createConnectionTab( tabFolder );
}
+
+ public void dispose() {
+ fTCPBlock.dispose();
+ fSerialBlock.dispose();
+ fConnectionStack.dispose();
+ fConnectionField.dispose();
+ super.dispose();
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
index e8e2674..6356ec4 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/ComboDialogField.java
@@ -231,4 +231,11 @@ public class ComboDialogField extends DialogField {
}
}
+ public void dispose() {
+ if (fComboControl != null) fComboControl.dispose();
+ if (fItems != null) fItems = null;
+ if (fModifyListener != null) fModifyListener = null;
+ super.dispose();
+ }
+
} \ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
index 92cbd33..c5b9947 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/dialogfields/DialogField.java
@@ -222,7 +222,10 @@ public class DialogField {
Assert.isTrue(nColumns >= getNumberOfControls(), "given number of columns is too small"); //$NON-NLS-1$
}
-
+ public void dispose() {
+ if (fLabel != null) fLabel.dispose();
+ if (fDialogFieldListener != null) fDialogFieldListener = null;
+ }
} \ No newline at end of file