mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
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>
This commit is contained in:
parent
6c9fc29303
commit
8f50caf134
3 changed files with 25 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue