Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2004-11-30 15:36:54 +0000
committerKevin Barnes2004-11-30 15:36:54 +0000
commitb89a5db88dddeb4671117d65bb2b8c03e18e44b7 (patch)
tree9846615f9352a65119f0a5c061785b7f5dc50703
parenta6f9486425b290553f41ae07a4245ff94df06534 (diff)
downloadeclipse.platform.debug-b89a5db88dddeb4671117d65bb2b8c03e18e44b7.tar.gz
eclipse.platform.debug-b89a5db88dddeb4671117d65bb2b8c03e18e44b7.tar.xz
eclipse.platform.debug-b89a5db88dddeb4671117d65bb2b8c03e18e44b7.zip
Bug 79153 - [Common Tab] redirect to file should do variable expansion
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java22
2 files changed, 21 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 6c762bd5a..5d77db7f1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -27,6 +27,7 @@ CommonTab.5=Con&sole
CommonTab.6=Fi&le:
CommonTab.7=B&rowse...
CommonTab.8=No file specified for process output
+CommonTab.9=&Variables...
CompileErrorPromptStatusHandler.0=Errors in Project
CompileErrorPromptStatusHandler.1=Errors exist in a required project. Continue launch?
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index 39330af18..7001dbefd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -35,6 +35,7 @@ import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationMan
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsMessages;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
+import org.eclipse.debug.internal.ui.stringsubstitution.StringVariableSelectionDialog;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -111,6 +112,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
private Button fFileOutput;
private Button fFileBrowse;
private Text fFileText;
+ private Button fVariables;
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
@@ -214,12 +216,12 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
group.setText(LaunchConfigurationsMessages.getString("CommonTab.4")); //$NON-NLS-1$
GridData gd = new GridData(SWT.FILL, SWT.NONE, true, false);
group.setLayoutData(gd);
- group.setLayout(new GridLayout(3, false));
+ group.setLayout(new GridLayout(4, false));
group.setFont(parent.getFont());
fConsoleOutput = createCheckButton(group, LaunchConfigurationsMessages.getString("CommonTab.5")); //$NON-NLS-1$
gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);
- gd.horizontalSpan = 3;
+ gd.horizontalSpan = 4;
fConsoleOutput.setLayoutData(gd);
fConsoleOutput.addSelectionListener(new SelectionAdapter() {
@@ -232,6 +234,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));
fFileText = new Text(group, SWT.SINGLE | SWT.BORDER);
fFileText.setLayoutData(new GridData(SWT.FILL, SWT.NORMAL, true, false));
+ fVariables = createPushButton(group, LaunchConfigurationsMessages.getString("CommonTab.9"), null); //$NON-NLS-1$
fFileBrowse = createPushButton(group, LaunchConfigurationsMessages.getString("CommonTab.7"), null); //$NON-NLS-1$
fFileOutput.addSelectionListener(new SelectionAdapter() {
@@ -239,6 +242,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
boolean enabled = fFileOutput.getSelection();
fFileText.setEnabled(enabled);
fFileBrowse.setEnabled(enabled);
+ fVariables.setEnabled(enabled);
updateLaunchConfigurationDialog();
}
});
@@ -260,6 +264,19 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
+
+ fVariables.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+ dialog.open();
+ String variable = dialog.getVariableExpression();
+ if (variable != null) {
+ fFileText.append(variable);
+ }
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
}
protected void addEncodingBlock(Composite parent) {
@@ -420,6 +437,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
fFileOutput.setSelection(haveOutputFile);
fFileText.setEnabled(haveOutputFile);
fFileBrowse.setEnabled(haveOutputFile);
+ fVariables.setEnabled(haveOutputFile);
}
protected void updateLaunchInBackground(ILaunchConfiguration configuration) {

Back to the top