Author: xcoulon
Date: 2012-03-20 10:55:31 -0400 (Tue, 20 Mar 2012)
New Revision: 39665
Modified:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
branches/jbosstools-3.3.0.Beta1/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:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-03-20
14:55:22 UTC (rev 39664)
+++
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-03-20
14:55:31 UTC (rev 39665)
@@ -18,6 +18,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.IUser;
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:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-03-20
14:55:22 UTC (rev 39664)
+++
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-03-20
14:55:31 UTC (rev 39665)
@@ -18,6 +18,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.IUser;
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,8 +56,9 @@
}
}, getContainer());
} catch (Exception e) {
+ Logger.error("Could not create domain", e);
}
- return true;
+ return result[0];
}
@Override
Show replies by date