Author: xcoulon
Date: 2012-03-20 11:59:42 -0400 (Tue, 20 Mar 2012)
New Revision: 39668
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
Log:
Fixed - JBIDE-11333
NPE in
org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationConfigurationWizardPageModel
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-03-20
15:48:32 UTC (rev 39667)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-03-20
15:59:42 UTC (rev 39668)
@@ -19,6 +19,7 @@
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.OpenShiftEndpointException;
@@ -37,17 +38,14 @@
@Override
public boolean performFinish() {
- renameDomain();
- return true;
- }
-
- private void renameDomain() {
+ final boolean result[] = new boolean[]{false};
try {
WizardUtils.runInWizard(new Job("Renaming domain...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
model.renameDomain();
+ result[0] = true;
return Status.OK_STATUS;
} catch(OpenShiftEndpointException e) {
return OpenShiftUIActivator.createErrorStatus(NLS.bind(
@@ -59,8 +57,9 @@
}
}, getContainer());
} catch (Exception ex) {
- // ignore
+ Logger.error("Could not rename domain", ex);
}
+ return result[0];
}
@Override
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-03-20
15:48:32 UTC (rev 39667)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-03-20
15:59:42 UTC (rev 39668)
@@ -19,6 +19,7 @@
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.OpenShiftEndpointException;
@@ -36,12 +37,14 @@
@Override
public boolean performFinish() {
+ final boolean result[] = new boolean[]{false};
try {
WizardUtils.runInWizard(new Job("Creating domain...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
model.createDomain();
+ result[0] = true;
} catch (OpenShiftEndpointException e) {
return OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not create domain \"{0}\": {1}", model.getNamespace(),
e.getResponseResult()), e);
@@ -53,10 +56,11 @@
}
}, getContainer());
} catch (Exception e) {
+ Logger.error("Could not create domain", e);
}
- return true;
+ return result[0];
}
-
+
@Override
public void addPages() {
addPage(new NewDomainWizardPage(model, this));
Show replies by date