Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-09-23 09:25:08 +0000
committerUwe Stieber2012-09-23 09:25:08 +0000
commit50667276e28a0e2007dd2121aecc11fd76cc2dbe (patch)
tree34eeda419dd60fd44ff59db4bf654221c451386c /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parentbd7ea3854de6b5c022c2437de42ae14245bcd682 (diff)
downloadorg.eclipse.tcf-50667276e28a0e2007dd2121aecc11fd76cc2dbe.tar.gz
org.eclipse.tcf-50667276e28a0e2007dd2121aecc11fd76cc2dbe.tar.xz
org.eclipse.tcf-50667276e28a0e2007dd2121aecc11fd76cc2dbe.zip
Target Explorer: Bug 389026 - [TCF][Process] Support IProcessesV1 with the ProcessLauncher
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.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java93
3 files changed, 96 insertions, 3 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 8e5985561..042823366 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
@@ -71,6 +71,9 @@ public class Messages extends NLS {
public static String LaunchConfigurationMainTabSection_processArguments_label;
public static String LaunchConfigurationMainTabSection_processImage_label;
public static String LaunchConfigurationMainTabSection_error_missingProcessImage;
+ public static String LaunchConfigurationMainTabSection_stopAtEntry_label;
+ public static String LaunchConfigurationMainTabSection_stopAtMain_label;
+ public static String LaunchConfigurationMainTabSection_attachChildren_label;
public static String AddEditFileTransferDialog_add_dialogTitle;
public static String AddEditFileTransferDialog_edit_dialogTitle;
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 d89726679..05c9e4ae2 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
@@ -12,6 +12,9 @@ LaunchConfigurationMainTabSection_title = Process
LaunchConfigurationMainTabSection_processImage_label = Image:
LaunchConfigurationMainTabSection_processArguments_label = Arguments:
LaunchConfigurationMainTabSection_error_missingProcessImage = Please select or enter a process image.
+LaunchConfigurationMainTabSection_stopAtEntry_label = Stop at Entry
+LaunchConfigurationMainTabSection_stopAtMain_label = Stop at Main (ProcessesV1 only)
+LaunchConfigurationMainTabSection_attachChildren_label = Attach Process Children (ProcessesV1 only)
AddEditFileTransferDialog_add_dialogTitle = Add
AddEditFileTransferDialog_edit_dialogTitle = Edit
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 e4e8fd12b..3710b8ce5 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
@@ -12,16 +12,23 @@ 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.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
+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.Label;
import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
import org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart;
+import org.eclipse.tcf.te.launch.ui.tabs.AbstractLaunchConfigurationTab;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSOpenFileDialog;
@@ -39,9 +46,13 @@ import org.eclipse.ui.forms.widgets.Section;
*/
public class LaunchConfigurationMainTabSection extends AbstractSection implements ILaunchConfigurationTabFormPart {
- BaseEditBrowseTextControl processImage;
- BaseEditBrowseTextControl processArguments;
- IModelNode firstSelection = null;
+ /* default */ BaseEditBrowseTextControl processImage;
+ /* default */ BaseEditBrowseTextControl processArguments;
+ private Button stopAtEntry;
+ private Button stopAtMain;
+ private Button attachChildren;
+
+ /* default */ IModelNode firstSelection = null;
/**
* Constructor.
@@ -125,6 +136,55 @@ public class LaunchConfigurationMainTabSection extends AbstractSection implement
processArguments.setParentControlIsInnerPanel(true);
processArguments.setFormToolkit(toolkit);
processArguments.setupPanel(client);
+
+ Object container = getManagedForm().getContainer();
+ if (container instanceof AbstractLaunchConfigurationTab) {
+ ILaunchConfigurationDialog dialog = ((AbstractLaunchConfigurationTab)container).getLaunchConfigurationDialog();
+ String mode = dialog != null ? dialog.getMode() : null;
+ if (ILaunchManager.DEBUG_MODE.equals(mode)) {
+ // Add the debug options to the launch tab
+ Label label = new Label(client, SWT.HORIZONTAL);
+ GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 3;
+ label.setLayoutData(layoutData);
+
+ stopAtEntry = new Button(client, SWT.CHECK);
+ stopAtEntry.setText(Messages.LaunchConfigurationMainTabSection_stopAtEntry_label);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 3;
+ stopAtEntry.setLayoutData(layoutData);
+ stopAtEntry.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getManagedForm().dirtyStateChanged();
+ }
+ });
+
+ stopAtMain = new Button(client, SWT.CHECK);
+ stopAtMain.setText(Messages.LaunchConfigurationMainTabSection_stopAtMain_label);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 3;
+ stopAtMain.setLayoutData(layoutData);
+ stopAtMain.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getManagedForm().dirtyStateChanged();
+ }
+ });
+
+ attachChildren = new Button(client, SWT.CHECK);
+ attachChildren.setText(Messages.LaunchConfigurationMainTabSection_attachChildren_label);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 3;
+ attachChildren.setLayoutData(layoutData);
+ attachChildren.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getManagedForm().dirtyStateChanged();
+ }
+ });
+ }
+ }
}
/* (non-Javadoc)
@@ -143,6 +203,21 @@ public class LaunchConfigurationMainTabSection extends AbstractSection implement
String arguments = DefaultPersistenceDelegate.getAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_PROCESS_ARGUMENTS, ""); //$NON-NLS-1$
processArguments.setEditFieldControlText(arguments);
}
+
+ if (stopAtEntry != null) {
+ boolean selected = DefaultPersistenceDelegate.getAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_STOP_AT_ENTRY, false);
+ stopAtEntry.setSelection(selected);
+ }
+
+ if (stopAtMain != null) {
+ boolean selected = DefaultPersistenceDelegate.getAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_STOP_AT_MAIN, false);
+ stopAtMain.setSelection(selected);
+ }
+
+ if (attachChildren != null) {
+ boolean selected = DefaultPersistenceDelegate.getAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_ATTACH_CHILDREN, false);
+ attachChildren.setSelection(selected);
+ }
}
/* (non-Javadoc)
@@ -175,6 +250,18 @@ public class LaunchConfigurationMainTabSection extends AbstractSection implement
} else {
DefaultPersistenceDelegate.setAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_PROCESS_ARGUMENTS, (String)null);
}
+
+ if (stopAtEntry != null) {
+ DefaultPersistenceDelegate.setAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_STOP_AT_ENTRY, stopAtEntry.getSelection());
+ }
+
+ if (stopAtMain != null) {
+ DefaultPersistenceDelegate.setAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_STOP_AT_MAIN, stopAtMain.getSelection());
+ }
+
+ if (attachChildren != null) {
+ DefaultPersistenceDelegate.setAttribute(configuration, IRemoteAppLaunchAttributes.ATTR_ATTACH_CHILDREN, attachChildren.getSelection());
+ }
}
@Override

Back to the top