Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java104
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationAdvancedTabSection.java195
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java4
4 files changed, 289 insertions, 75 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java
index 4de800024..46e49de4d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java
@@ -1,48 +1,56 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.ui.nls;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * TCF Launch UI Plug-in externalized strings management.
- */
-public class Messages extends NLS {
-
- // The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.launch.ui.nls.Messages"; //$NON-NLS-1$
-
- /**
- * Static constructor.
- */
- static {
- // Load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- // **** Declare externalized string id's down here *****
-
- public static String LaunchConfigurationMainTabSection_title;
- public static String LaunchConfigurationMainTabSection_processArguments_label;
- public static String LaunchConfigurationMainTabSection_processImage_label;
- public static String LaunchConfigurationMainTabSection_error_missingProcessImage;
-
- public static String AddEditFileTransferDialog_add_dialogTitle;
- public static String AddEditFileTransferDialog_edit_dialogTitle;
- public static String AddEditFileTransferDialog_add_title;
- public static String AddEditFileTransferDialog_edit_title;
- public static String AddEditFileTransferDialog_add_message;
- public static String AddEditFileTransferDialog_edit_message;
- public static String AddEditFileTransferDialog_target_label;
- public static String AddEditFileTransferDialog_host_label;
- public static String AddEditFileTransferDialog_options_label;
- public static String AddEditFileTransferDialog_toHost_checkbox;
- public static String AddEditFileTransferDialog_toTarget_checkbox;
-}
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 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.ui.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TCF Launch UI Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.launch.ui.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String LaunchConfigurationMainTabSection_title;
+ public static String LaunchConfigurationMainTabSection_processArguments_label;
+ public static String LaunchConfigurationMainTabSection_processImage_label;
+ public static String LaunchConfigurationMainTabSection_error_missingProcessImage;
+
+ public static String AddEditFileTransferDialog_add_dialogTitle;
+ public static String AddEditFileTransferDialog_edit_dialogTitle;
+ public static String AddEditFileTransferDialog_add_title;
+ public static String AddEditFileTransferDialog_edit_title;
+ public static String AddEditFileTransferDialog_add_message;
+ public static String AddEditFileTransferDialog_edit_message;
+ public static String AddEditFileTransferDialog_target_label;
+ public static String AddEditFileTransferDialog_host_label;
+ public static String AddEditFileTransferDialog_options_label;
+ public static String AddEditFileTransferDialog_toHost_checkbox;
+ public static String AddEditFileTransferDialog_toTarget_checkbox;
+
+ public static String LaunchConfigurationAdvancedTabSection_title;
+ public static String LaunchConfigurationAdvancedTabSection_group_label;
+ public static String LaunchConfigurationAdvancedTabSection_lineseparator_label;
+ public static String LaunchConfigurationAdvancedTabSection_lineseparator_default;
+ public static String LaunchConfigurationAdvancedTabSection_lineseparator_lf;
+ public static String LaunchConfigurationAdvancedTabSection_lineseparator_crlf;
+ public static String LaunchConfigurationAdvancedTabSection_lineseparator_cr;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
index c6fbbaa18..60f850f4e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
@@ -1,27 +1,34 @@
-###############################################################################
-# Copyright (c) 2012 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
-###############################################################################
-
-LaunchConfigurationMainTabSection_title = Process
-LaunchConfigurationMainTabSection_processImage_label = Image:
-LaunchConfigurationMainTabSection_processArguments_label = Arguments:
-LaunchConfigurationMainTabSection_error_missingProcessImage = Please select or enter a process image.
-
-AddEditFileTransferDialog_add_dialogTitle = Add
-AddEditFileTransferDialog_edit_dialogTitle = Edit
-AddEditFileTransferDialog_add_title = Add new file transfer
-AddEditFileTransferDialog_edit_title = Edit existing file transfer
-AddEditFileTransferDialog_add_message = Please enter the host and traget file/directory.
-AddEditFileTransferDialog_edit_message = Change the host or target file/directory or the direction.
-AddEditFileTransferDialog_target_label = Target:
-AddEditFileTransferDialog_host_label = Host:
-AddEditFileTransferDialog_options_label = Options:
-AddEditFileTransferDialog_toHost_checkbox = Transfer from Target to Host
-AddEditFileTransferDialog_toTarget_checkbox = Transfer from Host to Target
- \ No newline at end of file
+###############################################################################
+# Copyright (c) 2012 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
+###############################################################################
+
+LaunchConfigurationMainTabSection_title = Process
+LaunchConfigurationMainTabSection_processImage_label = Image:
+LaunchConfigurationMainTabSection_processArguments_label = Arguments:
+LaunchConfigurationMainTabSection_error_missingProcessImage = Please select or enter a process image.
+
+AddEditFileTransferDialog_add_dialogTitle = Add
+AddEditFileTransferDialog_edit_dialogTitle = Edit
+AddEditFileTransferDialog_add_title = Add new file transfer
+AddEditFileTransferDialog_edit_title = Edit existing file transfer
+AddEditFileTransferDialog_add_message = Please enter the host and target file/directory.
+AddEditFileTransferDialog_edit_message = Change the host or target file/directory or the direction.
+AddEditFileTransferDialog_target_label = Target:
+AddEditFileTransferDialog_host_label = Host:
+AddEditFileTransferDialog_options_label = Options:
+AddEditFileTransferDialog_toHost_checkbox = Transfer from Target to Host
+AddEditFileTransferDialog_toTarget_checkbox = Transfer from Host to Target
+
+LaunchConfigurationAdvancedTabSection_title=Advanced
+LaunchConfigurationAdvancedTabSection_group_label=Line Separator Settings
+LaunchConfigurationAdvancedTabSection_lineseparator_label=Please specify the line separator used by the launched process.
+LaunchConfigurationAdvancedTabSection_lineseparator_default=Default
+LaunchConfigurationAdvancedTabSection_lineseparator_lf=LF
+LaunchConfigurationAdvancedTabSection_lineseparator_crlf=CRLF
+LaunchConfigurationAdvancedTabSection_lineseparator_cr=CR
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationAdvancedTabSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationAdvancedTabSection.java
new file mode 100644
index 000000000..4e08f673f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationAdvancedTabSection.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.ui.remote.app;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
+import org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.tcf.launch.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * Remote application advanced properties section implementation.
+ */
+public class LaunchConfigurationAdvancedTabSection extends AbstractSection implements ILaunchConfigurationTabFormPart {
+ /* default */ Button lineSeparatorDefault;
+ /* default */ Button lineSeparatorLF;
+ /* default */ Button lineSeparatorCRLF;
+ /* default */ Button lineSeparatorCR;
+
+ /**
+ * Constructor.
+ *
+ * @param form The parent managed form. Must not be <code>null</code>.
+ * @param parent The parent composite. Must not be <code>null</code>.
+ */
+ public LaunchConfigurationAdvancedTabSection(IManagedForm form, Composite parent) {
+ super(form, parent, ExpandableComposite.TWISTIE);
+ getSection().setBackground(parent.getBackground());
+ createClient(getSection(), form.getToolkit());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ protected void createClient(final Section section, FormToolkit toolkit) {
+ Assert.isNotNull(section);
+ Assert.isNotNull(toolkit);
+
+ // Configure the section
+ section.setText(Messages.LaunchConfigurationAdvancedTabSection_title);
+ section.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL, SWT.CENTER, true, false));
+
+ // Create the section client
+ Composite client = createClientContainer(section, 1, toolkit);
+ Assert.isNotNull(client);
+ GridLayout layout = new GridLayout();
+ layout.marginLeft = 0; layout.marginHeight = 0;
+ client.setLayout(layout);
+ section.setClient(client);
+ client.setBackground(section.getBackground());
+
+ Group group = new Group(client, SWT.NONE);
+ group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ group.setText(Messages.LaunchConfigurationAdvancedTabSection_group_label);
+ group.setLayout(new GridLayout());
+
+ Label label = new Label(group, SWT.NONE);
+ label.setText(Messages.LaunchConfigurationAdvancedTabSection_lineseparator_label);
+ label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ Composite panel2 = new Composite(group, SWT.NONE);
+ layout = new GridLayout(4, false);
+ layout.marginLeft = 15; layout.marginHeight = 2;
+ panel2.setLayout(layout);
+ panel2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ lineSeparatorDefault = new Button(panel2, SWT.RADIO);
+ lineSeparatorDefault.setText(Messages.LaunchConfigurationAdvancedTabSection_lineseparator_default);
+ lineSeparatorDefault.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorLF = new Button(panel2, SWT.RADIO);
+ lineSeparatorLF.setText(Messages.LaunchConfigurationAdvancedTabSection_lineseparator_lf);
+ lineSeparatorLF.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorCRLF = new Button(panel2, SWT.RADIO);
+ lineSeparatorCRLF.setText(Messages.LaunchConfigurationAdvancedTabSection_lineseparator_crlf);
+ lineSeparatorCRLF.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorCR = new Button(panel2, SWT.RADIO);
+ lineSeparatorCR.setText(Messages.LaunchConfigurationAdvancedTabSection_lineseparator_cr);
+ lineSeparatorCR.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ }
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ Assert.isNotNull(configuration);
+
+ String lineSeparator = DefaultPersistenceDelegate.getAttribute(configuration, ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, (String)null);
+ if (lineSeparator == null) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_LF.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorLF, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_CRLF.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorCRLF, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_CR.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorCR, true);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ Assert.isNotNull(configuration);
+
+ String lineSeparator = null;
+ if (SWTControlUtil.getSelection(lineSeparatorLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_LF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCRLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CRLF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCR)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CR;
+ }
+ DefaultPersistenceDelegate.setAttribute(configuration, ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, lineSeparator);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration configuration) {
+ return true;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
index 70f0f7056..44eada05c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
@@ -40,6 +40,10 @@ public class LaunchConfigurationMainTab extends AbstractLaunchContextMainTab {
LaunchConfigurationMainTabSection section = new LaunchConfigurationMainTabSection(form, panel);
section.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
form.addPart(section);
+
+ LaunchConfigurationAdvancedTabSection advSection = new LaunchConfigurationAdvancedTabSection(form, panel);
+ advSection.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
+ form.addPart(advSection);
}
/* (non-Javadoc)

Back to the top