JBoss Tools SVN: r38325 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext: src/org/jboss/tools/ui/bot/ext and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-01-31 06:54:50 -0500 (Tue, 31 Jan 2012)
New Revision: 38325
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/.settings/org.eclipse.jdt.core.prefs
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotFactory.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/widgets/SWTBotSection.java
Log:
Added basic support for FormText, new Labels in IDELabel & support for Twistie.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/.settings/org.eclipse.jdt.core.prefs 2012-01-31 11:48:05 UTC (rev 38324)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/.settings/org.eclipse.jdt.core.prefs 2012-01-31 11:54:50 UTC (rev 38325)
@@ -1,4 +1,4 @@
-#Tue Nov 02 16:59:13 EET 2010
+#Tue Nov 22 17:51:41 CET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotFactory.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotFactory.java 2012-01-31 11:48:05 UTC (rev 38324)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotFactory.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -19,6 +19,7 @@
protected static final SWTUtilExt util = new SWTUtilExt(bot);
protected static final SWTOpenExt open = new SWTOpenExt(bot);
protected static final SWTJBTExt jbt = new SWTJBTExt(bot);
+ protected static final SWTFormsBotExt formsBot = new SWTFormsBotExt();
// Views
protected static final PackageExplorer packageExplorer = new PackageExplorer();
@@ -31,6 +32,10 @@
return bot;
}
+ public static SWTFormsBotExt getFormsBot() {
+ return formsBot;
+ }
+
public static SWTEclipseExt getEclipse() {
return eclipse;
}
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -0,0 +1,64 @@
+package org.jboss.tools.ui.bot.ext;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swtbot.forms.finder.SWTFormsBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotFormTextExt;
+
+
+/**
+ * Extended version of SWTFormsBot with formText recognition capabilities
+ *
+ *
+ * @author rhopp
+ *
+ */
+
+public class SWTFormsBotExt extends SWTFormsBot{
+
+ public SWTBotFormTextExt formText(){
+ return formText(0);
+ }
+
+ @SuppressWarnings("unchecked")
+ public SWTBotFormTextExt formText(int index){
+ try{
+ List<FormText> formTexts = (List<FormText>) widgets(widgetOfType(FormText.class));
+ return new SWTBotFormTextExt(formTexts.get(index));
+ }catch(WidgetNotFoundException ex){
+ throw new WidgetNotFoundException("Could not find widget of type FormText", ex);
+ }catch(ArrayIndexOutOfBoundsException ex){
+ throw new ArrayIndexOutOfBoundsException("There is widget Form Text with such a index");
+ }
+ }
+
+ public SWTBotFormTextExt formTextWithText(String text){
+ return formTextWithText(text, 0);
+ }
+
+ @SuppressWarnings("unchecked")
+ public SWTBotFormTextExt formTextWithText(String text, int index){
+ try{
+ List<SWTBotFormTextExt> formTextBots = new ArrayList<SWTBotFormTextExt>();
+ List<FormText> formTexts = (List<FormText>) widgets(widgetOfType(FormText.class));
+ for (FormText formText : formTexts) {
+ SWTBotFormTextExt auxBotFormTextExt = new SWTBotFormTextExt(formText);
+ String textik = auxBotFormTextExt.getText();
+ if (textik.equals(text)){
+ formTextBots.add(auxBotFormTextExt);
+ }
+ }
+ return formTextBots.get(index);
+ }catch(WidgetNotFoundException ex){
+ throw new WidgetNotFoundException("Could not find widget of type FormText", ex);
+ }catch(IndexOutOfBoundsException ex){
+ throw new ArrayIndexOutOfBoundsException("There is widget Form Text with such a index");
+ }
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-01-31 11:48:05 UTC (rev 38324)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -599,6 +599,63 @@
}
};
}
+
+ public static class GitGitRepositories {
+ /**
+ * respresents item : Git->Git Repositories
+ */
+ public static final IView LABEL = new IView() {
+ public String getName() {return "Git Repositories";}
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ l.add("Git");
+ return l;
+ }
+ };
+ }
+
+ public static class GitGitReflog {
+ /**
+ * respresents item : Git->Git Reflog
+ */
+ public static final IView LABEL = new IView() {
+ public String getName() {return "Git Reflog";}
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ l.add("Git");
+ return l;
+ }
+ };
+ }
+
+ public static class GitGitStaging {
+ /**
+ * respresents item : Git->Git Staging
+ */
+ public static final IView LABEL = new IView() {
+ public String getName() {return "Git Staging";}
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ l.add("Git");
+ return l;
+ }
+ };
+ }
+
+ public static class GitGitTreeCompare {
+ /**
+ * respresents item : Git->Git Tree Compare
+ */
+ public static final IView LABEL = new IView() {
+ public String getName() {return "Git Tree Compare";}
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ l.add("Git");
+ return l;
+ }
+ };
+ }
+
public static class SpringBeansCrossReferences {
/**
* represents item : Spring->Beans Cross References
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -0,0 +1,90 @@
+package org.jboss.tools.ui.bot.ext.parts;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swtbot.swt.finder.ReferenceBy;
+import org.eclipse.swtbot.swt.finder.SWTBotWidget;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.internal.forms.widgets.FormTextModel;
+import org.hamcrest.SelfDescribing;
+
+@SWTBotWidget(clasz = FormText.class, preferredName="formText", referenceBy = { ReferenceBy.MNEMONIC })
+public class SWTBotFormTextExt extends AbstractSWTBotControl<FormText>{
+
+ public SWTBotFormTextExt(FormText w) throws WidgetNotFoundException {
+ super(w);
+ }
+
+ public SWTBotFormTextExt(FormText w, SelfDescribing description)
+ throws WidgetNotFoundException {
+ super(w, description);
+ }
+
+ public String selectionText() {
+ return syncExec(new StringResult() {
+
+ @Override
+ public String run() {
+ return widget.getSelectionText();
+ }
+ });
+ }
+
+ public AbstractSWTBotControl<FormText> click() {
+ Event e = createEvent();
+ e.text = getText();
+ notify(SWT.MouseDown, e);
+ return click(true);
+ }
+
+ public String selectedLinkText() {
+ return syncExec(new StringResult() {
+
+ @Override
+ public String run() {
+ return widget.getSelectedLinkText();
+ }
+ });
+ }
+
+ public String toolTipText() {
+ return syncExec(new StringResult() {
+
+ @Override
+ public String run() {
+ return widget.getToolTipText();
+ }
+ });
+ }
+
+ @Override
+ @SuppressWarnings("restriction")
+ public String getText() {
+ Field field;
+ try {
+ field = widget.getClass().getDeclaredField("model");
+ } catch (SecurityException e1) {
+ throw new SecurityException(e1);
+ } catch (NoSuchFieldException e1) {
+ throw new SecurityException(e1);
+ }
+ FormTextModel model;
+ field.setAccessible(true);
+ try {
+ model = (FormTextModel)field.get(widget);
+ } catch (IllegalArgumentException e1) {
+ throw new SecurityException(e1);
+ } catch (IllegalAccessException e1) {
+ throw new SecurityException(e1);
+ }
+ return model.getAccessibleText().trim();
+
+ }
+
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -0,0 +1,73 @@
+package org.jboss.tools.ui.bot.ext.parts;
+
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swtbot.swt.finder.ReferenceBy;
+import org.eclipse.swtbot.swt.finder.SWTBotWidget;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
+import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
+import org.eclipse.ui.forms.widgets.Twistie;
+import org.hamcrest.SelfDescribing;
+
+@SWTBotWidget(clasz = Twistie.class, preferredName="twistie", referenceBy = { ReferenceBy.LABEL})
+public class SWTBotTwistie extends AbstractSWTBotControl<Twistie>{
+
+ public SWTBotTwistie(Twistie w) throws WidgetNotFoundException {
+ super(w);
+ }
+
+ public SWTBotTwistie(Twistie w, SelfDescribing description)
+ throws WidgetNotFoundException {
+ super(w, description);
+ }
+ /**
+ * Returns text of the first sibling label
+ * @return text of the first sibling Label (or CLabel) or null if there is no Label
+ */
+
+ public String getLabelText(){
+ return syncExec(new StringResult() {
+ @Override
+ public String run() {
+ Control[] aux = widget.getParent().getChildren();
+ for (Control control : aux) {
+ if (control instanceof CLabel){
+ return ((CLabel)control).getText();
+ }
+ if (control instanceof Label){
+ return ((Label)control).getText();
+ }
+ }
+ return null;
+ }
+ });
+ }
+
+ /**
+ * Toggles twistie (expands its section)
+ */
+ public AbstractSWTBotControl<Twistie> toggle() {
+ setFocus();
+ keyboard().typeCharacter('\r');
+ return this;
+ }
+
+
+ /**
+ * Checks whether the Twistie is expanded
+ * @return true if Twistie is expanded
+ */
+ public boolean isExpanded(){
+ return syncExec(new BoolResult() {
+
+ @Override
+ public Boolean run() {
+ return widget.isExpanded();
+ }
+ });
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-01-31 11:48:05 UTC (rev 38324)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -271,6 +271,10 @@
public static final String JBOSS_TOOLS_PALETTE = "JBoss Tools Palette";
public static final String PALETTE = "Palette";
public static final String JBOSS_CENTRAL = "JBoss Central";
+ public static final String GIT_REPOSITORIES = "Git Repositories";
+ public static final String GIT_REFLOG = "Git Reflog";
+ public static final String GIT_STAGING = "Git Staging";
+ public static final String GIT_TREE_COMPARE = "Git Tree Compare";
public static final String AGENDA = "Agenda";
public static final String AUDIT = "Audit";
public static final String GLOBAL_DATA = "Global Data";
@@ -803,6 +807,21 @@
public static final String IMPLEMENTATION_COMBO_LABEL = "Implementation:*";
}
+ public static class JBossCentralEditor{
+ public static final String JBOSS_CENTRAL = "JBoss Central";
+ public static final String DYNAMIC_WEB_PROJECT = "Dynamic Web Project";
+ public static final String JAVA_EE_WEB_PROJECT = "Java EE Web Project";
+ public static final String HTML5_PROJECT = "HTML5 Project";
+ public static final String RICHFACES_PROJECT = "RichFaces Project";
+ public static final String OPENSHIFT_APP = "OpenShift Express Application";
+ public static final String JAVA_EE_PROJECT = "Java EE Project";
+ public static final String SPRING_MVC_PROJECT = "Spring MVC Project";
+ public static final String NEW_DYNAMIC_WEB_PROJECT = "New Dynamic Web Project";
+ public static final String PROJECT_EXAMPLE = "Project Example";
+ public static final String NEW_JBOSS_PROJECT = "New JBoss Project";
+ public static final String OPENSHIFT_APP_WIZARD = "OpenShift application wizard";
+ }
+
public static class NewViewDialog{
public static final String FROM_VIEW_ID_TEXT_LABEL = "From View ID:";
public static final String TEMPLATE_TEXT_LABEL = "Template:*";
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/widgets/SWTBotSection.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/widgets/SWTBotSection.java 2012-01-31 11:48:05 UTC (rev 38324)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/widgets/SWTBotSection.java 2012-01-31 11:54:50 UTC (rev 38325)
@@ -13,6 +13,11 @@
*/
public class SWTBotSection extends AbstractSWTBotControl<Section> {
+ @Override
+ protected AbstractSWTBotControl<Section> click(boolean post) {
+ // TODO Auto-generated method stub
+ return super.click(post);
+ }
private final SWTBot bot;
public SWTBotSection(Section w) throws WidgetNotFoundException {
super(w);
12 years, 10 months
JBoss Tools SVN: r38324 - 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-01-31 06:48:05 -0500 (Tue, 31 Jan 2012)
New Revision: 38324
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
Log:
[JBIDE-10479] removed unneeded filler label
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-01-31 11:46:50 UTC (rev 38323)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-01-31 11:48:05 UTC (rev 38324)
@@ -147,9 +147,7 @@
remoteNameText = new Text(cloneGroup, SWT.BORDER);
GridDataFactory.fillDefaults().span(1, 1).align(SWT.LEFT, SWT.CENTER).align(SWT.FILL, SWT.CENTER)
.grab(true, false).applyTo(remoteNameText);
- Label fillerForRemoteName = new Label(cloneGroup, SWT.NONE);
- GridDataFactory.fillDefaults().span(1, 1).align(SWT.LEFT, SWT.CENTER).align(SWT.FILL, SWT.CENTER)
- .grab(false, false).applyTo(fillerForRemoteName);
+
final IObservableValue remoteNameTextObservable = WidgetProperties.text(SWT.Modify).observe(remoteNameText);
final IObservableValue remoteNameModelObservable = BeanProperties.value(
GitCloningSettingsWizardPageModel.PROPERTY_REMOTE_NAME).observe(pageModel);
12 years, 10 months
JBoss Tools SVN: r38323 - 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-01-31 06:46:50 -0500 (Tue, 31 Jan 2012)
New Revision: 38323
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java
Log:
[JBIDE-10479] removed duplicate logic that fetches the application name (was present in wizard model and in git clone page)))
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-01-31 11:39:03 UTC (rev 38322)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-01-31 11:46:50 UTC (rev 38323)
@@ -24,7 +24,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Rob Stryker
* @author Xavier Coulon
*/
@@ -173,11 +173,7 @@
}
public String getApplicationName() {
- IApplication application = wizardModel.getApplication();
- if (application == null) {
- return wizardModel.getApplicationName();
- }
- return application.getName();
+ return wizardModel.getApplicationName();
}
public boolean isJBossAS7Application() {
12 years, 10 months
JBoss Tools SVN: r38322 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-01-31 06:39:03 -0500 (Tue, 31 Jan 2012)
New Revision: 38322
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/hibernate.cfg.xml
Log:
default hb configuration added
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/hibernate.cfg.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/hibernate.cfg.xml (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/hibernate.cfg.xml 2012-01-31 11:39:03 UTC (rev 38322)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/xdb</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ </session-factory>
+</hibernate-configuration>
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/hibernate.cfg.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r38321 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-31 06:17:53 -0500 (Tue, 31 Jan 2012)
New Revision: 38321
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
Log:
[JBIDE-10747] tried fixing with transparent background
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-31 11:04:19 UTC (rev 38320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-31 11:17:53 UTC (rev 38321)
@@ -41,9 +41,10 @@
}
protected void createLink(IProperty property, final ViewerCell cell) {
- final Hyperlink link = new Hyperlink((Tree) cell.getControl(), SWT.TRANSPARENT);
+ final Hyperlink link = new Hyperlink((Tree) cell.getControl(),SWT.NONE); //SWT.NO_BACKGROUND
link.setBackground(cell.getBackground());
link.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR));
+ link.setFont(cell.getFont());
link.setUnderlined(true);
link.setText(property.getValue());
link.setBackground(cell.getBackground());
12 years, 10 months
JBoss Tools SVN: r38320 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-31 06:04:19 -0500 (Tue, 31 Jan 2012)
New Revision: 38320
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
Log:
[JBIDE-10724] disposing tree editor when tree gets disposed. setting link to same background color as tree row
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-31 10:59:31 UTC (rev 38319)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-31 11:04:19 UTC (rev 38320)
@@ -42,6 +42,7 @@
protected void createLink(IProperty property, final ViewerCell cell) {
final Hyperlink link = new Hyperlink((Tree) cell.getControl(), SWT.TRANSPARENT);
+ link.setBackground(cell.getBackground());
link.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR));
link.setUnderlined(true);
link.setText(property.getValue());
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-31 10:59:31 UTC (rev 38319)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-31 11:04:19 UTC (rev 38320)
@@ -14,6 +14,8 @@
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
@@ -46,8 +48,15 @@
Assert.isTrue(cell.getControl() instanceof Tree);
Tree tree = ( Tree ) cell.getControl();
- TreeEditor treeEditor = new TreeEditor( tree );
+ final TreeEditor treeEditor = new TreeEditor( tree );
initializeTreeEditor( treeEditor, control, cellText, cell );
+ tree.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ treeEditor.dispose();
+ }
+ });
return treeEditor;
}
12 years, 10 months
JBoss Tools SVN: r38319 - 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-01-31 05:59:31 -0500 (Tue, 31 Jan 2012)
New Revision: 38319
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
Log:
[JBIDE-10724] added application name when logging
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-01-31 10:55:53 UTC (rev 38318)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-01-31 10:59:31 UTC (rev 38319)
@@ -7,6 +7,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.openshift.express.internal.ui.propertytable.AbstractPropertyTableContentProvider;
import org.jboss.tools.openshift.express.internal.ui.propertytable.ContainerElement;
import org.jboss.tools.openshift.express.internal.ui.propertytable.IProperty;
@@ -28,9 +29,8 @@
public Object[] getElements(Object inputElement) {
List<IProperty> elements = new ArrayList<IProperty>();
if (inputElement instanceof IApplication) {
+ IApplication application = (IApplication) inputElement;
try {
- IApplication application = (IApplication) inputElement;
-
elements.add(new StringElement("Name", application.getName()));
elements.add(
new StringElement("Public URL", application.getApplicationUrl().toString(), true));
@@ -43,7 +43,8 @@
elements.add(createCartridges(application));
} catch (Exception e) {
- Logger.error("Failed to display details for OpenShift application", e);
+ Logger.error(
+ NLS.bind("Could not display details for OpenShift application {0}", application.getName()), e);
}
}
return elements.toArray();
12 years, 10 months
JBoss Tools SVN: r38318 - in trunk/central/tests/org.jboss.tools.central.test.ui.bot: .metadata and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-01-31 05:55:53 -0500 (Tue, 31 Jan 2012)
New Revision: 38318
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.root/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.safetable/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.jdt.core/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.project
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/org.eclipse.jdt.core.prefs
trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF
trunk/central/tests/org.jboss.tools.central.test.ui.bot/build.properties
trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/as7.swtbot.test.properties
trunk/central/tests/org.jboss.tools.central.test.ui.bot/screenshots/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
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/helper/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/SWTJBossCentralEditorExt.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java
Log:
Initial commit for centra bot tests
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/home/rhopp/jbdevstudio/studio/plugins/org.eclipse.ui.forms_3.5.100.v20110425.jar"/>
+ <classpathentry kind="lib" path="/home/rhopp/jbdevstudio/studio/plugins/org.eclipse.swtbot.forms.finder_2.0.5.20111003_1754-3676ac8-dev-e36.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
===================================================================
(Binary files differ)
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,3 @@
+#Wed Dec 07 09:51:58 CET 2011
+version=1
+eclipse.preferences.version=1
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.project
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/.project (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/.project 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.central.test.ui.bot</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>lib-org.jboss.tools.ui.bot.ext_3.2.0.v20111115-2301-Beta1</name>
+ <type>2</type>
+ <location>/home/rax/eclipse-pracovni/plugins/org.jboss.tools.ui.bot.ext_3.2.0.v20111115-2301-Beta1</location>
+ </link>
+ </linkedResources>
+</projectDescription>
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/org.eclipse.jdt.core.prefs 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,12 @@
+#Tue Dec 06 10:54:42 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.jboss.tools.central.test.ui.bot
+Bundle-SymbolicName: org.jboss.tools.central.test.ui.bot;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Red Hat
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.swtbot.go,
+ org.jboss.tools.ui.bot.ext;bundle-version="3.2.0"
+Import-Package: org.jboss.tools.ui.bot.ext
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/build.properties
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/build.properties (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/build.properties 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/as7.swtbot.test.properties
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/as7.swtbot.test.properties (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/as7.swtbot.test.properties 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1 @@
+SERVER=AS,7.0,default,/home/rhopp/jboss-as-7.0.2.Final
\ No newline at end of file
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/properties/as7.swtbot.test.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,122 @@
+package org.jboss.tools.central.test.ui.bot;
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+//(a)RunWith(SWTBotJunit4ClassRunner.class)
+(a)RunWith(RequirementAwareSuite.class)
+(a)SuiteClasses({CentralAllBotTests.class})
+public class BaseFunctionalityTest extends SWTTestExt {
+
+ /**
+ * Close usage report window
+ */
+ @BeforeClass
+ public static void setup(){
+ //jbt.closeReportUsageWindowIfOpened(false);
+ util.closeAllEditors(false);
+ util.closeAllViews();
+ }
+ /**
+ * Tests whether JBoss central is accessible from Help menu
+ */
+ @Test
+ public void testIsInstalled(){
+ try {
+ bot.menu("Help").menu(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).click();
+ } catch (WidgetNotFoundException e) {
+ e.printStackTrace(System.out);
+ assertTrue("JBoss Cenral isn't in menu Help", false);
+ }
+ //JBoss Central should be visible right now
+ assertTrue("JBoss Central is not active",bot.editorByTitle(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).isActive());
+ bot.editorByTitle(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).close();
+ try {
+ bot.toolbarButtonWithTooltip(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).click();
+ }catch (WidgetNotFoundException e) {
+ assertTrue("JBoss Central isn't accessible through toolbar", false);
+ }
+ assertTrue("JBoss Central is not active",bot.editorByTitle(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).isActive());
+ }
+
+// @Test
+// public void testSearch(){
+// assertTrue("JBoss Central is not active",bot.editorByTitle("JBoss Central").isActive());
+// //SWTBotEditor editor = bot.editorByTitle("JBoss Central");
+// SWTBotCTabItem cTabItem = bot.cTabItem("Software/Update");
+// cTabItem.activate();
+// util.waitForJobs("Discovering...");
+// //captureScreenshot("pokus.jpg");
+// //features available is ready
+// //bot.checkBox("Show installed").click();
+// SWTBotToolbarPushButton button = (SWTBotToolbarPushButton) bot.toolbarButtonWithTooltip("JBoss Tools Home");
+// button.click();
+// SWTBotBrowser browser = new SWTBotExt().browser();
+// while (!browser.getUrl().equals("http://www.jboss.org/tools")){
+// }
+// browser.setUrl("http://www.jboss.org/tools");
+// if (browser.isPageLoaded()){
+// log.info("Uz je pry nactena");
+// }
+// log.info(browser.getText());
+// bot.editorByTitle(bot.activeEditor().getTitle()).close();
+//
+//
+// /*Matcher matcher = allOf(widgetOfType(Button.class), withLabel("JBoss Maven CDI Configurator."), withStyle(SWT.CHECK, "SWT.CHECK"));
+// //SWTBotCheckBox box = new SWTBotCheckBox((Button) bot.widgets(matcher, matcher);
+// List<Button> boxy = bot.widgets(matcher);
+// for (Button btn : boxy) {
+// SWTBotCheckBox box = new SWTBotCheckBox(btn);
+// box.click();
+// }*/
+// /*asyncExec(new VoidResult() {
+//
+// @Override
+// public void run() {
+// for (Control but : bot.checkBox(5).widget.getParent().getChildren()){
+// log.info(but.getClass());
+// if (but instanceof Button){
+// log.info(but.getData("connectorId"));
+// }
+// if (but instanceof Label){
+// Label lab = (Label) but;
+// log.info(lab.toString());
+// }
+// }
+// }
+// });*/
+// //bot.checkBox(1).select();
+// //bot.checkBox(5).toString();
+// /*button = (SWTBotToolbarPushButton) bot.toolbarButtonWithTooltip("Install");
+// button.click();
+// log.info("Kliknul jsem na "+button.toString());
+// //bot.sleep(80000);
+// bot.waitUntil(Conditions.shellIsActive("Install"), 80000);
+// log.info("Cil by mel byt otevreny Install");*/
+// //bot.shell("Install").close();
+// /*SWTBotCheckBox box = bot.checkBoxWithLabel("JBoss Maven CDI Configurator.");
+// log.info(box.toString());
+// box.select();*/
+// //log.info(box.widget.getData("connectorId"));
+// //browser.refresh();
+// /*while (!browser.isPageLoaded()){
+// bot.sleep(TIME_500MS);
+// }*/
+// //log.info(browser.getText());
+// /*log.info(bot.activeEditor().getTitle());
+// assertTrue("The main page wasn't opened",bot.activeEditor().getTitle() == "JBoss Tools | Overview - JBoss Community");
+// bot.editorByTitle("JBoss Tools | Overview - JBoss Community").close();*/
+// bot.sleep(TIME_5S);
+// /*bot.sleep(TIME_5S);
+// bot.sleep(TIME_5S);
+// bot.sleep(TIME_5S);
+// bot.sleep(TIME_5S);
+// bot.sleep(TIME_5S);*/
+// }
+}
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,14 @@
+package org.jboss.tools.central.test.ui.bot;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({
+ //BaseFunctionalityTest.class,
+ CreateProjectsTest.class
+ })
+public class CentralAllBotTests {
+
+}
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,210 @@
+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{
+
+ private static final String JBOSS_INSTALL_PATH = "/tmp/jbossAS";
+
+ @BeforeClass
+ public static void setup(){
+ log.info(configuredState.getServer().name);
+ bot.menu("Help").menu(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).click();
+ util.waitForAll();
+ }
+ @AfterClass
+ public static void teardown(){
+ deleteDirectory(new File(JBOSS_INSTALL_PATH));
+ }
+
+ @Test
+ public void createProjectsSectionTest(){
+ //waitForAWhile();
+ SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
+ //Dynamic web project
+ bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
+ bot.waitForShell(IDELabel.JBossCentralEditor.NEW_DYNAMIC_WEB_PROJECT);
+ assertTrue("New Dynamic Web Project should have appeared", bot.shell(IDELabel.JBossCentralEditor.NEW_DYNAMIC_WEB_PROJECT).isActive());
+ bot.activeShell().close();
+ //Openshift app
+ bot.hyperlink(IDELabel.JBossCentralEditor.OPENSHIFT_APP).click();
+ bot.waitForShell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD);
+ assertTrue("New Dynamic Web Project should have appeared", bot.shell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD).isActive());
+ bot.activeShell().close();
+
+ //check Project example and detection of server
+ formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+ SWTBotShell projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+ assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+ try{
+ bot.clickButton("Install");
+ SWTBotShell shell = bot.waitForShell(IDELabel.Menu.PREFERENCES);
+ if (shell == null){
+ fail("Preferences shell should have appeared");
+ }
+ bot.activeShell().close();
+ }catch(WidgetNotFoundException wnfex){
+ fail("Missing Install button");
+ }
+ try{
+ projectExampleShell.activate();
+ bot.clickButton("Download and Install...");
+ }catch(WidgetNotFoundException wnfex){
+ fail("Missing \"Download and Install\" button");
+ }
+
+ //create direcotry where will be JBossAS downloaded
+ if(!createDirectory(JBOSS_INSTALL_PATH)){
+ fail("Unable to create direcory for JBoss - \""+JBOSS_INSTALL_PATH+"\"");
+ }
+
+ bot.textWithLabel("Install folder:").setText(JBOSS_INSTALL_PATH);
+ bot.textWithLabel("Download folder:").setText("/tmp");
+ bot.clickButton("OK");
+ bot.waitForShell("Progress Information");
+ bot.sleep(TIME_1S);
+ util.waitForAll(Long.MAX_VALUE);
+ //bot.waitUntil(Conditions.shellCloses(bot.activeShell()), Long.MAX_VALUE, TIME_5S);
+ projectExampleShell.close();
+ bot.sleep(TIME_1S);
+
+ //server should be added.. check again
+ formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+ projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+ assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+ try{
+ bot.clickButton("Install");
+ fail("Button \"Install\" should not be enabled, because all requirements should have been met");
+ }catch(WidgetNotFoundException wnfex){
+ //ok
+ }
+ try{
+ projectExampleShell.activate();
+ bot.clickButton("Download and Install...");
+ fail("Button \"Download and Install...\" should not be enabled, because all requirements should have been met");
+ }catch(WidgetNotFoundException wnfex){
+ //ok
+ }
+ projectExampleShell.close();
+
+ //check the rest of project examples
+ checkCreateProject(formsBot, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ checkCreateProject(formsBot, IDELabel.JBossCentralEditor.JAVA_EE_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ checkCreateProject(formsBot, IDELabel.JBossCentralEditor.HTML5_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ checkCreateProject(formsBot, IDELabel.JBossCentralEditor.SPRING_MVC_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ checkCreateProject(formsBot, IDELabel.JBossCentralEditor.RICHFACES_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ bot.toolbarDropDownButtonWithTooltip("New").click();
+ bot.waitForShell("New");
+ assertTrue("Shell \"New\" should have appeared", bot.shell("New").isActive());
+ bot.activeShell().close();
+ }
+
+ @Test
+ public void projectExamplesSectionTest(){
+ //SWTBotSection section = bot.section("Project Examples");
+ SWTBotTwistie twistieBot = bot.twistieByLabel("JBoss Quickstarts");
+ if (!twistieBot.isExpanded()){
+ twistieBot.toggle();
+ }
+ SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
+ formsBot.formTextWithText("Helloworld").click();
+ bot.clickButton("Start");
+ waitForAllMultipleTimes(3);
+ formsBot.formTextWithText("Numberguess").click();
+ bot.clickButton("Start");
+ waitForAllMultipleTimes(3);
+ log.info(bot.activeEditor().getTitle());
+ formsBot.formTextWithText("Login").click();
+ bot.clickButton("Start");
+ waitForAllMultipleTimes(3);
+ formsBot.formTextWithText("Kitchensink").click();
+ bot.clickButton("Start");
+ waitForAllMultipleTimes(3);
+ }
+
+ /**
+ * calls method waitForAll x times
+ * @param value how many times waitForAll should be called
+ */
+ private void waitForAllMultipleTimes(int value){
+ for (int i=0; i<value; i++){
+ util.waitForAll();
+ }
+ }
+
+ private void waitForAWhile(){
+ bot.sleep(Long.MAX_VALUE);
+ }
+
+ private boolean createDirectory(String path){
+ if (new File(path).mkdir()){
+ return true;
+ }
+ return false;
+ }
+
+ private static boolean deleteDirectory(File path) {
+ if( path.exists() ) {
+ File[] files = path.listFiles();
+ for(int i=0; i<files.length; i++) {
+ if(files[i].isDirectory()) {
+ deleteDirectory(files[i]);
+ }
+ else {
+ files[i].delete();
+ }
+ }
+ }
+ return( path.delete() );
+ }
+
+ private void checkCreateProject(SWTFormsBotExt formsBot, String formText, String wizzardShellText){
+ formsBot.formTextWithText(formText).click();
+ bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+ assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+ bot.button("Start").click();
+ bot.waitForShell(wizzardShellText);
+ assertTrue(wizzardShellText+" should have appeared", bot.shell(wizzardShellText).isActive());
+ bot.activeShell().close();
+ }
+}
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/SWTJBossCentralEditorExt.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/SWTJBossCentralEditorExt.java (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/SWTJBossCentralEditorExt.java 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,28 @@
+package org.jboss.tools.central.test.ui.bot.helper;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+
+import java.util.List;
+
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.ui.IEditorReference;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+
+public class SWTJBossCentralEditorExt extends SWTBotEditorExt{
+
+ public SWTJBossCentralEditorExt(IEditorReference editorReference,
+ SWTWorkbenchBot bot) throws WidgetNotFoundException {
+ super(editorReference, bot);
+ }
+
+ public String getPages(){
+ List<? extends CTabFolder> pokus = this.findWidgets(widgetOfType(CTabFolder.class));
+ for (CTabFolder cTabFolder : pokus) {
+ return Integer.toString(cTabFolder.getItemCount());
+ }
+ return "konec";
+ }
+
+}
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/SWTJBossCentralEditorExt.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java 2012-01-31 10:55:53 UTC (rev 38318)
@@ -0,0 +1,25 @@
+package org.jboss.tools.central.test.ui.bot.helper;
+
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher;
+import org.hamcrest.Description;
+
+public class WithDataMatcher<T extends Widget> extends AbstractMatcher<T> {
+
+ /*public WithDataMatcher(String key, String value, ) {
+
+ }*/
+
+ //@Override
+ public void describeTo(Description description) {
+ description.appendText("testDescription");
+
+ }
+
+ @Override
+ protected boolean doMatch(Object item) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r38317 - trunk/central/tests.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-01-31 05:54:23 -0500 (Tue, 31 Jan 2012)
New Revision: 38317
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/
Log:
Initial commit for jboss central tests
12 years, 10 months
JBoss Tools SVN: r38316 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: rawagner
Date: 2012-01-31 05:42:30 -0500 (Tue, 31 Jan 2012)
New Revision: 38316
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/pom.xml
Log:
bot tests disabled
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/pom.xml
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/pom.xml 2012-01-31 10:12:26 UTC (rev 38315)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/pom.xml 2012-01-31 10:42:30 UTC (rev 38316)
@@ -12,10 +12,6 @@
<packaging>eclipse-test-plugin</packaging>
- <properties>
- <systemProperties>-Dswtbot.test.properties.file=./swtbot.properties</systemProperties>
- </properties>
-
<build>
<plugins>
<plugin>
@@ -23,7 +19,7 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<useUIThread>false</useUIThread>
- <skip>${swtbot.test.skip}</skip>
+ <skip>true</skip>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
@@ -77,4 +73,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
12 years, 10 months