diff --git a/features/org.eclipse.tcf.te.terminals.feature/feature.xml b/features/org.eclipse.tcf.te.terminals.feature/feature.xml index 05d5cef4d4f..216902dd490 100644 --- a/features/org.eclipse.tcf.te.terminals.feature/feature.xml +++ b/features/org.eclipse.tcf.te.terminals.feature/feature.xml @@ -30,7 +30,7 @@ - + @@ -41,7 +41,6 @@ - + - - null. - */ - public final void setFormToolkit(FormToolkit toolkit) { - this.toolkit = toolkit; - } - - /** - * Returns the form toolkit used for creating the control widgets. - * - * @return The form toolkit instance or null. - */ - public final FormToolkit getFormToolkit() { - return toolkit; - } - /* (non-Javadoc) * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer#validate() */ @@ -167,13 +146,9 @@ public class ConfigurationPanelControl implements IConfigurationPanelContainer, * To be called from the embedding control to setup the controls UI elements. * * @param parent The parent control. Must not be null! - * @param toolkit The form toolkit. Must not be null. */ - public void setupPanel(Composite parent, String[] configurationPanelKeys, FormToolkit toolkit) { + public void setupPanel(Composite parent, String[] configurationPanelKeys) { Assert.isNotNull(parent); - Assert.isNotNull(toolkit); - - setFormToolkit(toolkit); if (isPanelIsGroup()) { panel = new Group(parent, SWT.NONE); @@ -188,8 +163,8 @@ public class ConfigurationPanelControl implements IConfigurationPanelContainer, panelLayout = new StackLayout(); panel.setLayout(panelLayout); - setupConfigurationPanels(panel, configurationPanelKeys, toolkit); - EMPTY_PANEL.setupPanel(panel, toolkit); + setupConfigurationPanels(panel, configurationPanelKeys); + EMPTY_PANEL.setupPanel(panel); } /** @@ -255,17 +230,15 @@ public class ConfigurationPanelControl implements IConfigurationPanelContainer, * * @param parent The parent composite to use for the configuration panels. Must not be null! * @param configurationPanelKeys The list of configuration panels to initialize. Might be null or empty! - * @param toolkit The form toolkit. Must not be null. */ - public void setupConfigurationPanels(Composite parent, String[] configurationPanelKeys, FormToolkit toolkit) { + public void setupConfigurationPanels(Composite parent, String[] configurationPanelKeys) { Assert.isNotNull(parent); - Assert.isNotNull(toolkit); if (configurationPanelKeys != null) { for (int i = 0; i < configurationPanelKeys.length; i++) { IConfigurationPanel configPanel = getConfigurationPanel(configurationPanelKeys[i]); Assert.isNotNull(configPanel); - configPanel.setupPanel(parent, toolkit); + configPanel.setupPanel(parent); } } } diff --git a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java index 60eb8d0d3ab..a39ad7ade42 100644 --- a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java +++ b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java @@ -15,7 +15,6 @@ import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.forms.widgets.FormToolkit; /** * Terminal launcher configuration panel. @@ -37,9 +36,8 @@ public interface IConfigurationPanel extends IMessageProvider { * different panels if the selected terminal launcher changed. * * @param parent The parent composite to create the UI elements in. Must not be null. - * @param toolkit The form toolkit. Must not be null. */ - public void setupPanel(Composite parent, FormToolkit toolkit); + public void setupPanel(Composite parent); /** * Cleanup all resources the wizard configuration panel might have been created. diff --git a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/EncodingSelectionDialog.java b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/EncodingSelectionDialog.java index 628d8902e77..dc49648bd26 100644 --- a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/EncodingSelectionDialog.java +++ b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/EncodingSelectionDialog.java @@ -23,7 +23,6 @@ import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer; import org.eclipse.tcf.te.ui.terminals.nls.Messages; import org.eclipse.tcf.te.ui.terminals.panels.AbstractExtendedConfigurationPanel; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.forms.widgets.FormToolkit; /** * Encoding selection dialog implementation. @@ -52,10 +51,10 @@ public class EncodingSelectionDialog extends TrayDialog { } /* (non-Javadoc) - * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) + * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite) */ @Override - public void setupPanel(Composite parent, FormToolkit toolkit) { + public void setupPanel(Composite parent) { Composite panel = new Composite(parent, SWT.NONE); panel.setLayout(new GridLayout()); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); @@ -179,7 +178,7 @@ public class EncodingSelectionDialog extends TrayDialog { panel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true)); encodingPanel = new EncodingPanel(null); - encodingPanel.setupPanel(panel, null); + encodingPanel.setupPanel(panel); applyDialogFont(panel); } diff --git a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java index e265264d6f8..cc9ae1b8fb2 100644 --- a/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java +++ b/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java @@ -46,7 +46,6 @@ import org.eclipse.tcf.te.ui.terminals.interfaces.tracing.ITraceIds; import org.eclipse.tcf.te.ui.terminals.launcher.LauncherDelegateManager; import org.eclipse.tcf.te.ui.terminals.nls.Messages; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.forms.widgets.FormToolkit; /** * Launch terminal settings dialog implementation. @@ -61,8 +60,6 @@ public class LaunchTerminalSettingsDialog extends TrayDialog { /* default */ Combo terminals; /* default */ SettingsPanelControl settings; - private FormToolkit toolkit = null; - // Map the label added to the combo box to the corresponding launcher delegate. /* default */ final Map label2delegate = new HashMap(); @@ -111,7 +108,7 @@ public class LaunchTerminalSettingsDialog extends TrayDialog { // Push the selection to the configuration panel configPanel.setSelection(getSelection()); // Create the panel controls - configPanel.setupPanel(getPanel(), getFormToolkit()); + configPanel.setupPanel(getPanel()); // Restore widget values IDialogSettings dialogSettings = LaunchTerminalSettingsDialog.this.settings.getDialogSettings(LaunchTerminalSettingsDialog.this.getDialogSettings()); IDialogSettings configPanelSettings = dialogSettings != null ? dialogSettings.getSection(key) : null; @@ -189,7 +186,6 @@ public class LaunchTerminalSettingsDialog extends TrayDialog { */ protected void dispose() { if (settings != null) { settings.dispose(); settings = null; } - if (toolkit != null) { toolkit.dispose(); toolkit = null; } dialogSettings = null; } @@ -342,10 +338,8 @@ public class LaunchTerminalSettingsDialog extends TrayDialog { } } - // Create the toolkit - toolkit = new FormToolkit(panel.getDisplay()); // Setup the panel control - settings.setupPanel(panel, terminals.getItems(), toolkit); + settings.setupPanel(panel, terminals.getItems()); GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true); layoutData.horizontalSpan = 2; settings.getPanel().setLayoutData(layoutData);