[jbosstools-commits] JBoss Tools SVN: r43579 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/wizard and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 11 05:40:32 EDT 2012


Author: adietish
Date: 2012-09-11 05:40:32 -0400 (Tue, 11 Sep 2012)
New Revision: 43579

Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.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/OpenShiftExpressApplicationWizard.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
Log:
[JBIDE-12142] replaced erroneous UserModel#addUser where the intent was to have the view refreshing a user. Replaced call to UserModel#addUser by UserModel#fireUserChanged

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java	2012-09-11 09:39:29 UTC (rev 43578)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java	2012-09-11 09:40:32 UTC (rev 43579)
@@ -92,6 +92,10 @@
 		fireModelChange(user, ADDED);
 	}
 
+	public void fireUserChanged(UserDelegate user) {
+		fireModelChange(user, CHANGED);
+	}
+	
 	public void removeUser(UserDelegate user) {
 		allUsers.remove(user.getUsername());
 		if (this.recentUser == user)

Modified: 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/IOpenShiftExpressWizardModel.java	2012-09-11 09:39:29 UTC (rev 43578)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftExpressWizardModel.java	2012-09-11 09:40:32 UTC (rev 43579)
@@ -193,8 +193,6 @@
 
 	public boolean setUseExistingApplication(boolean useExistingApplication);
 
-	public void addUserToModel();
-
 	public Set<IEmbeddableCartridge> setSelectedEmbeddableCartridges(
 			Set<IEmbeddableCartridge> selectedEmbeddableCartridges);
 

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-09-11 09:39:29 UTC (rev 43578)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java	2012-09-11 09:40:32 UTC (rev 43579)
@@ -152,8 +152,8 @@
 
 		boolean success = importProject();
 
-		wizardModel.addUserToModel();
-
+		wizardModel.fireUserChanged();
+		
 		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-09-11 09:39:29 UTC (rev 43578)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java	2012-09-11 09:40:32 UTC (rev 43579)
@@ -10,7 +10,6 @@
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jgit.api.errors.GitAPIException;
@@ -480,11 +479,8 @@
 		setServerType(ServerCore.findServerType(ExpressServerUtils.OPENSHIFT_SERVER_TYPE));
 	}			
 
-	@Override
-	public void addUserToModel() {
-		UserDelegate user = getUser();
-		Assert.isNotNull(user);
-		UserModel.getDefault().addUser(user);
+	public void fireUserChanged() {
+		UserModel.getDefault().fireUserChanged(getUser());
 	}
 
 }
\ No newline at end of file



More information about the jbosstools-commits mailing list