Author: adietish
Date: 2012-02-14 10:38:34 -0500 (Tue, 14 Feb 2012)
New Revision: 38704
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftConsoleExpressView.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java
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/OpenShiftExpressApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
Log:
[JBIDE-10893] fixed credentials page, removed user related methods from activator
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -99,29 +99,6 @@
/**
- * Create a new user and add it to the model
- * @param username
- * @param password
- * @return
- * @throws OpenShiftException
- * @throws IOException
- */
- public IUser createUser(String username, String password) throws OpenShiftException,
IOException {
- IUser u = UserModel.getDefault().createUser(username, password);
- UserModel.getDefault().addUser(u);
- return u;
- }
-
- /**
- * Get the most recently created or used user
- *
- * @return the user
- */
- public final IUser getUser() {
- return UserModel.getDefault().getRecentUser();
- }
-
- /**
* Creates an image by loading it from a file in the plugin's images
* directory.
*
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.action;
import org.eclipse.jface.viewers.ITreeSelection;
@@ -3,4 +13,5 @@
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import
org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
@@ -10,6 +21,9 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
+/**
+ * @author Xavier Coulon
+ */
public class EditCartridgesAction extends AbstractAction {
public EditCartridgesAction() {
@@ -22,7 +36,7 @@
final ITreeSelection treeSelection = (ITreeSelection)selection;
if (selection != null && selection instanceof ITreeSelection &&
treeSelection.getFirstElement() instanceof IApplication) {
final IApplication application = (IApplication) treeSelection.getFirstElement();
- final IUser user = OpenShiftUIActivator.getDefault().getUser();
+ final IUser user = UserModel.getDefault().getRecentUser();
EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(application, user);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
dialog.create();
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -46,9 +46,9 @@
import org.jboss.ide.eclipse.as.ui.editor.ServerWorkingCopyPropertyCommand;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import
org.jboss.tools.openshift.express.internal.ui.wizard.ConnectToOpenShiftWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPageModel;
-import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
+import
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftExpressWizardModel;
import
org.jboss.tools.openshift.express.internal.ui.wizard.ImportOpenShiftExpressApplicationWizard;
import
org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
@@ -132,7 +132,7 @@
userLabel.setText("Username: ");
passLabel.setText("Password: ");
remoteLabel.setText("Remote: ");
- remoteText.setText(IOpenShiftWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
+ remoteText.setText(IOpenShiftExpressWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
String n = ExpressServerUtils.getExpressUsername(server);
String[] appNames = null;
@@ -264,7 +264,7 @@
}
private void verifyPressed() {
- final CredentialsWizardPageModel model = new CredentialsWizardPageModel();
+ final CredentialsWizardPageModel model = new CredentialsWizardPageModel(new
ConnectToOpenShiftWizardModel());
this.fapplication = null;
this.fuser = null;
this.appListNames = null;
@@ -375,7 +375,7 @@
private void verifyApplicationBinaryMode(CredentialsWizardPageModel model) {
IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(deployProject);
try {
- fuser = OpenShiftUIActivator.getDefault().getUser();
+ fuser = UserModel.getDefault().getRecentUser();
final List<IApplication> allApps = fuser.getApplications();
fapplication = ExpressServerUtils.findApplicationForProject(p, allApps);
@@ -401,7 +401,7 @@
// now check the app name and cartridge
String[] appNames = new String[]{};
try {
- IUser user = OpenShiftUIActivator.getDefault().getUser();
+ IUser user = UserModel.getDefault().getRecentUser();
final List<IApplication> allApps = user.getApplications();
appNames = getAppNamesAsStrings(allApps);
int index = Arrays.asList(appNames).indexOf(app);
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -11,6 +11,7 @@
package org.jboss.tools.openshift.express.internal.ui.viewer;
import org.eclipse.jface.wizard.Wizard;
+import
org.jboss.tools.openshift.express.internal.ui.wizard.ConnectToOpenShiftWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPage;
/**
@@ -18,7 +19,7 @@
*/
public class ConnectToOpenShiftWizard extends Wizard {
- private final CredentialsWizardPage page = new CredentialsWizardPage(this);
+ private final CredentialsWizardPage page = new CredentialsWizardPage(this, new
ConnectToOpenShiftWizardModel());
public ConnectToOpenShiftWizard() {
setNeedsProgressMonitor(true);
@@ -32,12 +33,8 @@
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
@Override
public void addPages() {
addPage(page);
}
-
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftConsoleExpressView.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftConsoleExpressView.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftConsoleExpressView.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -28,7 +28,7 @@
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.IUser;
@@ -90,7 +90,7 @@
int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
if (returnCode == Window.OK) {
Logger.debug("OpenShift Auth succeeded.");
- final IUser user = OpenShiftUIActivator.getDefault().getUser();
+ final IUser user = UserModel.getDefault().getRecentUser();
getCommonViewer().setInput(new OpenShiftExpressConsoleContentCategory(user));
switchToCommonViewer();
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -31,9 +31,9 @@
private IApplication selectedApplication;
- private IOpenShiftWizardModel wizardModel;
+ private IOpenShiftExpressWizardModel wizardModel;
- public ApplicationSelectionDialogModel(IOpenShiftWizardModel wizardModel) {
+ public ApplicationSelectionDialogModel(IOpenShiftExpressWizardModel wizardModel) {
this.wizardModel = wizardModel;
this.selectedApplication = wizardModel.getApplication();
}
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+
+import com.openshift.express.client.IUser;
+
+/**
+ * @author André Dietisheim
+ */
+public class ConnectToOpenShiftWizardModel implements IUserAwareModel {
+
+ @Override
+ public IUser getUser() {
+ return UserModel.getDefault().getRecentUser();
+ }
+
+ @Override
+ public IUser setUser(IUser user) {
+ UserModel.getDefault().addUser(user);
+ return user;
+ }
+
+}
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -60,10 +60,10 @@
private Text rhLoginText = null;
private Text passwordText = null;
- public CredentialsWizardPage(IWizard wizard) {
+ public CredentialsWizardPage(IWizard wizard, IUserAwareModel wizardModel) {
super("Server connection", "Please provide your OpenShift Express
credentials.", "Server Connection",
wizard);
- this.pageModel = new CredentialsWizardPageModel();
+ this.pageModel = new CredentialsWizardPageModel(wizardModel);
}
protected void doCreateControls(Composite container, DataBindingContext dbc) {
@@ -235,12 +235,6 @@
return ValidationStatus.ok();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.databinding.validation.MultiValidator#getTargets()
- */
@Override
public IObservableList getTargets() {
WritableList targets = new WritableList();
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -15,6 +15,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.utils.OpenShiftPasswordStorageKey;
@@ -47,7 +48,10 @@
private final String libraServer;
private SecurePasswordStore store;
- public CredentialsWizardPageModel() {
+ private IUserAwareModel wizardModel;
+
+ public CredentialsWizardPageModel(IUserAwareModel wizardModel) {
+ this.wizardModel = wizardModel;
this.rhLoginPreferenceValue = new StringPreferenceValue(RHLOGIN_PREFS_KEY,
OpenShiftUIActivator.PLUGIN_ID);
this.libraServer = initLibraServer();
this.rhLogin = initRhLogin();
@@ -182,16 +186,25 @@
}
public boolean areCredentialsValidated() {
- return credentialsStatus != null;// && credentialsValidity.isOK();
+ return credentialsStatus != null;
}
public IStatus validateCredentials() {
+ IStatus status = getValidityStatus(getRhLogin(), getPassword());
+ setCredentialsStatus(status);
+ return status;
+ }
+
+ protected void setUser(IUser user) {
+ wizardModel.setUser(user);
+ }
+
+ private IStatus getValidityStatus(String rhLogin, String password) {
IStatus status = Status.OK_STATUS;
try {
- // reset without notifying
- // this.credentialsValidity = null;
- IUser user = OpenShiftUIActivator.getDefault().createUser(getRhLogin(),
getPassword());
+ IUser user = UserModel.getDefault().createUser(getRhLogin(), getPassword());
if (user.isValid()) {
+ setUser(user);
if (rememberPassword) {
storePassword(password);
} else {
@@ -208,8 +221,6 @@
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not check user credentials: {0}.", e.getMessage()));
}
-
- setCredentialsStatus(status);
return status;
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -51,7 +51,7 @@
private Button useDefaultRepoPathButton;
private Text remoteNameText;
- public GitCloningSettingsWizardPage(OpenShiftExpressApplicationWizard wizard,
IOpenShiftWizardModel model) {
+ public GitCloningSettingsWizardPage(OpenShiftExpressApplicationWizard wizard,
IOpenShiftExpressWizardModel model) {
super(
"Import an existing OpenShift application",
"Configure the cloning settings by specifying the clone destination if you
create a new project, and the git remote name if you're using an existing
project.",
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -10,8 +10,8 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import static
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel.EXISTING_PROJECT_REMOTE_NAME_DEFAULT;
-import static
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT;
+import static
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftExpressWizardModel.EXISTING_PROJECT_REMOTE_NAME_DEFAULT;
+import static
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftExpressWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -59,7 +59,7 @@
public static final String PROPERTY_CUSTOM_REMOTE_NAME_VALIDITY =
"customRemoteNameValidity";
- private IOpenShiftWizardModel wizardModel;
+ private IOpenShiftExpressWizardModel wizardModel;
private boolean loading;
private boolean useDefaultRepoPath = true;
@@ -70,7 +70,7 @@
private boolean useDefaultRemoteName = true;
- public GitCloningSettingsWizardPageModel(IOpenShiftWizardModel wizardModel) {
+ public GitCloningSettingsWizardPageModel(IOpenShiftExpressWizardModel wizardModel) {
this.wizardModel = wizardModel;
setRepositoryPath(getDefaultRepositoryPath());
}
Copied:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
(from rev 38693,
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java)
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServerType;
+import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.OpenShiftException;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenShiftExpressWizardModel extends IUserAwareModel {
+
+ public static final String NEW_PROJECT = "enableProject";
+ public static final String USER = "user";
+ public static final String APPLICATION = "application";
+ public static final String APPLICATION_NAME = "applicationName";
+ public static final String APPLICATION_CARTRIDGE = "applicationCartridge";
+ public static final String USE_EXISTING_APPLICATION =
"useExistingApplication";
+ public static final String REMOTE_NAME = "remoteName";
+ public static final String REPOSITORY_PATH = "repositoryPath";
+ public static final String PROJECT_NAME = "projectName";
+ public static final String MERGE_URI = "mergeUri";
+ public static final String RUNTIME_DELEGATE = "runtimeDelegate";
+ public static final String CREATE_SERVER_ADAPTER = "createServerAdapter";
+ public static final String PUBLICATION_MODE = "serverMode";
+ public static final String PUBLISH_SOURCE = ExpressServerUtils.EXPRESS_SOURCE_MODE;
+ public static final String PUBLISH_BINARY = ExpressServerUtils.EXPRESS_BINARY_MODE;
+ public static final String SERVER_TYPE = "serverType";
+ public static final String NEW_PROJECT_REMOTE_NAME_DEFAULT = "origin";
+ public static final String EXISTING_PROJECT_REMOTE_NAME_DEFAULT =
"openshift";
+ public static final String DEFAULT_REPOSITORY_PATH =
EGitUIUtils.getEGitDefaultRepositoryPath();
+
+ /**
+ * Imports the project that the user has chosen into the workspace.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws OpenShiftException
+ * @throws CoreException
+ * @throws InterruptedException
+ * @throws URISyntaxException
+ * @throws InvocationTargetException
+ * @throws IOException
+ */
+ public void importProject(IProgressMonitor monitor) throws OpenShiftException,
CoreException, InterruptedException,
+ URISyntaxException, InvocationTargetException, IOException;
+
+ /**
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
+ * configuration files to the user project (in the workspace), shares the
+ * user project with git and creates the server adapter.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws URISyntaxException
+ * The OpenShift application repository could not be cloned,
+ * because the uri it is located at is not a valid git uri
+ * @throws OpenShiftException
+ *
+ * @throws InvocationTargetException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation failed.
+ * @throws InterruptedException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation was interrupted.
+ * @throws IOException
+ * The configuration files could not be copied from the git
+ * clone to the user project
+ * @throws CoreException
+ * The user project could not be shared with the git
+ */
+ public void configureUnsharedProject(IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
+ URISyntaxException;
+
+ /**
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
+ * configuration files to the user project (in the workspace), adds the
+ * appication git repo as remote and creates the server adapter.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws URISyntaxException
+ * The OpenShift application repository could not be cloned,
+ * because the uri it is located at is not a valid git uri
+ * @throws OpenShiftException
+ *
+ * @throws InvocationTargetException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation failed.
+ * @throws InterruptedException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation was interrupted.
+ * @throws IOException
+ * The configuration files could not be copied from the git
+ * clone to the user project
+ * @throws CoreException
+ * The user project could not be shared with the git
+ */
+ public void configureGitSharedProject(IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
+ URISyntaxException;
+
+ public File getRepositoryFile();
+
+ public Object setProperty(String key, Object value);
+
+ public Object getProperty(String key);
+
+// public void setUser(IUser user);
+//
+// public IUser getUser();
+
+ public IApplication getApplication();
+
+ public String getApplicationName();
+
+ public ICartridge getApplicationCartridge();
+
+ public void setApplication(IApplication application);
+
+ public String setRemoteName(String remoteName);
+
+ public String getRemoteName();
+
+ public String setRepositoryPath(String repositoryPath);
+
+ public String getRepositoryPath();
+
+ public boolean isNewProject();
+
+ public boolean isExistingProject();
+
+ public Boolean setNewProject(boolean newProject);
+
+ public Boolean setExistingProject(boolean existingProject);
+
+ public String setProjectName(String projectName);
+
+ public IProject setProject(IProject project);
+
+ public boolean isGitSharedProject();
+
+ public Boolean setCreateServerAdapter(Boolean createServerAdapter);
+
+ public String getProjectName();
+
+ public String setMergeUri(String mergeUri);
+
+ public String getMergeUri();
+
+ public IRuntime getRuntime();
+
+ public String getMode();
+
+ public boolean isCreateServerAdapter();
+
+ public IServerType getServerType();
+
+ public void setServerType(IServerType serverType);
+
+ public boolean isExistingApplication();
+
+ public void setUseExistingApplication(boolean useExistingApplication);
+
+}
\ No newline at end of file
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.openshift.express.internal.ui.wizard;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerType;
-import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.ICartridge;
-import com.openshift.express.client.IUser;
-import com.openshift.express.client.OpenShiftException;
-
-/**
- * @author André Dietisheim
- */
-public interface IOpenShiftWizardModel {
-
- public static final String NEW_PROJECT = "enableProject";
- public static final String USER = "user";
- public static final String APPLICATION = "application";
- public static final String APPLICATION_NAME = "applicationName";
- public static final String APPLICATION_CARTRIDGE = "applicationCartridge";
- public static final String USE_EXISTING_APPLICATION =
"useExistingApplication";
- public static final String REMOTE_NAME = "remoteName";
- public static final String REPOSITORY_PATH = "repositoryPath";
- public static final String PROJECT_NAME = "projectName";
- public static final String MERGE_URI = "mergeUri";
- public static final String RUNTIME_DELEGATE = "runtimeDelegate";
- public static final String CREATE_SERVER_ADAPTER = "createServerAdapter";
- public static final String PUBLICATION_MODE = "serverMode";
- public static final String PUBLISH_SOURCE = ExpressServerUtils.EXPRESS_SOURCE_MODE;
- public static final String PUBLISH_BINARY = ExpressServerUtils.EXPRESS_BINARY_MODE;
- public static final String SERVER_TYPE = "serverType";
- public static final String NEW_PROJECT_REMOTE_NAME_DEFAULT = "origin";
- public static final String EXISTING_PROJECT_REMOTE_NAME_DEFAULT =
"openshift";
- public static final String DEFAULT_REPOSITORY_PATH =
EGitUIUtils.getEGitDefaultRepositoryPath();
-
- /**
- * Imports the project that the user has chosen into the workspace.
- *
- * @param monitor
- * the monitor to report progress to
- * @throws OpenShiftException
- * @throws CoreException
- * @throws InterruptedException
- * @throws URISyntaxException
- * @throws InvocationTargetException
- * @throws IOException
- */
- public void importProject(IProgressMonitor monitor) throws OpenShiftException,
CoreException, InterruptedException,
- URISyntaxException, InvocationTargetException, IOException;
-
- /**
- * Enables the user chosen, unshared project to be used on the chosen
- * OpenShift application. Clones the application git repository, copies the
- * configuration files to the user project (in the workspace), shares the
- * user project with git and creates the server adapter.
- *
- * @param monitor
- * the monitor to report progress to
- * @throws URISyntaxException
- * The OpenShift application repository could not be cloned,
- * because the uri it is located at is not a valid git uri
- * @throws OpenShiftException
- *
- * @throws InvocationTargetException
- * The OpenShift application repository could not be cloned, the
- * clone operation failed.
- * @throws InterruptedException
- * The OpenShift application repository could not be cloned, the
- * clone operation was interrupted.
- * @throws IOException
- * The configuration files could not be copied from the git
- * clone to the user project
- * @throws CoreException
- * The user project could not be shared with the git
- */
- public void configureUnsharedProject(IProgressMonitor monitor)
- throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
- URISyntaxException;
-
- /**
- * Enables the user chosen, unshared project to be used on the chosen
- * OpenShift application. Clones the application git repository, copies the
- * configuration files to the user project (in the workspace), adds the
- * appication git repo as remote and creates the server adapter.
- *
- * @param monitor
- * the monitor to report progress to
- * @throws URISyntaxException
- * The OpenShift application repository could not be cloned,
- * because the uri it is located at is not a valid git uri
- * @throws OpenShiftException
- *
- * @throws InvocationTargetException
- * The OpenShift application repository could not be cloned, the
- * clone operation failed.
- * @throws InterruptedException
- * The OpenShift application repository could not be cloned, the
- * clone operation was interrupted.
- * @throws IOException
- * The configuration files could not be copied from the git
- * clone to the user project
- * @throws CoreException
- * The user project could not be shared with the git
- */
- public void configureGitSharedProject(IProgressMonitor monitor)
- throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
- URISyntaxException;
-
- public File getRepositoryFile();
-
- public Object setProperty(String key, Object value);
-
- public Object getProperty(String key);
-
-// public void setUser(IUser user);
-//
-// public IUser getUser();
-
- public IApplication getApplication();
-
- public String getApplicationName();
-
- public ICartridge getApplicationCartridge();
-
- public void setApplication(IApplication application);
-
- public String setRemoteName(String remoteName);
-
- public String getRemoteName();
-
- public String setRepositoryPath(String repositoryPath);
-
- public String getRepositoryPath();
-
- public boolean isNewProject();
-
- public boolean isExistingProject();
-
- public Boolean setNewProject(boolean newProject);
-
- public Boolean setExistingProject(boolean existingProject);
-
- public String setProjectName(String projectName);
-
- public IProject setProject(IProject project);
-
- public boolean isGitSharedProject();
-
- public Boolean setCreateServerAdapter(Boolean createServerAdapter);
-
- public String getProjectName();
-
- public String setMergeUri(String mergeUri);
-
- public String getMergeUri();
-
- public IRuntime getRuntime();
-
- public String getMode();
-
- public boolean isCreateServerAdapter();
-
- public IServerType getServerType();
-
- public void setServerType(IServerType serverType);
-
- public boolean isExistingApplication();
-
- public void setUseExistingApplication(boolean useExistingApplication);
-
- public IUser getUser();
-
- public IUser setUser(IUser user);
-
-}
\ No newline at end of file
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -0,0 +1,11 @@
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import com.openshift.express.client.IUser;
+
+public interface IUserAwareModel {
+
+ public IUser getUser();
+
+ public IUser setUser(IUser user);
+
+}
\ No newline at end of file
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -38,6 +38,7 @@
import org.jboss.tools.common.ui.DelegatingProgressMonitor;
import org.jboss.tools.common.ui.JobUtils;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.ImportFailedException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.WontOverwriteException;
@@ -138,7 +139,7 @@
@Override
public void addPages() {
- addPage(new CredentialsWizardPage(this));
+ addPage(new CredentialsWizardPage(this, getWizardModel()));
addPage(new ApplicationConfigurationWizardPage(this, getWizardModel()));
addPage(new ProjectAndServerAdapterSettingsWizardPage(this, getWizardModel()));
addPage(new GitCloningSettingsWizardPage(this, getWizardModel()));
@@ -166,6 +167,8 @@
if (success) {
success = importProject();
}
+
+ wizardModel.addToUserModel(getWizardModel().getUser());
return success;
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -22,7 +22,6 @@
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import
org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import
org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
import
org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureUnsharedProject;
@@ -36,17 +35,17 @@
import com.openshift.express.client.OpenShiftApplicationNotAvailableException;
import com.openshift.express.client.OpenShiftException;
-public class OpenShiftExpressApplicationWizardModel extends ObservableUIPojo implements
IOpenShiftWizardModel {
+public class OpenShiftExpressApplicationWizardModel extends ObservableUIPojo implements
IOpenShiftExpressWizardModel {
protected HashMap<String, Object> dataModel = new HashMap<String,
Object>();
private static final int APP_CREATION_TIMEOUT = 60;
private static final String KEY_SELECTED_EMBEDDABLE_CARTRIDGES =
"selectedEmbeddableCartridges";
- public OpenShiftExpressApplicationWizardModel() {
- this(OpenShiftUIActivator.getDefault().getUser(), null, null);
+ public OpenShiftExpressApplicationWizardModel(IUser user) {
+ this(user, null, null);
}
-
+
public OpenShiftExpressApplicationWizardModel(IUser user, IProject project, IApplication
application) {
// default value(s)
setUser(user);
@@ -71,7 +70,7 @@
* @throws InterruptedException
* @throws URISyntaxException
* @throws InvocationTargetException
- * @throws IOException
+ * @throws IOException
*/
@Override
public void importProject(IProgressMonitor monitor) throws OpenShiftException,
CoreException, InterruptedException,
@@ -119,7 +118,7 @@
getProjectName()
, getApplication()
, getRemoteName()
- , OpenShiftUIActivator.getDefault().getUser())
+ , getUser())
.execute(monitor);
createServerAdapter(monitor, importedProjects);
}
@@ -261,8 +260,8 @@
public String setProjectName(String projectName) {
return (String) setProperty(PROJECT_NAME, projectName);
}
-
- @Override
+
+ @Override
public IProject setProject(IProject project) {
if (project != null && project.exists()) {
setExistingProject(false);
@@ -417,24 +416,20 @@
public String getApplicationName() {
return (String) dataModel.get(APPLICATION_NAME);
}
-
- /**
- * Returns the user that was stored in this model or the recent user from UserModel
- *
- * @see OpenShiftExpressApplicationWizardModel(IUser)
- * @see OpenShiftExpressApplicationWizardModel()
- */
+
public IUser getUser() {
- IUser user = (IUser) dataModel.get(USER);
- if (user == null) {
- user = UserModel.getDefault().getRecentUser();
- }
- return user;
+ return (IUser) dataModel.get(USER);
}
-
+
public IUser setUser(IUser user) {
dataModel.put(USER, user);
return user;
}
+ public void addUserToModel() {
+ IUser user = getUser();
+ Assert.isNotNull(user);
+ UserModel.getDefault().addUser(user);
+ }
+
}
\ No newline at end of file
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -58,7 +58,7 @@
private Text existingProjectNameText = null;
- public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard, IOpenShiftWizardModel
wizardModel) {
+ public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard,
IOpenShiftExpressWizardModel wizardModel) {
super("Setup Project",
"Configure your project and server adapter settings, then click 'next'
or 'finish'.",
"Project Configuration", wizard);
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -37,11 +37,11 @@
/** Whether the existing project is a valid one or not. */
public static final String PROPERTY_EXISTING_PROJECT_VALIDITY =
"existingProjectValidity";
- private IOpenShiftWizardModel wizardModel;
+ private IOpenShiftExpressWizardModel wizardModel;
private IStatus existingProjectValidity;
- public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftWizardModel wizardModel)
{
+ public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftExpressWizardModel
wizardModel) {
this.wizardModel = wizardModel;
setNewProject(true);
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-14
15:21:52 UTC (rev 38703)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-14
15:38:34 UTC (rev 38704)
@@ -34,7 +34,7 @@
import org.eclipse.wst.server.core.internal.Server;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
+import
org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftExpressWizardModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -49,7 +49,7 @@
public ServerAdapterFactory() {
}
- public void create(IProject project, IOpenShiftWizardModel wizardModel, IProgressMonitor
monitor) throws OpenShiftException {
+ public void create(IProject project, IOpenShiftExpressWizardModel wizardModel,
IProgressMonitor monitor) throws OpenShiftException {
createServerAdapter(project, wizardModel.getServerType(), wizardModel.getRuntime(),
wizardModel.getMode(),
wizardModel.getApplication(), wizardModel.getUser(), wizardModel.getRemoteName(),
monitor);
}