Author: adietish
Date: 2012-02-09 15:23:56 -0500 (Thu, 09 Feb 2012)
New Revision: 38577
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
slight cleanup
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09
19:52:58 UTC (rev 38576)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09
20:23:56 UTC (rev 38577)
@@ -47,8 +47,8 @@
AbstractOpenShiftApplicationWizard<OpenShiftExpressApplicationWizardModel>
implements IImportWizard, INewWizard {
private IUser initialUser;
+
public OpenShiftExpressApplicationWizard() {
- super();
setWizardModel(new OpenShiftExpressApplicationWizardModel());
}
@@ -71,8 +71,8 @@
setWindowTitle("OpenShift Application Wizard");
setNeedsProgressMonitor(true);
Object o = selection.getFirstElement();
- if( o instanceof IUser ) {
- this.initialUser = (IUser)o;
+ if (o instanceof IUser) {
+ setInitialUser((IUser) o);
}
}
@@ -89,28 +89,29 @@
}
@Override
- public IWizardPage getStartingPage() {
+ public IWizardPage getStartingPage() {
IWizardPage[] pages = getPages();
return initialUser == null ? pages[0] : pages[1];
- }
+ }
@Override
public boolean performFinish() {
try {
final DelegatingProgressMonitor delegatingMonitor = new DelegatingProgressMonitor();
- IStatus jobResult = WizardUtils.runInWizard(new ImportJob(delegatingMonitor),
delegatingMonitor,
- getContainer());
+ IStatus jobResult = WizardUtils.runInWizard(
+ new ImportJob(delegatingMonitor), delegatingMonitor, getContainer());
return JobUtils.isOk(jobResult);
} catch (Exception e) {
- ErrorDialog.openError(getShell(), "Error", "Could not create local git
repository.", new Status(
- IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
- "An exception occurred while creating local git repository.", e));
+ ErrorDialog.openError(getShell(), "Error", "Could not create local git
repository.",
+ OpenShiftUIActivator.createErrorStatus(
+ "An exception occurred while creating local git repository.", e));
return false;
}
}
/**
- * A workspace job that will create a new project or enable the selected project to be
used with OpenShift.
+ * A workspace job that will create a new project or enable the selected
+ * project to be used with OpenShift.
*/
class ImportJob extends WorkspaceJob {
Show replies by date