diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEEnvironmentTab.java')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEEnvironmentTab.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEEnvironmentTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEEnvironmentTab.java new file mode 100644 index 000000000..981c56593 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEEnvironmentTab.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2015 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 + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.te.tcf.launch.cdt.tabs; + +import org.eclipse.debug.ui.EnvironmentTab; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; + +/** + * Launch config tab to specify environment variables for the remote process. + */ +public class TEEnvironmentTab extends EnvironmentTab { + + @Override + public void createControl(Composite parent) { + super.createControl(parent); + + // Hide unwanted controls + hide(appendEnvironment); + hide(replaceEnvironment); + hide(envSelectButton); + } + + @Override + public String getId() { + return "org.eclipse.tcf.te.remotecdt.debug.environmentTab"; //$NON-NLS-1$ + } + + private void hide(Control ctrl) { + if (ctrl != null) { + ctrl.setVisible(false); + Object layoutData = ctrl.getLayoutData(); + if (layoutData instanceof GridData) { + GridData gd = (GridData) layoutData; + gd.exclude = true; + } + } + } + +} |