JBoss Tools SVN: r38819 - 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-16 07:57:52 -0500 (Thu, 16 Feb 2012)
New Revision: 38819
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
[JBIDE-10933] when prefilling username/pw, now 1.) use the selected user OR 2.) user from preferences OR 4.) configured user
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-16 12:51:45 UTC (rev 38818)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16 12:57:52 UTC (rev 38819)
@@ -21,6 +21,7 @@
import org.jboss.tools.openshift.express.internal.ui.utils.OpenShiftPasswordStorageKey;
import org.jboss.tools.openshift.express.internal.ui.utils.SecurePasswordStore;
import org.jboss.tools.openshift.express.internal.ui.utils.SecurePasswordStoreException;
+import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import com.openshift.express.client.IUser;
import com.openshift.express.client.NotFoundOpenShiftException;
@@ -69,9 +70,9 @@
return null;
}
- private SecurePasswordStore initSecureStore(final String platform, final String username) {
+ private SecurePasswordStore initSecureStore(final String platform, final String rhLogin) {
SecurePasswordStore store = null;
- final OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(platform, username);
+ final OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(platform, rhLogin);
if (key != null) {
store = new SecurePasswordStore(key);
}
@@ -80,19 +81,25 @@
protected String initRhLogin() {
String rhLogin = null;
- rhLogin = rhLoginPreferenceValue.get();
- if (rhLogin == null || rhLogin.length() == 0) {
- rhLogin = getUserConfiguration();
+ IUser user = wizardModel.getUser();
+ if (user != null) {
+ rhLogin = user.getRhlogin();
+ } else {
+ rhLogin = rhLoginPreferenceValue.get();
+ if (rhLogin == null || rhLogin.length() == 0) {
+ rhLogin = getConfiguredUserName();
+ }
}
return rhLogin;
}
protected String initPassword() {
String password = null;
- if (libraServer != null && rhLogin != null && !rhLogin.isEmpty() && store != null) {
+ if (!StringUtils.isEmpty(libraServer)
+ && !StringUtils.isEmpty(rhLogin) && store != null) {
try {
password = store.getPassword();
- setRememberPassword(this.password != null && !this.password.isEmpty());
+ setRememberPassword(!StringUtils.isEmpty(password));
} catch (SecurePasswordStoreException e) {
Logger.error("Failed to retrieve OpenShift user's password from Secured Store", e);
}
@@ -120,7 +127,7 @@
}
}
- protected String getUserConfiguration() {
+ protected String getConfiguredUserName() {
String configuredUsername = null;
try {
configuredUsername = new OpenShiftConfiguration().getRhlogin();
12 years, 8 months
JBoss Tools SVN: r38818 - trunk/forge/plugins/org.jboss.tools.forge.runtime.ext.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-16 07:51:45 -0500 (Thu, 16 Feb 2012)
New Revision: 38818
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
Log:
fix compilation problem
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath 2012-02-16 12:48:15 UTC (rev 38817)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath 2012-02-16 12:51:45 UTC (rev 38818)
@@ -3,5 +3,6 @@
<classpathentry kind="src" path="src"/>
<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"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.jboss.tools.forge.runtime"/>
<classpathentry kind="output" path="bin"/>
</classpath>
12 years, 8 months
JBoss Tools SVN: r38817 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/viewer and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 07:48:15 -0500 (Thu, 16 Feb 2012)
New Revision: 38817
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/viewer/OpenShiftExpressConsoleLabelProvider.java
Log:
updated to latest client
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-02-16 12:46:43 UTC (rev 38816)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-02-16 12:48:15 UTC (rev 38817)
@@ -31,32 +31,33 @@
import com.openshift.express.client.configuration.OpenShiftConfiguration;
public class UserModel {
- private static final String USER_ID = OpenShiftUIActivator.PLUGIN_ID + " " +
+ private static final String USER_ID = OpenShiftUIActivator.PLUGIN_ID + " " +
OpenShiftUIActivator.getDefault().getBundle().getVersion();
private static UserModel model;
+
public static UserModel getDefault() {
- if( model == null )
+ if (model == null)
model = new UserModel();
return model;
- }
-
+ }
+
/** The most recent user connected on OpenShift. */
private IUser recentUser = null;
- private HashMap<String, IUser> allUsers = new HashMap<String,IUser>();
+ private HashMap<String, IUser> allUsers = new HashMap<String, IUser>();
private ArrayList<IUserModelListener> listeners = new ArrayList<IUserModelListener>();
-
+
public UserModel() {
load();
}
-
+
public void addListener(IUserModelListener listener) {
listeners.add(listener);
}
-
+
public void removeListener(IUserModelListener listener) {
listeners.remove(listener);
}
-
+
/**
* Create a user for temporary external use
*
@@ -74,31 +75,23 @@
private static final int ADDED = 0;
private static final int REMOVED = 1;
private static final int CHANGED = 2;
-
+
public void addUser(IUser user) {
- try {
- allUsers.put(user.getRhlogin(), user);
- this.recentUser = user;
- fireModelChange(user, ADDED);
- } catch(OpenShiftException ose ) {
- // TODO
- }
+ allUsers.put(user.getRhlogin(), user);
+ this.recentUser = user;
+ fireModelChange(user, ADDED);
}
public void removeUser(IUser user) {
- try {
- allUsers.remove(user.getRhlogin());
- if( this.recentUser == user )
- this.recentUser = null;
- fireModelChange(user, REMOVED);
- } catch(OpenShiftException ose ) {
- // TODO
- }
+ allUsers.remove(user.getRhlogin());
+ if (this.recentUser == user)
+ this.recentUser = null;
+ fireModelChange(user, REMOVED);
}
private void fireModelChange(IUser user, int type) {
Iterator<IUserModelListener> i = listeners.iterator();
- while(i.hasNext()) {
+ while (i.hasNext()) {
IUserModelListener l = i.next();
switch (type) {
case ADDED:
@@ -116,71 +109,71 @@
}
}
}
-
+
public IUser getRecentUser() {
return recentUser;
}
-
+
public void setRecentUser(IUser user) {
this.recentUser = user;
}
-
+
public IUser findUser(String username) {
return allUsers.get(username);
}
-
+
public IUser[] getUsers() {
Collection<IUser> c = allUsers.values();
IUser[] rets = (IUser[]) c.toArray(new IUser[c.size()]);
return rets;
}
-
+
/**
* Load the user list from preferences and secure storage
*/
public void load() {
- StringsPreferenceValue pref = new StringsPreferenceValue('|', RHLOGIN_LIST_PREFS_KEY, OpenShiftUIActivator.PLUGIN_ID);
+ StringsPreferenceValue pref = new StringsPreferenceValue('|', RHLOGIN_LIST_PREFS_KEY,
+ OpenShiftUIActivator.PLUGIN_ID);
String[] users = pref.get();
- for( int i = 0; i < users.length; i++ ) {
+ for (int i = 0; i < users.length; i++) {
try {
String password = getPasswordFromSecureStorage(users[i]);
IUser u = createUser(users[i], password);
addUser(u);
- } catch(OpenShiftException ose ) {
- // TODO
- } catch( IOException ioe) {
+ } catch (OpenShiftException ose) {
// TODO
+ } catch (IOException ioe) {
+ // TODO
}
}
}
-
+
/**
* Save the user list to preferences and secure storage
*/
public void save() {
- // passwords are already in secure storage, save the username list somewhere else
+ // passwords are already in secure storage, save the username list
+ // somewhere else
Set<String> set = allUsers.keySet();
String[] userList = (String[]) set.toArray(new String[set.size()]);
- StringsPreferenceValue pref = new StringsPreferenceValue('|', RHLOGIN_LIST_PREFS_KEY, OpenShiftUIActivator.PLUGIN_ID);
+ StringsPreferenceValue pref = new StringsPreferenceValue('|', RHLOGIN_LIST_PREFS_KEY,
+ OpenShiftUIActivator.PLUGIN_ID);
pref.store(userList);
-
+
Iterator<IUser> i = allUsers.values().iterator();
IUser tmp;
- while(i.hasNext()) {
+ while (i.hasNext()) {
tmp = i.next();
- try {
- setPasswordInSecureStorage(tmp.getRhlogin(), tmp.getPassword());
- } catch(OpenShiftException ose ) {
- // TODO log
- }
+ setPasswordInSecureStorage(tmp.getRhlogin(), tmp.getPassword());
}
}
-
+
private static final String RECENT_RHLOGIN_PREFS_KEY = "org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardModel_RHLOGIN";
private static final String RHLOGIN_LIST_PREFS_KEY = "org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardModel_RHLOGIN_LIST";
/**
* Get the username stored in preferences as most recently used
+ *
* @return
*/
public String getDefaultUsername() {
@@ -204,24 +197,25 @@
*/
public boolean setDefaultUsername(String rhLogin) {
String prev = getDefaultUsername();
- StringPreferenceValue preference = new StringPreferenceValue(RECENT_RHLOGIN_PREFS_KEY, OpenShiftUIActivator.PLUGIN_ID);
+ StringPreferenceValue preference = new StringPreferenceValue(RECENT_RHLOGIN_PREFS_KEY,
+ OpenShiftUIActivator.PLUGIN_ID);
if (rhLogin != null && !rhLogin.equals(prev)) {
preference.store(rhLogin);
return true;
}
return false;
}
-
+
/*
- * Return a password from secure storage, or
- * null if platform not found, or password not stored
+ * Return a password from secure storage, or null if platform not found, or
+ * password not stored
*/
public String getPasswordFromSecureStorage(final String rhLogin) {
- if( rhLogin == null )
+ if (rhLogin == null)
return null;
-
+
SecurePasswordStore store = getSecureStore(rhLogin);
- if( store != null && rhLogin != null && !rhLogin.isEmpty() ) {
+ if (store != null && rhLogin != null && !rhLogin.isEmpty()) {
try {
return store.getPassword();
} catch (SecurePasswordStoreException e) {
@@ -230,10 +224,10 @@
}
return null;
}
-
+
public void setPasswordInSecureStorage(final String rhLogin, String password) {
SecurePasswordStore store = getSecureStore(rhLogin);
- if( store != null && rhLogin != null && !rhLogin.isEmpty() ) {
+ if (store != null && rhLogin != null && !rhLogin.isEmpty()) {
try {
store.setPassword(password);
} catch (SecurePasswordStoreException e) {
@@ -242,7 +236,6 @@
}
}
-
private SecurePasswordStore getSecureStore(final String rhLogin) {
return getSecureStore(initLibraServer(), rhLogin);
}
@@ -251,7 +244,7 @@
* Return a secure store or null if platform is not found
*/
private SecurePasswordStore getSecureStore(final String platform, final String username) {
- if( platform == null )
+ if (platform == null)
return null;
final OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(platform, username);
SecurePasswordStore store = new SecurePasswordStore(key);
@@ -267,5 +260,4 @@
return null;
}
-
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-02-16 12:46:43 UTC (rev 38816)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-02-16 12:48:15 UTC (rev 38817)
@@ -16,13 +16,11 @@
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.swt.graphics.Image;
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.viewer.OpenShiftExpressConsoleContentProvider.LoadingStub;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
import com.openshift.express.client.IUser;
-import com.openshift.express.client.OpenShiftException;
/**
* @author Xavier Coulon
@@ -64,10 +62,10 @@
if (element instanceof IEmbeddableCartridge) {
return OpenShiftUIActivator.getDefault().createImage("task-repository.gif");
}
- if( element instanceof LoadingStub) {
+ if (element instanceof LoadingStub) {
return OpenShiftUIActivator.getDefault().createImage("systemprocess.gif");
}
-
+
return null;
}
@@ -79,14 +77,10 @@
@Override
public StyledString getStyledText(Object element) {
if (element instanceof IUser) {
- try {
- String message = ((IUser) element).getRhlogin();
- StyledString styledString = new StyledString(message);
- styledString.setStyle(0, message.length(), StyledString.DECORATIONS_STYLER);
- return new StyledString(message);
- } catch (OpenShiftException e) {
- Logger.error("Failed to retrieve user's OpenShift login", e);
- }
+ String message = ((IUser) element).getRhlogin();
+ StyledString styledString = new StyledString(message);
+ styledString.setStyle(0, message.length(), StyledString.DECORATIONS_STYLER);
+ return new StyledString(message);
}
if (element instanceof IApplication) {
IApplication app = (IApplication) element;
@@ -98,7 +92,7 @@
sb.append(appType);
StyledString styledString = new StyledString(sb.toString());
styledString.setStyle(appName.length() + 1, appType.length(), StyledString.QUALIFIER_STYLER);
- return styledString;
+ return styledString;
}
if (element instanceof IEmbeddableCartridge) {
String message = ((IEmbeddableCartridge) element).getName();
@@ -106,8 +100,8 @@
styledString.setStyle(0, message.length(), StyledString.DECORATIONS_STYLER);
return new StyledString(message);
}
-
- if( element instanceof LoadingStub) {
+
+ if (element instanceof LoadingStub) {
return new StyledString("Loading...");
}
return null;
12 years, 8 months
JBoss Tools SVN: r38816 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 07:46:43 -0500 (Thu, 16 Feb 2012)
New Revision: 38816
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
Log:
updated to latest client
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
12 years, 8 months
JBoss Tools SVN: r38815 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: seam3 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-16 07:20:51 -0500 (Thu, 16 Feb 2012)
New Revision: 38815
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java
Log:
Resource annotation constant added
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java 2012-02-16 12:20:19 UTC (rev 38814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java 2012-02-16 12:20:51 UTC (rev 38815)
@@ -40,6 +40,7 @@
public static final String CDI_FACET = "CDI (Contexts and Dependency Injection)";
public static final String CONFIGURATION = "Configuration";
public static final String PROJECT_FACETS = "Project Facets";
+ public static final String RESOURCE_ANNOTATION = "@Resource";
public static String LINE_SEPARATOR = System.getProperty("line.separator");
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java 2012-02-16 12:20:19 UTC (rev 38814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java 2012-02-16 12:20:51 UTC (rev 38815)
@@ -44,7 +44,7 @@
getPackageName(), null, "/resources/seam3/openon/BeanWithResourceAnnotation.java.cdi");
editResourceUtil.replaceInEditor("BeanComponent", className);
- openOnUtil.openOnByOption(CDIConstants.BEANS_XML, className + ".java", "Open Resource");
+ openOnUtil.openOnByOption(CDIConstants.RESOURCE_ANNOTATION, className + ".java", "Open Resource");
String destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
@@ -57,7 +57,7 @@
setEd(bot.swtBotEditorExtByTitle(className + ".java"));
editResourceUtil.replaceInEditor("WEB", "META");
- openOnUtil.openOnByOption(CDIConstants.BEANS_XML, className + ".java", "Open Resource");
+ openOnUtil.openOnByOption(CDIConstants.RESOURCE_ANNOTATION, className + ".java", "Open Resource");
destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
12 years, 8 months
JBoss Tools SVN: r38814 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-16 07:20:19 -0500 (Thu, 16 Feb 2012)
New Revision: 38814
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
Log:
Removed one sleep method
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-02-16 12:19:09 UTC (rev 38813)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-02-16 12:20:19 UTC (rev 38814)
@@ -13,7 +13,6 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.CDIConstants;
@@ -33,10 +32,8 @@
*/
public void openOnByOption(String openOnString, String titleName, String chosenOption) {
selectTextForOpenOn(openOnString, titleName);
- SWTBotMenu navigateMenu = bot.menu(CDIConstants.NAVIGATE);
+ bot.menu(CDIConstants.NAVIGATE).menu(CDIConstants.OPEN_HYPERLINK).click();
bot.sleep(Timing.time500MS());
- navigateMenu.menu(CDIConstants.OPEN_HYPERLINK).click();
- bot.sleep(Timing.time500MS());
SWTBotTable table = bot.activeShell().bot().table(0);
for (int i = 0; i < table.rowCount(); i++) {
if (table.getTableItem(i).getText().contains(chosenOption)) {
12 years, 8 months
JBoss Tools SVN: r38813 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-16 07:19:09 -0500 (Thu, 16 Feb 2012)
New Revision: 38813
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
Log:
sleep method commented
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java 2012-02-16 11:39:36 UTC (rev 38812)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java 2012-02-16 12:19:09 UTC (rev 38813)
@@ -188,7 +188,7 @@
editResourceUtil.replaceClassContentByResource(OpenOnTest.class
.getResourceAsStream(path),
false);
- bot.sleep(Timing.time500MS());
+// bot.sleep(Timing.time500MS());
}
}
12 years, 8 months
JBoss Tools SVN: r38812 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-16 06:39:36 -0500 (Thu, 16 Feb 2012)
New Revision: 38812
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
Log:
Change the timeout for test execution for CDI bot tests run with maven
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-16 11:35:06 UTC (rev 38811)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-16 11:39:36 UTC (rev 38812)
@@ -25,6 +25,8 @@
<testClass>${test.suite.class}</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
+ <!-- Kill swt bot test take more than 90 minutes (5400 seconds) to finish -->
+ <forkedProcessTimeoutInSeconds>5400</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
12 years, 8 months
JBoss Tools SVN: r38811 - 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-16 06:35:06 -0500 (Thu, 16 Feb 2012)
New Revision: 38811
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
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-16 10:55:51 UTC (rev 38810)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-16 11:35:06 UTC (rev 38811)
@@ -157,13 +157,12 @@
public boolean performFinish() {
boolean success = getWizardModel().isUseExistingApplication();
if (!success) {
- success = createApplication();
+ if(createApplication()) {
+ success = addRemoveCartridges(
+ getWizardModel().getApplication(), getWizardModel().getSelectedEmbeddableCartridges());
+ }
}
if (success) {
- success = addRemoveCartridges(
- getWizardModel().getApplication(), getWizardModel().getSelectedEmbeddableCartridges());
- }
- if (success) {
success = importProject();
}
12 years, 8 months
JBoss Tools SVN: r38810 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server/internal/launch/configuration and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-16 05:55:51 -0500 (Thu, 16 Feb 2012)
New Revision: 38810
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PortalUtil.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
Log:
JBIDE-10680 - patch for gatein to start properly
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2012-02-16 10:08:00 UTC (rev 38809)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2012-02-16 10:55:51 UTC (rev 38810)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2012 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,
@@ -10,19 +10,16 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
-import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.jst.server.core.EJBBean;
import org.eclipse.jst.server.core.JndiLaunchable;
import org.eclipse.jst.server.core.JndiObject;
@@ -40,6 +37,7 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.PortalUtil;
/**
*
@@ -48,24 +46,10 @@
*/
public class JBossLaunchAdapter extends LaunchableAdapterDelegate {
- private static final String SIMPLE_PORTAL_PATH = "simple-portal"; //$NON-NLS-1$
- private static final String JBOSS_PORTLET = "jboss.portlet"; //$NON-NLS-1$
- private static final String PORTAL_PATH = "portal"; //$NON-NLS-1$
-
private static final String JAVA_NAMING_PROVIDER_URL_PROPKEY = IJBossRuntimeConstants.NAMING_FACTORY_PROVIDER_URL;
private static final String JAVA_NAMING_FACTORY_INITIAL_PROPKEY = IJBossRuntimeConstants.NAMING_FACTORY_KEY;
+ private static final String JBOSS_PORTLET = "jboss.portlet"; //$NON-NLS-1$
- private static final String SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR = "deploy/jboss-portal.sar"; //$NON-NLS-1$
-
- private static final String SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_HA_SAR = "deploy/jboss-portal-ha.sar"; //$NON-NLS-1$
-
- private static final String SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL = "deploy/simple-portal"; //$NON-NLS-1$
-
- private static final String SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL_SAR = "deploy/simple-portal.sar"; //$NON-NLS-1$
-
- private static final String SERVER_DEFAULT_DEPLOY_GATEIN = "deploy/gatein.ear"; //$NON-NLS-1$
-
-
public JBossLaunchAdapter() {
}
@@ -153,68 +137,35 @@
}
private URL getPortletURL(IModuleArtifact moduleObject, ServerDelegate delegate, IServer server) {
+ // null checks all over the place
+ IRuntime runtime = server.getRuntime();
IModule module = moduleObject.getModule();
- if (module != null && server != null) {
- IProject project = module.getProject();
- if (project != null) {
- try {
- if (FacetedProjectFramework.hasProjectFacet(project, JBOSS_PORTLET)) {
- IRuntime runtime = server.getRuntime();
- if (runtime == null || runtime.getLocation() == null) {
- return null;
- }
- IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if (jbossRuntime != null) {
- String urlString = "http://" + server.getHost(); //$NON-NLS-1$
- if (delegate instanceof JBossServer) {
- JBossServer jBossServer = (JBossServer) delegate;
- urlString = urlString + ":" + jBossServer.getJBossWebPort() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- return null;
- }
- URL url = new URL(urlString);
- IPath jbossLocation = runtime.getLocation();
- IPath configPath = jbossLocation.append(IJBossRuntimeResourceConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
- File configFile = configPath.toFile();
- // JBoss Portal server
- if (exists(configFile, SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR)) {
- return new URL(url,PORTAL_PATH);
- }
- // JBoss Portal clustering server
- if (exists(configFile,
- SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_HA_SAR)) {
- return new URL(url,PORTAL_PATH);
- }
- // JBoss portletcontainer
- if (exists(configFile,SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL) ||
- exists(configFile,SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL_SAR)) {
- return new URL(url,SIMPLE_PORTAL_PATH);
- }
- // GateIn Portal Server
- if (exists(configFile, SERVER_DEFAULT_DEPLOY_GATEIN)) {
- return new URL(url,PORTAL_PATH);
- }
- }
- }
- } catch (MalformedURLException e) {
- // ignore
- } catch (CoreException e) {
- // ignore
+ if (runtime == null || runtime.getLocation() == null ||
+ module == null || server == null || module.getProject() == null)
+ return null;
+
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if( jbossRuntime== null || !(delegate instanceof JBossServer))
+ return null;
+
+ try {
+ if (FacetedProjectFramework.hasProjectFacet(module.getProject(), JBOSS_PORTLET)) {
+ // We are a portal project. Is the runtime also a portal runtime?
+ String suffix = PortalUtil.getPortalSuffix(jbossRuntime);
+ if( suffix != null ) {
+ String urlString = "http://" + server.getHost(); //$NON-NLS-1$
+ urlString = urlString + ":" + ((JBossServer)delegate).getJBossWebPort() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ URL url = new URL(urlString);
+ return new URL(url, suffix);
}
}
+ } catch (MalformedURLException e) {
+ } catch (CoreException e) {
}
+ // No launchable found
return null;
}
- private static boolean exists(final File location,String portalDir) {
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- portalDir = portalDir.replace("/", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- File file = new File(location,portalDir);
- return file.exists();
- }
-
-
public static class JBTCustomHttpLaunchable {
private IURLProvider2 urlProvider;
private IModuleArtifact artifact;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2012-02-16 10:08:00 UTC (rev 38809)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2012-02-16 10:55:51 UTC (rev 38810)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
+import org.jboss.ide.eclipse.as.core.util.PortalUtil;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
public class LocalJBossStartLaunchConfigurator extends AbstractStartLaunchConfigurator {
@@ -118,9 +119,20 @@
@Override
protected String getDefaultProgramArguments(JBossServer server, IJBossServerRuntime runtime) {
- return runtime.getDefaultRunArgs() +
- IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT +
- IJBossRuntimeConstants.SPACE + server.getServer().getHost();
+ StringBuffer sb = new StringBuffer();
+ sb.append(runtime.getDefaultRunArgs());
+ sb.append(IJBossRuntimeConstants.SPACE);
+ sb.append(IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT);
+ sb.append(IJBossRuntimeConstants.SPACE);
+ sb.append(server.getServer().getHost());
+
+ // Gate-in
+ if( PortalUtil.getServerPortalType(runtime) == PortalUtil.TYPE_GATE_IN) {
+ sb.append(IJBossRuntimeConstants.SPACE);
+ sb.append("-Dexo.conf.dir.name=gatein"); //$NON-NLS-1$
+ }
+
+ return sb.toString();
}
@Override
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PortalUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PortalUtil.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PortalUtil.java 2012-02-16 10:55:51 UTC (rev 38810)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.ide.eclipse.as.core.util;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+
+
+public class PortalUtil {
+ public static int TYPE_PORTAL_UNKNOWN = 0;
+ public static int TYPE_PORTAL = 1;
+ public static int TYPE_PORTAL_CLUSTER = 2;
+ public static int TYPE_PORTLET_CONTAINER = 3;
+ public static int TYPE_GATE_IN = 4;
+
+ private static final String SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR = "deploy/jboss-portal.sar"; //$NON-NLS-1$
+ private static final String SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_HA_SAR = "deploy/jboss-portal-ha.sar"; //$NON-NLS-1$
+ private static final String SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL = "deploy/simple-portal"; //$NON-NLS-1$
+ private static final String SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL_SAR = "deploy/simple-portal.sar"; //$NON-NLS-1$
+ private static final String SERVER_DEFAULT_DEPLOY_GATEIN = "deploy/gatein.ear"; //$NON-NLS-1$
+
+ private static final String SIMPLE_PORTAL_PATH = "simple-portal"; //$NON-NLS-1$
+ private static final String PORTAL_PATH = "portal"; //$NON-NLS-1$
+
+ public static int getServerPortalType(IServer server) {
+ IRuntime rt = server.getRuntime();
+ IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ return getServerPortalType(jbsrt);
+ }
+
+ public static int getServerPortalType(IJBossServerRuntime runtime) {
+ IPath configPath = runtime.getConfigurationFullPath();
+ File configFile = configPath.toFile();
+
+ // JBoss Portal server
+ if (exists(configFile, SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR)) {
+ return TYPE_PORTAL_UNKNOWN;
+ }
+ // JBoss Portal clustering server
+ if (exists(configFile, SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_HA_SAR)) {
+ return TYPE_PORTAL_CLUSTER;
+ }
+ // JBoss portletcontainer
+ if (exists(configFile,SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL) ||
+ exists(configFile,SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL_SAR)) {
+ return TYPE_PORTLET_CONTAINER;
+ }
+ // GateIn Portal Server
+ if (exists(configFile, SERVER_DEFAULT_DEPLOY_GATEIN)) {
+ return TYPE_GATE_IN;
+ }
+ return TYPE_PORTAL_UNKNOWN;
+ }
+
+ public static String getPortalSuffix(IJBossServerRuntime runtime) {
+ int type = getServerPortalType(runtime);
+ if( type != TYPE_PORTAL_UNKNOWN) {
+ if( type == TYPE_PORTLET_CONTAINER)
+ return SIMPLE_PORTAL_PATH;
+ return PORTAL_PATH;
+ }
+ return null;
+ }
+
+ private static boolean exists(final File location,String portalDir) {
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ portalDir = portalDir.replace("/", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ File file = new File(location,portalDir);
+ return file.exists();
+ }
+
+}
12 years, 8 months