JBoss Tools SVN: r38449 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-06 16:01:29 -0500 (Mon, 06 Feb 2012)
New Revision: 38449
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
Log:
[JBIDE-10712] implemented IDomain#waitForAccessible. Built new client jar and embedded it into our client bundle
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
14 years, 2 months
JBoss Tools SVN: r38448 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-02-06 13:01:51 -0500 (Mon, 06 Feb 2012)
New Revision: 38448
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
Log:
fixed jsf.ui.test failure https://issues.jboss.org/browse/JBIDE-10793
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2012-02-06 16:55:09 UTC (rev 38447)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2012-02-06 18:01:51 UTC (rev 38448)
@@ -4,16 +4,14 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.MultiTextEdit;
+import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jsf.ui.el.refactoring.RenameMethodParticipant;
import org.jboss.tools.test.util.JobUtils;
@@ -59,7 +57,7 @@
assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
for(int i = 0; i < rootChange.getChildren().length;i++){
- TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
+ BaseFileChange fileChange = (BaseFileChange)rootChange.getChildren()[i];
MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
14 years, 2 months
JBoss Tools SVN: r38447 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard: appimport and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-06 11:55:09 -0500 (Mon, 06 Feb 2012)
New Revision: 38447
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.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/IOpenShiftWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportExistingApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
Log:
[JBIDE-10805] fixing NPE. could not completely verify yet - prod and stg are currently down
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -17,6 +17,7 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureUnsharedProject;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject;
@@ -24,7 +25,6 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
-import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
public class AbstractOpenShiftApplicationWizardModel extends ObservableUIPojo implements IOpenShiftWizardModel {
@@ -94,7 +94,7 @@
getProjectName()
, getApplication()
, getRemoteName()
- , getUser())
+ , OpenShiftUIActivator.getDefault().getUser())
.execute(monitor);
createServerAdapter(monitor, importedProjects);
}
@@ -132,7 +132,8 @@
getProjectName()
, getApplication()
, getRemoteName()
- , getUser())
+// , getUser())
+ , OpenShiftUIActivator.getDefault().getUser())
.execute(monitor);
createServerAdapter(monitor, importedProjects);
}
@@ -166,15 +167,17 @@
return dataModel.get(key);
}
- @Override
- public void setUser(IUser user) {
- setProperty(USER, user);
- }
+// @Override
+// public void setUser(IUser user) {
+// setProperty(USER, user);
+// OpenShiftUIActivator.getDefault().setUser(user);
+// }
- @Override
- public IUser getUser() {
- return (IUser) getProperty(USER);
- }
+// @Override
+// public IUser getUser() {
+// return (IUser) getProperty(USER);
+// return OpenShiftUIActivator.getDefault().getUser();
+// }
@Override
public IApplication getApplication() {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -26,7 +26,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Xavier Coulon
*
*/
@@ -52,7 +52,8 @@
}
public IUser getUser() {
- return wizardModel.getUser();
+// return wizardModel.getUser();
+ return OpenShiftUIActivator.getDefault().getUser();
}
public void loadExistingApplications() throws OpenShiftException {
@@ -77,7 +78,8 @@
}
public void loadCartridges() throws OpenShiftException {
- setCartridges(wizardModel.getUser().getCartridges());
+// setCartridges(wizardModel.getUser().getCartridges());
+ setCartridges(OpenShiftUIActivator.getDefault().getUser().getCartridges());
}
public void setCartridges(List<ICartridge> cartridges) {
@@ -99,7 +101,8 @@
}
public List<IEmbeddableCartridge> loadEmbeddableCartridges() throws OpenShiftException {
- List<IEmbeddableCartridge> cartridges = wizardModel.getUser().getEmbeddableCartridges();
+// List<IEmbeddableCartridge> cartridges = wizardModel.getUser().getEmbeddableCartridges();
+ List<IEmbeddableCartridge> cartridges = OpenShiftUIActivator.getDefault().getUser().getEmbeddableCartridges();
setEmbeddableCartridges(cartridges);
return cartridges;
}
@@ -155,7 +158,8 @@
public boolean hasApplication(ICartridge cartridge) {
try {
- return wizardModel.getUser().hasApplication(cartridge);
+// return wizardModel.getUser().hasApplication(cartridge);
+ return getUser().hasApplication(cartridge);
} catch (OpenShiftException e) {
OpenShiftUIActivator.log(OpenShiftUIActivator
.createErrorStatus("Could not get application by cartridge", e));
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -14,6 +14,7 @@
import java.util.List;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -63,7 +64,7 @@
}
public IUser getUser() {
- return wizardModel.getUser();
+ return OpenShiftUIActivator.getDefault().getUser();
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizard.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizard.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -49,13 +49,15 @@
public void addPages() {
final IUser user = OpenShiftUIActivator.getDefault().getUser();
try {
- if (user == null || !user.isValid()) {
+ if (user == null
+ || !user.isValid()) {
addPage(new CredentialsWizardPage(this));
- } else {
- getWizardModel().setUser(user);
+// } else {
+// getWizardModel().setUser(user);
}
} catch (OpenShiftException e) {
- // if the user's validity can't be checked, we may want to re-connect..
+ // if the user's validity can't be checked, we may want to
+ // re-connect..
addPage(new CredentialsWizardPage(this));
}
addPage(new ApplicationConfigurationWizardPage(this, getWizardModel()));
@@ -81,13 +83,13 @@
if (successfull) {
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.",
+ new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
+ "An exception occurred while creating local git repository.", e));
return false;
}
}
@@ -129,10 +131,11 @@
protected IStatus run(IProgressMonitor monitor) {
try {
- List<IEmbeddableCartridge> selectedCartridges = getWizardModel()
- .getSelectedEmbeddableCartridges();
+ List<IEmbeddableCartridge> selectedCartridges =
+ getWizardModel().getSelectedEmbeddableCartridges();
final IApplication application = getWizardModel().getApplication();
- if (selectedCartridges != null && !selectedCartridges.isEmpty()) {
+ if (selectedCartridges != null
+ && !selectedCartridges.isEmpty()) {
application.addEmbbedCartridges(selectedCartridges);
}
queue.offer(true);
@@ -150,5 +153,4 @@
return false;
}
}
-
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -5,11 +5,13 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftApplicationNotAvailableException;
import com.openshift.express.client.OpenShiftException;
@@ -37,7 +39,11 @@
}
public IApplication createApplication(String name, ICartridge cartridge, IProgressMonitor monitor) throws OpenShiftApplicationNotAvailableException, OpenShiftException {
- IApplication application = getUser().createApplication(name, cartridge);
+ IUser user = OpenShiftUIActivator.getDefault().getUser();
+ if (user == null) {
+ throw new OpenShiftException("Could not create application, have no valid user credentials");
+ }
+ IApplication application = user.createApplication(name, cartridge);
waitForAccessible(application, monitor);
return application;
}
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-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -12,6 +12,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.importexport.launchconfigurations.WizardMessages;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -126,7 +127,6 @@
this.user = new User(getRhLogin(), getPassword(), CLIENT_ID);
if (user.isValid()) {
status = Status.OK_STATUS;
- OpenShiftUIActivator.getDefault().setUser(user);
}
} catch (NotFoundOpenShiftException e) {
// valid user without domain
@@ -137,6 +137,9 @@
this.user = null;
}
+ if (status.isOK()) {
+ OpenShiftUIActivator.getDefault().setUser(user);
+ }
setCredentialsStatus(status);
return status;
}
Modified: 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-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -24,7 +24,6 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
-import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
/**
@@ -127,10 +126,10 @@
public Object getProperty(String key);
- public void setUser(IUser user);
+// public void setUser(IUser user);
+//
+// public IUser getUser();
- public IUser getUser();
-
public IApplication getApplication();
public String getApplicationName();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportExistingApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportExistingApplicationWizard.java 2012-02-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportExistingApplicationWizard.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -75,8 +75,6 @@
try {
if(user == null || !user.isValid()) {
addPage(new CredentialsWizardPage(this));
- } else {
- getWizardModel().setUser(user);
}
} catch (OpenShiftException e) {
// if the user's validity can't be checked, we may want to re-connect..
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-06 15:38:49 UTC (rev 38446)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-06 16:55:09 UTC (rev 38447)
@@ -51,7 +51,7 @@
public void create(IProject project, IOpenShiftWizardModel wizardModel, IProgressMonitor monitor) throws OpenShiftException {
createServerAdapter(project, wizardModel.getServerType(), wizardModel.getRuntime(), wizardModel.getMode(),
- wizardModel.getApplication(), wizardModel.getUser(), wizardModel.getRemoteName(), monitor);
+ wizardModel.getApplication(), OpenShiftUIActivator.getDefault().getUser(), wizardModel.getRemoteName(), monitor);
}
public void create(IProject project, IServerType serverType, IRuntime runtime, String mode,
14 years, 2 months
JBoss Tools SVN: r38446 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-06 10:38:49 -0500 (Mon, 06 Feb 2012)
New Revision: 38446
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
switched to latest client jar (replaced explicitly referenced configuration chain by the global configuration holder)
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-06 15:37:13 UTC (rev 38445)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-06 15:38:49 UTC (rev 38446)
@@ -20,13 +20,10 @@
import com.openshift.express.client.NotFoundOpenShiftException;
import com.openshift.express.client.OpenShiftException;
import com.openshift.express.client.User;
-import com.openshift.express.client.configuration.DefaultConfiguration;
-import com.openshift.express.client.configuration.SystemConfiguration;
-import com.openshift.express.client.configuration.SystemProperties;
-import com.openshift.express.client.configuration.UserConfiguration;
+import com.openshift.express.client.configuration.OpenShiftConfiguration;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*/
public class CredentialsWizardPageModel extends ObservableUIPojo {
@@ -66,11 +63,7 @@
protected String getUserConfiguration() {
String configuredUsername = null;
try {
- configuredUsername =
- new SystemProperties(
- new UserConfiguration(
- new SystemConfiguration(
- new DefaultConfiguration()))).getRhlogin();
+ configuredUsername = new OpenShiftConfiguration().getRhlogin();
} catch (Exception e) {
// do nothing
}
@@ -129,7 +122,7 @@
IStatus status = new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID, "Your credentails are not valid.");
try {
// reset without notifying
- //this.credentialsValidity = null;
+ // this.credentialsValidity = null;
this.user = new User(getRhLogin(), getPassword(), CLIENT_ID);
if (user.isValid()) {
status = Status.OK_STATUS;
@@ -143,7 +136,7 @@
} catch (Exception e) {
this.user = null;
}
-
+
setCredentialsStatus(status);
return status;
}
14 years, 2 months
JBoss Tools SVN: r38445 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.client: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-06 10:37:13 -0500 (Mon, 06 Feb 2012)
New Revision: 38445
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.0.1-SNAPSHOT.jar
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties
Log:
switched to latest client library
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-02-06 15:24:38 UTC (rev 38444)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-02-06 15:37:13 UTC (rev 38445)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="openshift-java-client-1.0.1-SNAPSHOT.jar" sourcepath="/openshift-java-client"/>
+ <classpathentry exported="true" kind="lib" path="openshift-java-client-1.1.1-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Final.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2012-02-06 15:24:38 UTC (rev 38444)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2012-02-06 15:37:13 UTC (rev 38445)
@@ -7,7 +7,7 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
jboss-dmr-1.0.0.Final.jar,
- openshift-java-client-1.0.1-SNAPSHOT.jar
+ openshift-java-client-1.1.1-SNAPSHOT.jar
Export-Package: com.openshift.express.client,
com.openshift.express.client.configuration,
com.openshift.express.client.utils
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties 2012-02-06 15:24:38 UTC (rev 38444)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties 2012-02-06 15:37:13 UTC (rev 38445)
@@ -3,6 +3,6 @@
bin.includes = META-INF/,\
.,\
jboss-dmr-1.0.0.Final.jar,\
- openshift-java-client-1.0.1-SNAPSHOT.jar
+ openshift-java-client-1.1.1-SNAPSHOT.jar
src.includes = openshift-java-client-1.0.1-SNAPSHOT.jar,\
jboss-dmr-1.0.0.Final.jar
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.0.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
14 years, 2 months
JBoss Tools SVN: r38444 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-06 10:24:38 -0500 (Mon, 06 Feb 2012)
New Revision: 38444
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10801 : quick n'dirty fix that replaces single & in text with & This should really be fixed more properly (replace all html entities with the proper equivalent ISO characters)
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-06 13:16:42 UTC (rev 38443)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-06 15:24:38 UTC (rev 38444)
@@ -1030,7 +1030,9 @@
// we replace the HTML entity with the standard xml version
// TODO: should probably be done earlier on but couldn't find where.
text = text.replaceAll(" ", " ");
-
+ //Temporary fix for JBIDE-10801
+ //FIXME find a generic way to replace entities with proper code
+ text = text.replaceAll(" & ", " & ");
formText.setText(text, true, true);
} catch(IllegalArgumentException se) {
formText.dispose();
14 years, 2 months
JBoss Tools SVN: r38443 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui/behaviour and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-06 08:16:42 -0500 (Mon, 06 Feb 2012)
New Revision: 38443
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
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/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.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/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:
extracted interface for openshift wizard model
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs 2012-02-06 13:16:42 UTC (rev 38443)
@@ -0,0 +1,4 @@
+#Tue Jan 31 17:15:49 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=12
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -45,8 +45,8 @@
import org.jboss.ide.eclipse.as.ui.editor.ServerWorkingCopyPropertyCommand;
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.ui.wizard.AbstractOpenShiftApplicationWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPageModel;
+import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -129,7 +129,7 @@
userLabel.setText("Username: ");
passLabel.setText("Password: ");
remoteLabel.setText("Remote: ");
- remoteText.setText(AbstractOpenShiftApplicationWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
+ remoteText.setText(IOpenShiftWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
String n = ExpressServerUtils.getExpressUsername(server);
String p = ExpressServerUtils.getExpressPassword(server.getOriginal());
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java 2012-02-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -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.wizard;
import java.io.IOException;
@@ -21,7 +31,11 @@
import com.openshift.express.client.OpenShiftException;
-public abstract class AbstractOpenShiftApplicationWizard<T extends AbstractOpenShiftApplicationWizardModel> extends Wizard {
+/**
+ * @author Andre Dietisheim
+ *
+ */
+public abstract class AbstractOpenShiftApplicationWizard<T extends IOpenShiftWizardModel> extends Wizard {
private T wizardModel;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -17,8 +17,6 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
-import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureUnsharedProject;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject;
@@ -29,28 +27,9 @@
import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
-public class AbstractOpenShiftApplicationWizardModel extends ObservableUIPojo {
+public class AbstractOpenShiftApplicationWizardModel extends ObservableUIPojo implements IOpenShiftWizardModel {
protected HashMap<String, Object> dataModel = new HashMap<String, Object>();
- public static final String NEW_PROJECT = "enableProject";
- public static final String USER = "user";
- public static final String APPLICATION = "application";
- 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();
-
public AbstractOpenShiftApplicationWizardModel() {
super();
// default value(s)
@@ -74,6 +53,7 @@
* @throws URISyntaxException
* @throws InvocationTargetException
*/
+ @Override
public void importProject(IProgressMonitor monitor) throws OpenShiftException, CoreException, InterruptedException,
URISyntaxException, InvocationTargetException {
List<IProject> importedProjects = new ImportNewProject(getProjectName(), getApplication(), getRemoteName(),
@@ -106,6 +86,7 @@
* @throws CoreException
* The user project could not be shared with the git
*/
+ @Override
public void configureUnsharedProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
URISyntaxException {
@@ -143,6 +124,7 @@
* @throws CoreException
* The user project could not be shared with the git
*/
+ @Override
public void configureGitSharedProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
URISyntaxException {
@@ -162,6 +144,7 @@
new ServerAdapterFactory().create(project, this, monitor);
}
+ @Override
public File getRepositoryFile() {
String repositoryPath = getRepositoryPath();
if (repositoryPath == null || repositoryPath.length() == 0) {
@@ -170,6 +153,7 @@
return new File(repositoryPath, getApplicationName());
}
+ @Override
public Object setProperty(String key, Object value) {
Object oldVal = dataModel.get(key);
dataModel.put(key, value);
@@ -177,22 +161,27 @@
return value;
}
+ @Override
public Object getProperty(String key) {
return dataModel.get(key);
}
+ @Override
public void setUser(IUser user) {
setProperty(USER, user);
}
+ @Override
public IUser getUser() {
return (IUser) getProperty(USER);
}
+ @Override
public IApplication getApplication() {
return (IApplication) getProperty(APPLICATION);
}
+ @Override
public String getApplicationName() {
String applicationName = null;
IApplication application = getApplication();
@@ -202,6 +191,7 @@
return applicationName;
}
+ @Override
public ICartridge getApplicationCartridge() {
ICartridge cartridge = null;
IApplication application = getApplication();
@@ -211,6 +201,7 @@
return cartridge;
}
+ @Override
public String getApplicationCartridgeName() {
String cartridgeName = null;
ICartridge cartridge = getApplicationCartridge();
@@ -220,47 +211,58 @@
return cartridgeName;
}
+ @Override
public void setApplication(IApplication application) {
setProperty(APPLICATION, application);
}
+ @Override
public String setRemoteName(String remoteName) {
setProperty(REMOTE_NAME, remoteName);
return remoteName;
}
+ @Override
public String getRemoteName() {
return (String) getProperty(REMOTE_NAME);
}
+ @Override
public String setRepositoryPath(String repositoryPath) {
return (String) setProperty(REPOSITORY_PATH, repositoryPath);
}
+ @Override
public String getRepositoryPath() {
return (String) getProperty(REPOSITORY_PATH);
}
+ @Override
public boolean isNewProject() {
return (Boolean) getProperty(NEW_PROJECT);
}
+ @Override
public boolean isExistingProject() {
return !((Boolean) getProperty(NEW_PROJECT));
}
+ @Override
public Boolean setNewProject(boolean newProject) {
return (Boolean) setProperty(NEW_PROJECT, newProject);
}
+ @Override
public Boolean setExistingProject(boolean existingProject) {
return (Boolean) setProperty(NEW_PROJECT, !existingProject);
}
+ @Override
public String setProjectName(String projectName) {
return (String) setProperty(PROJECT_NAME, projectName);
}
+ @Override
public boolean isGitSharedProject() {
return EGitUtils.isSharedWithGit(getProject());
}
@@ -268,39 +270,48 @@
private IProject getProject() {
return ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName());
}
+ @Override
public Boolean setCreateServerAdapter(Boolean createServerAdapter) {
return (Boolean) setProperty(CREATE_SERVER_ADAPTER, createServerAdapter);
}
+ @Override
public String getProjectName() {
return (String) getProperty(PROJECT_NAME);
}
+ @Override
public String setMergeUri(String mergeUri) {
return (String) setProperty(MERGE_URI, mergeUri);
}
+ @Override
public String getMergeUri() {
return (String) getProperty(MERGE_URI);
}
+ @Override
public IRuntime getRuntime() {
return (IRuntime) getProperty(RUNTIME_DELEGATE);
}
+ @Override
public String getMode() {
return (String) getProperty(PUBLICATION_MODE);
}
+ @Override
public boolean isCreateServerAdapter() {
Boolean isCreateServer = (Boolean) getProperty(CREATE_SERVER_ADAPTER);
return isCreateServer != null && isCreateServer.booleanValue();
}
+ @Override
public IServerType getServerType() {
return (IServerType) getProperty(SERVER_TYPE);
}
+ @Override
public void setServerType(IServerType serverType) {
setProperty(SERVER_TYPE, serverType);
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java 2012-02-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -53,7 +53,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*/
public class ApplicationSelectionWizardPage extends AbstractOpenShiftWizardPage {
@@ -61,7 +61,7 @@
private TableViewer tableViewer;
private final ApplicationSelectionWizardPageModel pageModel;
- public ApplicationSelectionWizardPage(IWizard wizard, AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ApplicationSelectionWizardPage(IWizard wizard, IOpenShiftWizardModel wizardModel) {
super("Application selection", "Click 'next' or select another application to import.",
"Application selection", wizard);
this.pageModel = new ApplicationSelectionWizardPageModel(wizardModel);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -20,7 +20,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*
*/
@@ -31,9 +31,9 @@
public static final String PROPERTY_SELECTED_APPLICATION = "selectedApplication";
private IApplication selectedApplication;
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
- public ApplicationSelectionWizardPageModel(AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ApplicationSelectionWizardPageModel(IOpenShiftWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
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-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -51,7 +51,7 @@
private Button useDefaultRepoPathButton;
private Text remoteNameText;
- public GitCloningSettingsWizardPage(AbstractOpenShiftApplicationWizard<?> wizard, AbstractOpenShiftApplicationWizardModel model) {
+ public GitCloningSettingsWizardPage(AbstractOpenShiftApplicationWizard<?> wizard, IOpenShiftWizardModel 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.",
@@ -60,7 +60,7 @@
setPageComplete(false);
}
- public GitCloningSettingsWizardPage(ImportExistingApplicationWizard wizard, AbstractOpenShiftApplicationWizardModel model) {
+ public GitCloningSettingsWizardPage(ImportExistingApplicationWizard wizard, IOpenShiftWizardModel 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-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -53,7 +53,7 @@
public static final String PROPERTY_CUSTOM_REMOTE_NAME_VALIDITY = "customRemoteNameValidity";
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
private boolean loading;
private boolean useDefaultRepoPath = true;
@@ -64,7 +64,7 @@
private boolean useDefaultRemoteName = true;
- public GitCloningSettingsWizardPageModel(AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public GitCloningSettingsWizardPageModel(IOpenShiftWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
Added: 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 (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * 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.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 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
+ */
+ public void importProject(IProgressMonitor monitor) throws OpenShiftException, CoreException, InterruptedException,
+ URISyntaxException, InvocationTargetException;
+
+ /**
+ * 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 String getApplicationCartridgeName();
+
+ 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 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);
+
+}
\ 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/IOpenShiftWizardModel.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/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -46,7 +46,7 @@
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Xavier Coulon
*/
public class ProjectAndServerAdapterSettingsWizardPage extends AbstractOpenShiftWizardPage {
@@ -57,7 +57,7 @@
private Text existingProjectNameText = null;
- public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard, AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard, IOpenShiftWizardModel wizardModel) {
super("Project configuration",
"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-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -18,7 +18,7 @@
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Xavier Coulon
*
*/
@@ -36,11 +36,11 @@
/** Whether the existing project is a valid one or not. */
public static final String PROPERTY_EXISTING_PROJECT_VALIDITY = "existingProjectValidity";
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
private IStatus existingProjectValidity;
- public ProjectAndServerAdapterSettingsWizardPageModel(AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftWizardModel 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-06 10:50:32 UTC (rev 38442)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-06 13:16:42 UTC (rev 38443)
@@ -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.AbstractOpenShiftApplicationWizardModel;
+import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -42,13 +42,14 @@
/**
* @author André Dietisheim <adietish(a)redhat.com>
+ * @author Rob Stryker
*/
public class ServerAdapterFactory {
public ServerAdapterFactory() {
}
- public void create(IProject project, AbstractOpenShiftApplicationWizardModel wizardModel, IProgressMonitor monitor) throws OpenShiftException {
+ public void create(IProject project, IOpenShiftWizardModel wizardModel, IProgressMonitor monitor) throws OpenShiftException {
createServerAdapter(project, wizardModel.getServerType(), wizardModel.getRuntime(), wizardModel.getMode(),
wizardModel.getApplication(), wizardModel.getUser(), wizardModel.getRemoteName(), monitor);
}
14 years, 2 months
JBoss Tools SVN: r38442 - in trunk: portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/importing and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-02-06 05:50:32 -0500 (Mon, 06 Feb 2012)
New Revision: 38442
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/NonSystemJobRunsCondition.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ShellIsActiveCondition.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/TaskDuration.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotImportWizard.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotNewObjectWizard.java
Removed:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/TaskDuration.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/NonSystemJobRunsCondition.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/ShellIsActiveCondition.java
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/importing/ImportingTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitUntilTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitWhileTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardFillingTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
Log:
Moved some of the wizard functionality from portlet to swtbotext
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -2,10 +2,10 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
-import org.jboss.tools.portlet.ui.bot.task.wait.TaskDuration;
import org.jboss.tools.portlet.ui.bot.task.wait.WaitWhileTask;
-import org.jboss.tools.portlet.ui.bot.task.wait.condition.NonSystemJobRunsCondition;
-import org.jboss.tools.portlet.ui.bot.task.wait.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
+import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
public class ProjectPropertyDialogCloseTask extends AbstractSWTTask {
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/importing/ImportingTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/importing/ImportingTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/importing/ImportingTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -1,12 +1,7 @@
package org.jboss.tools.portlet.ui.bot.task.importing;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
-import org.jboss.tools.ui.bot.ext.SWTBotFactory;
-import org.jboss.tools.ui.bot.ext.gen.IImport;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotImportWizard;
/**
* Imports the specified object under the specified category.
@@ -33,22 +28,14 @@
@Override
public void perform() {
- IImport importPath = new IImport() {
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public List<String> getGroupPath() {
- if (category == null){
- return Collections.emptyList();
- }
-
- return Arrays.asList(category.split("/"));
- }
- };
- SWTBotFactory.getOpen().newImport(importPath);
+ new SWTBotImportWizard().open(name, getGroupPath());
}
+
+ private String[] getGroupPath() {
+ if (category == null){
+ return new String[0];
+ }
+
+ return category.split("/");
+ }
}
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/TaskDuration.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/TaskDuration.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/TaskDuration.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -1,15 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.task.wait;
-
-public enum TaskDuration {
- SHORT(1 * 1000), NORMAL(10 * 1000), LONG(1 * 60 * 1000), VERY_LONG(10 * 60 * 1000);
-
- private long timeout;
-
- private TaskDuration(long timeout) {
- this.timeout = timeout;
- }
-
- public long getTimeout() {
- return timeout;
- }
-}
\ No newline at end of file
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitUntilTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitUntilTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitUntilTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -2,6 +2,7 @@
import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
* Waits for the specified condition with the specified timeout.
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitWhileTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitWhileTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/WaitWhileTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -2,6 +2,7 @@
import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
* Waits while the specified condition is valid with the specified timeout.
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/NonSystemJobRunsCondition.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/NonSystemJobRunsCondition.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/NonSystemJobRunsCondition.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -1,46 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.task.wait.condition;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
-
-/**
- * Returns true, if there is a non system job running, false
- * otherwise.
- *
- * @author Lucia Jelinkova
- *
- */
-public class NonSystemJobRunsCondition implements ICondition {
-
- @Override
- public boolean test() throws Exception {
- return getJobs().size() != 0;
- }
-
- @Override
- public void init(SWTBot bot) {
- }
-
- @Override
- public String getFailureMessage() {
- StringBuilder msg = new StringBuilder("Expected no running jobs, found the following jobs: \n");
- for (Job job : getJobs()){
- msg.append(job.getName() + "\n");
- }
- return msg.toString();
- }
-
- private List<Job> getJobs(){
- List<Job> jobs = new ArrayList<Job>();
- for (Job job : Job.getJobManager().find(null)){
- if (!job.isSystem() && Job.SLEEPING != job.getState()){
- jobs.add(job);
- }
- }
- return jobs;
- }
-}
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/ShellIsActiveCondition.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/ShellIsActiveCondition.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/ShellIsActiveCondition.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -1,35 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.task.wait.condition;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-
-/**
- * Returns true while the specified shell is active.
- *
- * @author Lucia Jelinkova
- *
- */
-public class ShellIsActiveCondition implements ICondition {
-
- private SWTBotShell shell;
-
- public ShellIsActiveCondition(SWTBotShell shell) {
- super();
- this.shell = shell;
- }
-
- @Override
- public void init(SWTBot bot) {
- }
-
- @Override
- public boolean test() throws Exception {
- return shell.isActive();
- }
-
- @Override
- public String getFailureMessage() {
- return "Expected the shell to become non active: " + shell;
- }
-}
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardFillingTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardFillingTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardFillingTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -5,10 +5,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.task.CompositeSWTTask;
-import org.jboss.tools.portlet.ui.bot.task.wait.TaskDuration;
-import org.jboss.tools.portlet.ui.bot.task.wait.WaitWhileTask;
-import org.jboss.tools.portlet.ui.bot.task.wait.condition.NonSystemJobRunsCondition;
-import org.jboss.tools.portlet.ui.bot.task.wait.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotNewObjectWizard;
/**
*
@@ -29,14 +26,10 @@
@Override
public void perform() {
- SWTBotShell activeShell = getActiveShell();
-
super.setTasks(wizardPages);
super.perform();
- getBot().button("Finish").click();
- performInnerTask(new WaitWhileTask(new ShellIsActiveCondition(activeShell), TaskDuration.LONG));
- performInnerTask(new WaitWhileTask(new NonSystemJobRunsCondition(), TaskDuration.LONG));
+ new SWTBotNewObjectWizard().finishWithWait();
}
public void addWizardPage(WizardPageFillingTask task){
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -1,12 +1,7 @@
package org.jboss.tools.portlet.ui.bot.task.wizard;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
-import org.jboss.tools.ui.bot.ext.SWTBotFactory;
-import org.jboss.tools.ui.bot.ext.gen.INewObject;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotNewObjectWizard;
/**
* Opens a specified wizard.
@@ -37,22 +32,14 @@
@Override
public void perform() {
- INewObject wizardPath = new INewObject() {
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public List<String> getGroupPath() {
- if (category == null){
- return Collections.emptyList();
- }
-
- return Arrays.asList(category.split("/"));
- }
- };
- SWTBotFactory.getOpen().newObject(wizardPath);
+ new SWTBotNewObjectWizard().open(name, getGroupPath());
}
+
+ private String[] getGroupPath() {
+ if (category == null){
+ return new String[0];
+ }
+
+ return category.split("/");
+ }
}
Copied: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/NonSystemJobRunsCondition.java (from rev 38107, trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/NonSystemJobRunsCondition.java)
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/NonSystemJobRunsCondition.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/NonSystemJobRunsCondition.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -0,0 +1,46 @@
+package org.jboss.tools.ui.bot.ext.condition;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+
+/**
+ * Returns true, if there is a non system job running, false
+ * otherwise.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class NonSystemJobRunsCondition implements ICondition {
+
+ @Override
+ public boolean test() throws Exception {
+ return getJobs().size() != 0;
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public String getFailureMessage() {
+ StringBuilder msg = new StringBuilder("Expected no running jobs, found the following jobs: \n");
+ for (Job job : getJobs()){
+ msg.append(job.getName() + "\n");
+ }
+ return msg.toString();
+ }
+
+ private List<Job> getJobs(){
+ List<Job> jobs = new ArrayList<Job>();
+ for (Job job : Job.getJobManager().find(null)){
+ if (!job.isSystem() && Job.SLEEPING != job.getState()){
+ jobs.add(job);
+ }
+ }
+ return jobs;
+ }
+}
Copied: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ShellIsActiveCondition.java (from rev 38107, trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/condition/ShellIsActiveCondition.java)
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ShellIsActiveCondition.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ShellIsActiveCondition.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -0,0 +1,35 @@
+package org.jboss.tools.ui.bot.ext.condition;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+
+/**
+ * Returns true while the specified shell is active.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class ShellIsActiveCondition implements ICondition {
+
+ private SWTBotShell shell;
+
+ public ShellIsActiveCondition(SWTBotShell shell) {
+ super();
+ this.shell = shell;
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ return shell.isActive();
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return "Expected the shell to become non active: " + shell;
+ }
+}
Copied: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/TaskDuration.java (from rev 38107, trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wait/TaskDuration.java)
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/TaskDuration.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/TaskDuration.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -0,0 +1,15 @@
+package org.jboss.tools.ui.bot.ext.condition;
+
+public enum TaskDuration {
+ SHORT(1 * 1000), NORMAL(10 * 1000), LONG(1 * 60 * 1000), VERY_LONG(10 * 60 * 1000);
+
+ private long timeout;
+
+ private TaskDuration(long timeout) {
+ this.timeout = timeout;
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+}
\ No newline at end of file
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotImportWizard.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotImportWizard.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotImportWizard.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -0,0 +1,40 @@
+package org.jboss.tools.ui.bot.ext.wizards;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.gen.IImport;
+
+
+/**
+ * Provides actions for opening and navigating import wizard.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class SWTBotImportWizard extends SWTBotWizard {
+
+ public void open(IImport importObject){
+ SWTBotFactory.getOpen().newImport(importObject);
+ }
+
+ public void open(String name, String... path){
+ SWTBotFactory.getOpen().newImport(createImportObject(name, path));
+ }
+
+ private IImport createImportObject(final String name, final String... path){
+ return new IImport() {
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public List<String> getGroupPath() {
+ return Arrays.asList(path);
+ }
+ };
+ }
+}
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotNewObjectWizard.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotNewObjectWizard.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotNewObjectWizard.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -0,0 +1,39 @@
+package org.jboss.tools.ui.bot.ext.wizards;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.gen.INewObject;
+
+/**
+ * Provides actions for opening and navigating new object wizard.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class SWTBotNewObjectWizard extends SWTBotWizard {
+
+ public void open(INewObject newObject){
+ SWTBotFactory.getOpen().newObject(newObject);
+ }
+
+ public void open(String name, String... path){
+ SWTBotFactory.getOpen().newObject(createNewObject(name, path));
+ }
+
+ private INewObject createNewObject(final String name, final String... path){
+ return new INewObject() {
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public List<String> getGroupPath() {
+ return Arrays.asList(path);
+ }
+ };
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java 2012-02-06 08:42:18 UTC (rev 38441)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java 2012-02-06 10:50:32 UTC (rev 38442)
@@ -14,6 +14,9 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
+import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
public class SWTBotWizard extends SWTBotShell {
@@ -49,7 +52,14 @@
public void finish() {
clickButton(IDELabel.Button.FINISH);
}
-
+
+ public void finishWithWait() {
+ SWTBotShell activeShell = getActiveShell();
+ finish();
+ bot().waitWhile(new ShellIsActiveCondition(activeShell), TaskDuration.LONG.getTimeout());
+ bot().waitWhile(new NonSystemJobRunsCondition(), TaskDuration.LONG.getTimeout());
+ }
+
protected void clickButton(String text) {
bot().button(text).click();
bot().sleep(500);
@@ -60,4 +70,14 @@
t.setFocus();
t.setText(text);
}
+
+ private SWTBotShell getActiveShell(){
+ for (SWTBotShell shell : bot().shells()){
+ if (shell.isActive()){
+ return shell;
+ }
+ }
+
+ throw new IllegalStateException("No active shell found");
+ }
}
14 years, 2 months
JBoss Tools SVN: r38441 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-06 03:42:18 -0500 (Mon, 06 Feb 2012)
New Revision: 38441
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentTypeUIUtil.java
Log:
JBIDE-10797 - compile error
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentTypeUIUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentTypeUIUtil.java 2012-02-06 08:20:24 UTC (rev 38440)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentTypeUIUtil.java 2012-02-06 08:42:18 UTC (rev 38441)
@@ -90,7 +90,6 @@
// }
j.schedule();
}
- @Override
public void setErrorMessage(String msg) {
if( completable != null )
completable.setComplete(msg == null);
14 years, 2 months
JBoss Tools SVN: r38440 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-02-06 03:20:24 -0500 (Mon, 06 Feb 2012)
New Revision: 38440
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java
Log:
Removing unused imports
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java 2012-02-06 08:14:42 UTC (rev 38439)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java 2012-02-06 08:20:24 UTC (rev 38440)
@@ -1,46 +1,18 @@
package org.jboss.tools.central.test.ui.bot;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
-
-import java.awt.Button;
import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton;
-import org.eclipse.ui.forms.widgets.Twistie;
-import org.hamcrest.core.IsAnything;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.SWTFormsBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.config.ConfiguredState.Server;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.Perspective.JBOSSAS;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS71;
-import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.types.JobState;
-import org.jboss.tools.ui.bot.ext.widgets.SWTBotSection;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import com.sun.org.apache.xml.internal.serializer.utils.Utils;
-
//@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
public class CreateProjectsTest extends SWTTestExt{
14 years, 2 months