[yocto] [PATCH v2 4/5] Disable "Finish" when project location is invalid

Ioana Grigoropol ioanax.grigoropol at intel.com
Tue Jan 15 06:42:48 PST 2013


- when Bitbake project location is invalid, an error should be displayed and "finish" button disabled

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol at intel.com>
---
 .../yocto/bc/ui/wizards/install/OptionsPage.java   |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
index a103d2b..7a705aa 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
@@ -88,8 +88,13 @@ public class OptionsPage extends FiniteStateWizardPage {
 			@Override
 			public void reportError(String errorMessage, boolean infoOnly) {
 				setMessage(errorMessage);
-				validatePage();
-				updateModel();
+				if (validatePage()) {
+	                updateModel();
+	                setPageComplete(true);
+	                return;
+	            }
+
+	            setPageComplete(false);
 			}
 		};
 
@@ -181,7 +186,6 @@ public class OptionsPage extends FiniteStateWizardPage {
 					setErrorMessage("A project with the name " + projName + " already exists");
 					return false;
 				}
-				//FIXME : do not throw exception when illegal characters show in URI ->show error on page
 				URI location = new URI("file:" + URI_SEPARATOR + URI_SEPARATOR + convertToRealPath(projectLoc) + URI_SEPARATOR + txtProjectName.getText());
 
 				IStatus status = ResourcesPlugin.getWorkspace().validateProjectLocationURI(proj, location);
-- 
1.7.9.5




More information about the yocto mailing list