Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2015-02-19 12:51:29 +0000
committerTobias Schwarz2015-02-19 12:51:47 +0000
commit7b1eb5dcb8eb9ac7f7df12bea168e4d6952c7a42 (patch)
tree0b712c30c68613b8bab4087c96bbd9a2f20e7418 /target_explorer
parent5bd89ba16cdeb19678a1666e8b82e30057723f9e (diff)
downloadorg.eclipse.tcf-7b1eb5dcb8eb9ac7f7df12bea168e4d6952c7a42.tar.gz
org.eclipse.tcf-7b1eb5dcb8eb9ac7f7df12bea168e4d6952c7a42.tar.xz
org.eclipse.tcf-7b1eb5dcb8eb9ac7f7df12bea168e4d6952c7a42.zip
SM: fix destination path entry field
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
index 7c4eb3b9b..2600ffe1c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
@@ -36,6 +36,8 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
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.Font;
@@ -254,6 +256,12 @@ public class PeerExportWizardPage extends WizardPage {
if (getDialogSettings().get(OLD_PATH) != null) {
fDestinationField.setText(getDialogSettings().get(OLD_PATH));
}
+ fDestinationField.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(isComplete());
+ }
+ });
fDestinationButton = createButton(destinationSelectionGroup, IDialogConstants.SELECT_ALL_ID, Messages.PeerExportWizardPage_destination_button, false);
fDestinationButton.addSelectionListener(new SelectionAdapter() {
@@ -304,10 +312,15 @@ public class PeerExportWizardPage extends WizardPage {
setErrorMessage(Messages.PeerExportWizardPage_destinationMissing_error);
return false;
}
- if ((new File(path)).isFile()) {
+ File dir = new File(path);
+ if (dir.isFile()) {
setErrorMessage(Messages.PeerExportWizardPage_destinationIsFile_error);
return false;
}
+ if (!dir.isAbsolute()) {
+ setErrorMessage(Messages.PeerExportWizardPage_destinationMissing_error);
+ return false;
+ }
setErrorMessage(null);
setMessage(Messages.PeerExportWizard_message);
return true;

Back to the top