diff options
author | Darin Wright | 2007-10-26 18:02:41 +0000 |
---|---|---|
committer | Darin Wright | 2007-10-26 18:02:41 +0000 |
commit | e7f76601cbec77442295c0014de096812cf9709b (patch) | |
tree | ebdf273af771b55bd45348264ac803a02a77188b | |
parent | 6437c4f3ec6cfa6b0d9e0f4c1e57558482fdbb01 (diff) | |
download | eclipse.platform.debug-e7f76601cbec77442295c0014de096812cf9709b.tar.gz eclipse.platform.debug-e7f76601cbec77442295c0014de096812cf9709b.tar.xz eclipse.platform.debug-e7f76601cbec77442295c0014de096812cf9709b.zip |
Bug 207600 - export configurations page does not update as text typed into export directory
3 files changed, 15 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java index 0fb9ed215..6b926acf0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java @@ -44,6 +44,8 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; @@ -228,6 +230,11 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { fFilePath = SWTFactory.createText(comp, SWT.SINGLE | SWT.BORDER, 1); String opath = getDialogSettings().get(OLD_PATH); fFilePath.setText((opath == null ? IInternalDebugCoreConstants.EMPTY_STRING : opath)); + fFilePath.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(isComplete()); + } + }); Button button = SWTFactory.createPushButton(comp, WizardMessages.ExportLaunchConfigurationsWizardPage_0, null, GridData.END); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { @@ -262,10 +269,15 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_5); return false; } - if(fFilePath.getText().trim().equals(IInternalDebugCoreConstants.EMPTY_STRING)) { + String path = fFilePath.getText().trim(); + if(path.equals(IInternalDebugCoreConstants.EMPTY_STRING)) { setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_6); return false; } + if ((new File(path)).isFile()) { + setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_2); + return false; + } setErrorMessage(null); setMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_7); return true; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java index 88c704d85..f0321a5a3 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java @@ -15,6 +15,7 @@ public class WizardMessages extends NLS { public static String ExportLaunchConfigurationsWizardPage_15; public static String ExportLaunchConfigurationsWizardPage_16; public static String ExportLaunchConfigurationsWizardPage_17; + public static String ExportLaunchConfigurationsWizardPage_2; public static String ExportLaunchConfigurationsWizardPage_3; public static String ExportLaunchConfigurationsWizardPage_4; public static String ExportLaunchConfigurationsWizardPage_5; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties index a1c15adf1..3784084e8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties @@ -9,6 +9,7 @@ ExportLaunchConfigurationsWizardPage_14=Yes to All ExportLaunchConfigurationsWizardPage_15=No ExportLaunchConfigurationsWizardPage_16=No to All ExportLaunchConfigurationsWizardPage_17=Cancel +ExportLaunchConfigurationsWizardPage_2=Specified export location is not a directory ExportLaunchConfigurationsWizardPage_3=&Launch Configurations: ExportLaunchConfigurationsWizardPage_4=Location: ExportLaunchConfigurationsWizardPage_5=Please select at least one launch configuration to export |