Author: adietish
Date: 2011-11-24 08:03:27 -0500 (Thu, 24 Nov 2011)
New Revision: 36615
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
Log:
[JBIDE-10237] code cleanup
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-11-24
12:59:39 UTC (rev 36614)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-11-24
13:03:27 UTC (rev 36615)
@@ -69,4 +69,8 @@
public IApplication createApplication(String name, ICartridge cartridge) throws
OpenShiftException {
return getUser().createApplication(name, cartridge);
}
+
+ public boolean hasApplication(String name) throws OpenShiftException {
+ return user.hasApplication(name);
+ }
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-24
12:59:39 UTC (rev 36614)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-24
13:03:27 UTC (rev 36615)
@@ -357,7 +357,7 @@
protected IStatus run(IProgressMonitor monitor) {
try {
model.loadDomain();
- final Collection<IApplication> applications = model.loadApplications();
+ final Collection<IApplication> applications = model.getApplications();
setViewerInput(applications);
return Status.OK_STATUS;
} catch (NotFoundOpenShiftException e) {
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-11-24
12:59:39 UTC (rev 36614)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-11-24
13:03:27 UTC (rev 36615)
@@ -75,7 +75,7 @@
setDomain(getUser().getDomain());
}
- public List<IApplication> loadApplications() throws OpenShiftException {
+ public List<IApplication> getApplications() throws OpenShiftException {
IUser user = getUser();
if (user == null) {
return Collections.emptyList();
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-24
12:59:39 UTC (rev 36614)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-24
13:03:27 UTC (rev 36615)
@@ -106,7 +106,7 @@
public boolean hasApplication(String name) {
try {
- return wizardModel.getUser().getApplicationByName(name) != null;
+ return wizardModel.hasApplication(name);
} catch (OpenShiftException e) {
OpenShiftUIActivator.log(
OpenShiftUIActivator.createErrorStatus("Could not get application by
name", e));
Show replies by date