Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2016-06-29 09:26:18 -0400
committerAnton Leherbauer2016-06-30 03:23:45 -0400
commite1989aeda2b63c0e54432a1be7a8ad4b4e383241 (patch)
tree4883aac1097303ede984b5d0a832ed215a096bdf /target_explorer
parent9f5abdf29e7e13c39b9f5447a4782a40aa04b8e5 (diff)
downloadorg.eclipse.tcf-e1989aeda2b63c0e54432a1be7a8ad4b4e383241.tar.gz
org.eclipse.tcf-e1989aeda2b63c0e54432a1be7a8ad4b4e383241.tar.xz
org.eclipse.tcf-e1989aeda2b63c0e54432a1be7a8ad4b4e383241.zip
Target Explorer: Propagate FormToolkit to child controls
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/wire/network/NetworkCablePanel.java4
8 files changed, 22 insertions, 23 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java
index 4a6b63f0b..c9ab4b41d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
index ddb4423a4..761352e18 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
@@ -118,12 +118,12 @@ public class LaunchConfigurationMainTabSection extends AbstractSection implement
return true;
}
};
+ processImage.setFormToolkit(toolkit);
processImage.setEditFieldLabel(Messages.LaunchConfigurationMainTabSection_processImage_label);
processImage.setIsGroup(false);
processImage.setHideBrowseButton(false);
processImage.setAdjustBackgroundColor(true);
processImage.setParentControlIsInnerPanel(true);
- processImage.setFormToolkit(toolkit);
processImage.setupPanel(client);
processImage.doCreateControlDecoration(processImage.getEditFieldControl(), client);
@@ -138,6 +138,7 @@ public class LaunchConfigurationMainTabSection extends AbstractSection implement
return true;
}
};
+ processArguments.setFormToolkit(toolkit);
processArguments.setEditFieldLabel(Messages.LaunchConfigurationMainTabSection_processArguments_label);
processArguments.setIsGroup(false);
processArguments.setHideBrowseButton(true);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
index 54170464c..92d6b0097 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -144,6 +144,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
setControl(panel);
customTransportNameControl = doCreateCustomTransportNameControl(getParentControl().getParentPage());
+ customTransportNameControl.setFormToolkit(toolkit);
customTransportNameControl.setupPanel(panel);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
index 1cb541d94..63d71e576 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -143,6 +143,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
setControl(panel);
pipeNameControl = doCreatePipeNameControl(getParentControl().getParentPage());
+ pipeNameControl.setFormToolkit(toolkit);
pipeNameControl.setupPanel(panel);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
index 8c51dbb3b..7d4eb4a65 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -274,6 +274,7 @@ public class TcpTransportSection extends AbstractSection implements IDataExchang
section.setClient(client);
proxyControl = new BaseEditBrowseTextControl(null);
+ proxyControl.setFormToolkit(toolkit);
proxyControl.setParentControlIsInnerPanel(true);
proxyControl.setEditFieldLabel(Messages.TcpTransportSection_proxies_label);
proxyControl.setReadOnly(true);
@@ -283,10 +284,12 @@ public class TcpTransportSection extends AbstractSection implements IDataExchang
SWTControlUtil.setEnabled(proxyControl.getEditFieldControl(), false);
addressControl = new MyRemoteHostAddressControl();
+ addressControl.setFormToolkit(toolkit);
addressControl.setupPanel(client);
addressControl.getEditFieldControl().setFocus();
portControl = new MyRemoteHostPortControl();
+ portControl.setFormToolkit(toolkit);
portControl.setParentControlIsInnerPanel(true);
portControl.setupPanel(addressControl.getInnerPanelComposite());
portControl.setEditFieldControlText(getDefaultPort());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
index 60c2489a6..6ea01dc96 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
@@ -338,6 +338,7 @@ public class NewTargetWizardPage extends AbstractValidatingWizardPage implements
createEmptySpace(client, 5, 2, toolkit);
proxyControl = new BaseEditBrowseTextControl(null);
+ proxyControl.setFormToolkit(toolkit);
proxyControl.setParentControlIsInnerPanel(false);
proxyControl.setHideBrowseButton(true);
proxyControl.setReadOnly(true);
@@ -373,6 +374,7 @@ public class NewTargetWizardPage extends AbstractValidatingWizardPage implements
// Create and add the panels
TcpTransportPanel tcpTransportPanel = new TcpTransportPanel(transportTypePanelControl);
+ transportTypePanelControl.setFormToolkit(toolkit);
transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_TCP, tcpTransportPanel);
transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_SSL, tcpTransportPanel);
transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_PIPE, new PipeTransportPanel(transportTypePanelControl));
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
index e31511c1f..cb6e767db 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -490,16 +490,12 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
Assert.isNotNull(parent);
Composite innerPanel = null;
- FormToolkit toolkit = getFormToolkit();
if (isGroup()) {
innerPanel = new Group(parent, SWT.NONE);
- if (toolkit != null) {
- toolkit.adapt(innerPanel);
- }
((Group)innerPanel).setText(getGroupLabel());
} else {
- innerPanel = toolkit != null ? toolkit.createComposite(parent) : new Composite(parent, SWT.NONE);
+ innerPanel = new Composite(parent, SWT.NONE);
}
return innerPanel;
@@ -579,7 +575,7 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
FormToolkit toolkit = getFormToolkit();
if (!isLabelIsButton()) {
- labelControl = toolkit != null ? toolkit.createLabel(parent, null) : new Label(parent, SWT.NONE);
+ labelControl = new Label(parent, SWT.NONE);
} else {
labelControl = toolkit != null ? toolkit.createButton(parent, null, getLabelButtonStyle()) : new Button(parent, getLabelButtonStyle());
SWTControlUtil.setSelection((Button)labelControl, false);
@@ -822,9 +818,6 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
style |= SWT.READ_ONLY;
}
editField = new Combo(parent, doAdjustEditFieldControlStyles(style));
- if (toolkit != null) {
- toolkit.adapt((Combo)editField);
- }
((Combo)editField).addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@@ -1184,9 +1177,7 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
protected Button doCreateButtonControl(Composite parent) {
Assert.isNotNull(parent);
- FormToolkit toolkit = getFormToolkit();
-
- Button button = toolkit != null ? toolkit.createButton(parent, null, SWT.PUSH) : new Button(parent, SWT.PUSH);
+ Button button = new Button(parent, SWT.PUSH);
button.setText(getButtonLabel());
return button;
@@ -1252,12 +1243,10 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
isInitializing = true;
super.setupPanel(parent);
- FormToolkit toolkit = getFormToolkit();
-
// do we need a group or a plain composite
if (!isParentControlIsInnerPanel() || !(parent.getLayout() instanceof GridLayout)) {
// create the control most enclosing composite
- Composite composite = toolkit != null ? toolkit.createComposite(parent) : new Composite(parent, SWT.NONE);
+ Composite composite = new Composite(parent, SWT.NONE);
if (isAdjustBackgroundColor()) {
SWTControlUtil.setBackground(composite, parent.getBackground());
}
@@ -1295,7 +1284,7 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
Composite innerInnerPanel = innerPanel;
int numColumns = ((GridLayout)innerInnerPanel.getLayout()).numColumns;
if ((numColumns == 1 || numColumns == 2) && !isHideBrowseButton() && !isHideEditFieldControl()) {
- innerInnerPanel = toolkit != null ? toolkit.createComposite(innerPanel) : new Composite(innerPanel, SWT.NONE);
+ innerInnerPanel = new Composite(innerPanel, SWT.NONE);
if (isAdjustBackgroundColor()) {
SWTControlUtil.setBackground(innerInnerPanel, innerPanel.getBackground());
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/wire/network/NetworkCablePanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/wire/network/NetworkCablePanel.java
index 3879c86c2..3d293f7c5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/wire/network/NetworkCablePanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/wire/network/NetworkCablePanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2012, 2016 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -102,10 +102,12 @@ public class NetworkCablePanel extends AbstractWizardConfigurationPanel implemen
section.setClient(client);
addressControl = doCreateAddressControl(this);
+ addressControl.setFormToolkit(toolkit);
addressControl.setHasHistory(hasHistory());
addressControl.setupPanel(client);
portControl = doCreatePortControl(this);
+ portControl.setFormToolkit(toolkit);
portControl.setHasHistory(hasHistory());
portControl.setParentControlIsInnerPanel(true);
portControl.setupPanel(addressControl.getInnerPanelComposite());

Back to the top