Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2014-05-05 10:55:17 -0400
committerFred Bricon2014-05-05 10:55:43 -0400
commit5b79ef5849fa27889e6aa80b6337f6912a761ed8 (patch)
tree16b470147e4a09a4bb7da96a4ff71810aca17e20
parent4860b510f890255019571f76b3515ff883926c0d (diff)
downloadm2e-core-5b79ef5849fa27889e6aa80b6337f6912a761ed8.tar.gz
m2e-core-5b79ef5849fa27889e6aa80b6337f6912a761ed8.tar.xz
m2e-core-5b79ef5849fa27889e6aa80b6337f6912a761ed8.zip
RemoteArchetypeCatalogDialog : Enable the verify button on Edit
Change-Id: Ic842cd41fd09425b888b3f2350748616b9db9aa4 Signed-off-by: Fred Bricon <fbricon@gmail.com>
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
index 50e29b98..4411d6c4 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java
@@ -100,6 +100,7 @@ public class RemoteArchetypeCatalogDialog extends TitleAreaDialog {
Control control = super.createContents(parent);
setTitle(title);
setMessage(message);
+ update();
return control;
}
@@ -228,7 +229,6 @@ public class RemoteArchetypeCatalogDialog extends TitleAreaDialog {
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
- getButton(VERIFY_ID).setEnabled(false);
}
protected void okPressed() {
@@ -271,14 +271,13 @@ public class RemoteArchetypeCatalogDialog extends TitleAreaDialog {
setMessage(null, IStatus.WARNING);
String url = catalogUrlCombo.getText().trim();
- if(url.length() == 0) {
+ boolean isValid = !url.isEmpty();
+ if(!isValid) {
setErrorMessage(Messages.RemoteArchetypeCatalogDialog_error_required);
- verifyButton.setEnabled(false);
- return false;
}
- verifyButton.setEnabled(true);
- return true;
+ verifyButton.setEnabled(isValid);
+ return isValid;
}
}

Back to the top