JBoss Tools SVN: r21914 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 12:27:58 -0400 (Wed, 05 May 2010)
New Revision: 21914
Modified:
branches/modular_build/build/build.xml
Log:
add more default flags per http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-... advice
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 16:25:16 UTC (rev 21913)
+++ branches/modular_build/build/build.xml 2010-05-05 16:27:58 UTC (rev 21914)
@@ -413,7 +413,7 @@
<target name="run.build">
<!-- could set -Dmaven.test.skip to skip tests, or use osgi-test:test to just (re-)run tests w/o first building -->
- <property name="MAVEN_FLAGS" value="install -B -fn -q" />
+ <property name="MAVEN_FLAGS" value="clean install -B -fn -q -U -e -Dsurefire.useFile=false" />
<!-- commandline overrides to suppress doing tests -->
<if>
14 years
JBoss Tools SVN: r21913 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: viewers/xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-05-05 12:25:16 -0400 (Wed, 05 May 2010)
New Revision: 21913
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CloseConfigAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5909 - fix
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CloseConfigAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CloseConfigAction.java 2010-05-05 16:17:45 UTC (rev 21912)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CloseConfigAction.java 2010-05-05 16:25:16 UTC (rev 21913)
@@ -49,7 +49,7 @@
continue;
}
ConsoleConfiguration config = (ConsoleConfiguration) node;
- ((MTreeViewer)viewer).clearChildren(null);
+ ((MTreeViewer)viewer).clearChildren(config);
config.reset();
viewer.refresh(node);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java 2010-05-05 16:17:45 UTC (rev 21912)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java 2010-05-05 16:25:16 UTC (rev 21913)
@@ -48,7 +48,18 @@
}
public void clearChildren(Object node) {
- Widget[] items = getChildren(node == null ? getTree() : (Widget)node);
+ Widget widget = null;
+ if (node instanceof Widget) {
+ widget = (Widget)node;
+ } else if (node == null) {
+ widget = getTree();
+ }
+ Widget[] items = null;
+ if (widget == null && node != null) {
+ items = internalFindItems(node);
+ } else {
+ items = getChildren(widget);
+ }
for (int j = 0; j < items.length; j++) {
clearChildren(items[j]);
if (items[j] instanceof TreeItem) {
14 years
JBoss Tools SVN: r21912 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 12:17:45 -0400 (Wed, 05 May 2010)
New Revision: 21912
Modified:
branches/modular_build/build/build.xml
Log:
update doc
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 16:15:12 UTC (rev 21911)
+++ branches/modular_build/build/build.xml 2010-05-05 16:17:45 UTC (rev 21912)
@@ -51,9 +51,11 @@
or
ant -Dnotests=true
-or, to purge the local repo before building:
+or, to purge the local repo (or purge then build):
cd /home/nboldt/workspace36/jbosstools-modular_build; \
- ant clean-run
+ ant purge -q
+ or
+ ant clean-run
or, to build specific module(s):
cd /home/nboldt/workspace36/jbosstools-modular_build; \
14 years
JBoss Tools SVN: r21911 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 12:15:12 -0400 (Wed, 05 May 2010)
New Revision: 21911
Modified:
branches/modular_build/build/build.xml
Log:
fix purge task so it doesn't fail to run the pom
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 15:56:49 UTC (rev 21910)
+++ branches/modular_build/build/build.xml 2010-05-05 16:15:12 UTC (rev 21911)
@@ -92,19 +92,22 @@
</target>
<!-- ******************* MAIN ENTRY TARGETS ******************* -->
- <target name="clean-run"
- description="purge m2 repo, then run build"
- depends="purge, run"
- />
-
+ <target name="clean-run" description="purge m2 repo, then run build" depends="purge, run" />
+
<target name="purge" depends="init">
+ <antcall target="genPomXml">
+ <param name="COMPONENT" value="purge" />
+ <param name="packaging" value="pom" />
+ </antcall>
<antcall target="mvn">
- <param name="COMPONENT" value="site" />
+ <param name="COMPONENT" value="purge" />
+ <param name="MAVEN_DIR" value="${WORKINGDIR}/purge/site" />
<param name="MAVEN_FLAGS" value="dependency:purge-local-repository -q -B -fae" />
<param name="noXvfb" value="true" />
</antcall>
+ <delete dir="${WORKINGDIR}/purge" includeemptydirs="true" quiet="true" />
</target>
-
+
<target name="run"
description="run a build, collect test results, generate overall update site"
depends="build, collect.all.test.results, create.overall.update.site"
@@ -119,7 +122,7 @@
description="run tests w/o first getting sources + list of components to build; assumes an upstream build job was already run"
depends="init, get.bootstrap.scripts, get.components.to.test, run.build, collect.all.test.results"
/>
-
+
<!-- ******************* MAIN ENTRY TARGETS ******************* -->
<!-- override for local build -->
@@ -650,7 +653,9 @@
</antcall>
<!-- Get correct version of site.xml + resolve variables -->
- <loadfile property="site.xml.transformed" srcfile="${WORKINGDIR}/${update.site.path}/category.${product.id}.xml">
+ <loadfile property="site.xml.transformed"
+ srcfile="${WORKINGDIR}/${update.site.path}/category.${product.id}.xml"
+ >
<filterchain>
<expandproperties />
</filterchain>
@@ -742,18 +747,19 @@
</target>
<!-- Used to build the update site of a component; requires a site.xml and pom.xml be generated first -->
- <target name="create.update.site" depends="init, genSitePomXml, genSiteXml">
+ <target name="create.update.site" depends="init, genPomXml, genSiteXml">
<antcall target="build.update.site">
<param name="COMPONENTS.to.build" value="${COMPONENT}" />
<param name="update.site.path" value="${COMPONENT}/site" />
</antcall>
</target>
- <target name="genSitePomXml" description="Generate a pom.xml to build update site">
- <property name="updateSiteJarDir" value="${WORKINGDIR}/${COMPONENT}/site" />
+ <target name="genPomXml" description="Generate a pom.xml">
+ <property name="pomDir" value="${WORKINGDIR}/${COMPONENT}/site" />
<property name="COMPONENT" value="${COMPONENT}" />
- <mkdir dir="${updateSiteJarDir}" />
- <echo file="${updateSiteJarDir}/pom.xml"><project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <property name="packaging" value="eclipse-update-site" />
+ <mkdir dir="${pomDir}" />
+ <echo file="${pomDir}/pom.xml"><project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<relativePath>../../parent-pom.xml</relativePath>
@@ -764,7 +770,7 @@
<groupId>org.jboss.tools</groupId>
<artifactId>${COMPONENT}.site</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>${packaging}</packaging>
</project>
</echo>
14 years
JBoss Tools SVN: r21910 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 11:56:49 -0400 (Wed, 05 May 2010)
New Revision: 21910
Modified:
branches/modular_build/build/build.xml
Log:
only do a purge ONCE, not per component
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 15:44:39 UTC (rev 21909)
+++ branches/modular_build/build/build.xml 2010-05-05 15:56:49 UTC (rev 21910)
@@ -53,7 +53,7 @@
or, to purge the local repo before building:
cd /home/nboldt/workspace36/jbosstools-modular_build; \
- ant -DMAVEN_FLAGS="dependency:purge-local-repository clean install"
+ ant clean-run
or, to build specific module(s):
cd /home/nboldt/workspace36/jbosstools-modular_build; \
@@ -92,6 +92,19 @@
</target>
<!-- ******************* MAIN ENTRY TARGETS ******************* -->
+ <target name="clean-run"
+ description="purge m2 repo, then run build"
+ depends="purge, run"
+ />
+
+ <target name="purge" depends="init">
+ <antcall target="mvn">
+ <param name="COMPONENT" value="site" />
+ <param name="MAVEN_FLAGS" value="dependency:purge-local-repository -q -B -fae" />
+ <param name="noXvfb" value="true" />
+ </antcall>
+ </target>
+
<target name="run"
description="run a build, collect test results, generate overall update site"
depends="build, collect.all.test.results, create.overall.update.site"
@@ -106,6 +119,7 @@
description="run tests w/o first getting sources + list of components to build; assumes an upstream build job was already run"
depends="init, get.bootstrap.scripts, get.components.to.test, run.build, collect.all.test.results"
/>
+
<!-- ******************* MAIN ENTRY TARGETS ******************* -->
<!-- override for local build -->
14 years
JBoss Tools SVN: r21909 - branches/modular_build/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 11:44:39 -0400 (Wed, 05 May 2010)
New Revision: 21909
Modified:
branches/modular_build/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
Log:
add org.eclipse.jem.util
Modified: branches/modular_build/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2010-05-05 15:01:22 UTC (rev 21908)
+++ branches/modular_build/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2010-05-05 15:44:39 UTC (rev 21909)
@@ -14,6 +14,7 @@
org.eclipse.core.resources;bundle-version="3.4.0",
org.eclipse.jdt.core;bundle-version="3.4.0",
org.eclipse.jst.server.core;bundle-version="1.1.0",
+ org.eclipse.jem.util,
org.eclipse.wst.common.modulecore;bundle-version="1.1.200",
org.apache.ant;bundle-version="1.7.0",
org.jboss.ide.eclipse.as.core;bundle-version="1.0.0",
14 years
JBoss Tools SVN: r21908 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 11:01:22 -0400 (Wed, 05 May 2010)
New Revision: 21908
Modified:
branches/modular_build/build/build.xml
Log:
add doc about dependency:purge-local-repository
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 14:42:46 UTC (rev 21907)
+++ branches/modular_build/build/build.xml 2010-05-05 15:01:22 UTC (rev 21908)
@@ -51,6 +51,10 @@
or
ant -Dnotests=true
+or, to purge the local repo before building:
+ cd /home/nboldt/workspace36/jbosstools-modular_build; \
+ ant -DMAVEN_FLAGS="dependency:purge-local-repository clean install"
+
or, to build specific module(s):
cd /home/nboldt/workspace36/jbosstools-modular_build; \
ant -DCOMPONENTS=tests,common,flow,jbpm
@@ -90,7 +94,7 @@
<!-- ******************* MAIN ENTRY TARGETS ******************* -->
<target name="run"
description="run a build, collect test results, generate overall update site"
- depends="build, collect.all.test.results, create.overall.update.site"
+ depends="build, collect.all.test.results, create.overall.update.site"
/>
<target name="build"
14 years
JBoss Tools SVN: r21907 - trunk/drools/docs/guvnor_ref/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-05 10:42:46 -0400 (Wed, 05 May 2010)
New Revision: 21907
Modified:
trunk/drools/docs/guvnor_ref/en-US/conclusion.xml
trunk/drools/docs/guvnor_ref/en-US/functionality_overview.xml
trunk/drools/docs/guvnor_ref/en-US/guvnor_preferences.xml
trunk/drools/docs/guvnor_ref/en-US/introduction.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-63 Eclipse Guvnor Tools Reference Guide restructureing and update. The minor structure and text changes have been made.
Modified: trunk/drools/docs/guvnor_ref/en-US/conclusion.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en-US/conclusion.xml 2010-05-05 13:34:07 UTC (rev 21906)
+++ trunk/drools/docs/guvnor_ref/en-US/conclusion.xml 2010-05-05 14:42:46 UTC (rev 21907)
@@ -8,7 +8,7 @@
</keywordset>
</chapterinfo>
- <title>Conclusion</title>
+ <title>Summary</title>
<para>As stated at the beginning of this document, the key goal of the <property>EGT</property>
is to provide a way of interacting with Guvnor repository resources in a local Eclipse
@@ -18,7 +18,7 @@
<section>
<title>Other relevant resources on the topic</title>
-
+ <para>For more information visit the following resources:</para>
<itemizedlist>
<listitem>
<para>Guvnor <ulink url="http://www.jboss.org/community/wiki/Guvnor">wiki page</ulink></para>
Modified: trunk/drools/docs/guvnor_ref/en-US/functionality_overview.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en-US/functionality_overview.xml 2010-05-05 13:34:07 UTC (rev 21906)
+++ trunk/drools/docs/guvnor_ref/en-US/functionality_overview.xml 2010-05-05 14:42:46 UTC (rev 21907)
@@ -12,7 +12,7 @@
<para>This chapter will give an overview on all functionality the <property>Guvnor Tools</property> provides.</para>
- <section > <!-- id="new_connection" -->
+ <section >
<title>Creating a New Guvnor Connection</title>
<para>As mentioned in the <link linkend="introduction">"Introduction"</link>, the main purpose
of the <property>EGT</property> is to allow development using resources held in a Guvnor
@@ -85,74 +85,6 @@
repository, the location within the repository, the version (date/time stamp) and
the revision number.</para>
</section>
-
- <section id="resources_from_guvnor">
- <title>Importing Guvnor Repository Resources</title>
-
- <para>In addition to the single file drag-and-drop from the <property>Guvnor Repositories
- view</property>, the <property>EGT</property> also includes a wizard for copying one
- or more files from a Guvnor repository to the local workspace (and setting the
- association with the Guvnor repository). This wizard is available from the <emphasis>
- <property>File > Import > Guvnor > Resource from
- Guvnor</property>
- </emphasis> and the <emphasis>
- <property>File > New > Other > Guvnor > Resource from
- Guvnor</property>
- </emphasis> menu items.</para>
- <note>
- <title>Note:</title>
-
- <para>Note that the wizard is identical but appears in both locations to accommodate
- users who tend to view this functionality as being in either category.</para>
- </note>
-
- <para>The first page of the wizard asks for the selection of the source Guvnor repository
- and gives the choice to create a new Guvnor repository connection (in which case the
- second page is the same as the <link linkend="guvnor_connection_wizard">Guvnor Connection wizard</link>).</para>
-
- <figure>
- <title>Resource from Guvnor Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/functionality_overview/add_toGuvnor_wizard.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Once the source Guvnor repository is chosen, the wizard prompts for resource selection:</para>
-
- <figure>
- <title>Resource Selection</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/functionality_overview/resource_from_guvnor.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Finally, the target location in the local workspace should be chosen:</para>
- <figure>
- <title>Choosing the Target Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/functionality_overview/resource_from_guvnor2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On completion the wizard copies the selected files from the Guvnor repository to the local workspace.
- If a file with the same name already exists in the destination, the wizard uses the Eclipse standard
- "prompt for rename" dialog:</para>
-
- <figure>
- <title>Prompt for Rename Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/functionality_overview/resource_from_guvnor3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
<section id="actions">
<title>Managing Guvnor Resources</title>
Modified: trunk/drools/docs/guvnor_ref/en-US/guvnor_preferences.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en-US/guvnor_preferences.xml 2010-05-05 13:34:07 UTC (rev 21906)
+++ trunk/drools/docs/guvnor_ref/en-US/guvnor_preferences.xml 2010-05-05 14:42:46 UTC (rev 21907)
@@ -15,8 +15,8 @@
<title>Guvnor Repository Exploring Perspective</title>
<para>The <property>Guvnor Repository Exploring perspective</property> contains two views
- supplied by <property>EGT</property> – <property>Repository Explorer</property> and
- <property>Version History</property>, that will be the center of most interaction
+ supplied by <property>EGT</property> – <link linkend="guvnor_repositories_view">Guvnor Repositories</link> and
+ <link linkend="guvnor_history_view">Guvnor Resource History</link>, that will be the center of most interactions
with Guvnor, and Eclipse standard views such as <property>Properties</property> and
<property>Resource Navigator</property> that are also useful.</para>
@@ -39,6 +39,7 @@
<property>Guvnor Repository Exploring</property>.</emphasis> This opens the
<property>Guvnor perspective</property>.</para>
</section>
+
<section id="connection_wizard">
<title>Guvnor Connection Wizard</title>
@@ -160,6 +161,75 @@
This is nuisance, but your usual credentials should apply in this case.</para>
</note>
</section>
+
+ <section id="resources_from_guvnor">
+ <title>Import from Guvnor wizard</title>
+
+ <para>In addition to the single file drag-and-drop from the <property>Guvnor Repositories
+ view</property>, the <property>EGT</property> also includes a wizard for copying one
+ or more files from a Guvnor repository to the local workspace (and setting the
+ association with the Guvnor repository). This wizard is available from the <emphasis>
+ <property>File > Import > Guvnor > Resource from
+ Guvnor</property>
+ </emphasis> and the <emphasis>
+ <property>File > New > Other > Guvnor > Resource from
+ Guvnor</property>
+ </emphasis> menu items.</para>
+ <note>
+ <title>Note:</title>
+
+ <para>Note that the wizard is identical but appears in both locations to accommodate
+ users who tend to view this functionality as being in either category.</para>
+ </note>
+
+ <para>The first page of the wizard asks for the selection of the source Guvnor repository
+ and gives the choice to create a new Guvnor repository connection (in which case the
+ second page is the same as the <link linkend="guvnor_connection_wizard">Guvnor Connection wizard</link>).</para>
+
+ <figure>
+ <title>Resource from Guvnor Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/add_toGuvnor_wizard.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the source Guvnor repository is chosen, the wizard prompts for resource selection:</para>
+
+ <figure>
+ <title>Resource Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, the target location in the local workspace should be chosen:</para>
+ <figure>
+ <title>Choosing the Target Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On completion the wizard copies the selected files from the Guvnor repository to the local workspace.
+ If a file with the same name already exists in the destination, the wizard uses the Eclipse standard
+ "prompt for rename" dialog:</para>
+
+ <figure>
+ <title>Prompt for Rename Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
<section id="guvnor_repositories_view">
<title>Guvnor Repositories View</title>
@@ -254,6 +324,7 @@
<para></para>
</section>
+
<section id="guvnor_history_view">
<title>Guvnor Resource History View</title>
Modified: trunk/drools/docs/guvnor_ref/en-US/introduction.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en-US/introduction.xml 2010-05-05 13:34:07 UTC (rev 21906)
+++ trunk/drools/docs/guvnor_ref/en-US/introduction.xml 2010-05-05 14:42:46 UTC (rev 21907)
@@ -109,8 +109,8 @@
<section id="what_is_guvnor_tools">
<title>What is Guvnor Tools?</title>
<para>The <property>Guvnor repository</property> is not intended as a Source Code Management
- (SCM) solution, and the <property>EGT</property> are not intended to be Eclipse “team
- provider” extensions or replacements. Rather, the Guvnor repository is a location where
+ (SCM) solution, and the <property>EGT</property> is not intended to be Eclipse “team
+ provider” extension or replacement. Rather, the Guvnor repository is a location where
certain artifacts (such as rules and SOA policy definitions) are controlled (“governed”) by
policies defined by the deployment environment. The purpose of the <property>EGT</property>
is then to enable access to resources held by the Guvnor repository, so
@@ -160,8 +160,8 @@
java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source
for a RESOURCE_LOCAL enabled persistence context named: ACL
</programlisting>
- <para>Now refer to the <link linkend="functionality_overview">"Functionality
- Overview"</link> section to find out what you can do with Guvnor and
+ <para>Now refer to the <link linkend="functionality_overview">"Tasks"</link>
+ section to find out what you can do with Guvnor and
Eclipse synchronisation tool.</para>
</section>
14 years
JBoss Tools SVN: r21906 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 09:34:07 -0400 (Wed, 05 May 2010)
New Revision: 21906
Modified:
branches/modular_build/build/build.xml
Log:
dedupe COMPONENTS.to.build
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 13:02:06 UTC (rev 21905)
+++ branches/modular_build/build/build.xml 2010-05-05 13:34:07 UTC (rev 21906)
@@ -330,7 +330,6 @@
</and>
<then>
<svn.fetch component="@{COMPONENT}" op="up" />
- <echo file="build.cfg" message="@{COMPONENT}," append="true" />
</then>
</if>
</else>
14 years
JBoss Tools SVN: r21905 - in trunk: drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-05-05 09:02:06 -0400 (Wed, 05 May 2010)
New Revision: 21905
Added:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/GuvnorRepositories.java
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
Added Guvnor Repositories Test.
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -17,6 +17,7 @@
import org.jboss.tools.drools.ui.bot.test.smoke.DecisionTableTest;
import org.jboss.tools.drools.ui.bot.test.smoke.DomainSpecificLanguageEditorTest;
import org.jboss.tools.drools.ui.bot.test.smoke.GuidedDroolsRulesEditorTest;
+import org.jboss.tools.drools.ui.bot.test.smoke.GuvnorRepositoriesTest;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsRuntime;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsProject;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsRules;
@@ -47,7 +48,8 @@
GuidedDroolsRulesEditorTest.class,
DomainSpecificLanguageEditorTest.class,
RuleFlowTest.class,
- DecisionTableTest.class})
+ DecisionTableTest.class,
+ GuvnorRepositoriesTest.class})
public class DroolsAllBotTests extends SWTTestExt {
public static final String DROOLS_PROJECT_NAME = "droolsTest";
public static final String DROOLS_RUNTIME_NAME = "Drools Test Runtime";
@@ -64,6 +66,7 @@
public static final String RULE_FLOW_JAVA_TEST_FILE_NAME = "ProcessTest.java";
public static final String RULE_FLOW_RF_FILE_NAME = "ruleflow.rf";
public static final String DECISION_TABLE_JAVA_TEST_FILE_NAME = "DecisionTableTest.java";
+ public static final String EAP_50_WITH_GUVNOR_PROPERTY_NAME= "jboss-eap5.0-with-drools-home";
private static String testDroolsRuntimeName = null;
public static String getTestDroolsRuntimeName() {
return testDroolsRuntimeName;
Added: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java (rev 0)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -0,0 +1,153 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2010 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.drools.ui.bot.test.smoke;
+
+import static org.jboss.tools.ui.bot.ext.SWTTestExt.bot;
+
+import java.awt.event.KeyEvent;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.config.requirement.RequirementNotFulfilledException;
+import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
+import org.jboss.tools.ui.bot.ext.config.requirement.StopServer;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralInternalWebBrowser;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
+import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.jboss.tools.ui.bot.ext.view.GuvnorRepositories;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.junit.Test;
+/**
+ * Tests Guvnor Repositories
+ * @author Vladimir Pakan
+ *
+ */
+public class GuvnorRepositoriesTest extends SWTTestExt{
+ private GuvnorRepositories guvnorRepositories = new GuvnorRepositories();
+ /**
+ * Tests Guvnor Repositories
+ */
+ @Test
+ public void testGuvnorRepositories() {
+ //startGuvnor();
+ addGuvnorRepository();
+ deleteGuvnorRepository();
+ addGuvnorRepository();
+ openGuvnorConsole();
+ browseGuvnorRepository();
+ //stopGuvnor();
+ }
+
+ /**
+ * Adds Guvnor Repository
+ */
+ private void addGuvnorRepository(){
+ eclipse.openPerspective(PerspectiveType.GUVNOR_REPOSITORY_EXPLORING);
+ SWTBot guvnorRepositoriesBot = guvnorRepositories.show().bot();
+ SWTUtilExt.getViewToolbarButtonWithTooltip(
+ guvnorRepositories.show(),
+ IDELabel.GuvnorRepositories.ADD_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ eclipse.waitForShell("");
+ guvnorRepositoriesBot.activeShell().bot().button(IDELabel.Button.FINISH).click();
+ assertTrue("Guvnor repository was not created properly",
+ guvnorRepositoriesBot.tree().rowCount() == 1);
+ }
+ /**
+ * Deletes Guvnor Repostiry
+ */
+ private void deleteGuvnorRepository(){
+ SWTBot guvnorRepositoriesBot = guvnorRepositories.show().bot();;
+ SWTBotTree guvnorRepositoryTree = guvnorRepositoriesBot.tree();
+ guvnorRepositoryTree.select(0);
+ SWTUtilExt.getViewToolbarButtonWithTooltip(
+ guvnorRepositories.show(),
+ IDELabel.GuvnorRepositories.REMOVE_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ guvnorRepositoriesBot.shell(IDELabel.GuvnorRepositories.REMOVE_GUVNOR_REPOSITORY_DIALOG_TITLE)
+ .activate();
+ bot.button(IDELabel.Button.OK).click();
+ assertTrue("Guvnor repository was not deleted properly",
+ guvnorRepositoriesBot.tree().rowCount() == 0);
+ }
+ /**
+ * Opens Guvnor Console
+ */
+ private void openGuvnorConsole(){
+ SWTBot guvnorRepositoriesBot = guvnorRepositories.show().bot();
+ SWTBotTree guvnorRepositoryTree = guvnorRepositoriesBot.tree();
+ SWTBotTreeItem tiGuvnorRepository = guvnorRepositoryTree.getAllItems()[0];
+ ContextMenuHelper.prepareTreeItemForContextMenu(guvnorRepositoryTree, tiGuvnorRepository);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(guvnorRepositoryTree,
+ IDELabel.Menu.OPEN_GUVNOR_CONSOLE, false)).click();
+ bot.sleep(Timing.time5S());
+ SWTBotBrowserExt browser = bot.browserByTitle(IDELabel.GuvnorConsole.GUVNOR_CONSOLE_TITLE);
+ browser.clickOnButtonViaJavaScript(0, bot);
+ browser.clickOnButtonViaJavaScript(IDELabel.GuvnorConsole.BUTTON_YES_INSTALL_SAMPLES, bot);
+ bot.sleep(Timing.time1S());
+ KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_RIGHT);
+ KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_RIGHT);
+ bot.sleep(Timing.time1S());
+ KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ bot.sleep(Timing.time10S());
+ KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ }
+ /**
+ * Browse Guvnor Repository
+ */
+ private void browseGuvnorRepository(){
+
+ guvnorRepositories.show();
+
+ String fileToOpen = "Underage.brl";
+ guvnorRepositories.openFile(Timing.time1S(),IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM,
+ fileToOpen);
+
+ assertTrue("File from Guvnor Repository was not opened properly. File " + fileToOpen + " is not opened in editor",
+ SWTEclipseExt.existEditorWithLabel(bot,fileToOpen + " (Read only)"));
+
+ }
+ /**
+ * Starts Guvnor AS
+ */
+ private void startGuvnor(){
+ try {
+ new StartServer().fulfill();
+ } catch (RequirementNotFulfilledException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ /**
+ * Stops Guvnor AS
+ */
+ private void stopGuvnor(){
+ try {
+ new StopServer().fulfill();
+ } catch (RequirementNotFulfilledException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-05-05 13:02:06 UTC (rev 21905)
@@ -25,6 +25,7 @@
Eclipse-RegisterBuddy: org.apache.log4j
Export-Package: org.jboss.tools.ui.bot.ext,
org.jboss.tools.ui.bot.ext.config,
+ org.jboss.tools.ui.bot.ext.config.requirement,
org.jboss.tools.ui.bot.ext.entity,
org.jboss.tools.ui.bot.ext.gen,
org.jboss.tools.ui.bot.ext.helper,
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -158,7 +158,10 @@
break;
case DEBUG:
perspectiveLabel = IDELabel.SelectPerspectiveDialog.DEBUG;
- break;
+ break;
+ case GUVNOR_REPOSITORY_EXPLORING:
+ perspectiveLabel = IDELabel.SelectPerspectiveDialog.GUVNOR_REPOSITORY_EXPLORING;
+ break;
default:
fail("Unknown perspective to open");
}
@@ -430,6 +433,7 @@
* @param serverName
*/
public void addServer(IServer server, String serverName) {
+ log.info("Adding server: " + serverName);
SWTBot wiz = open.newObject(ActionItem.NewObject.ServerServer.LABEL);
open.selectTreeNode(server);
wiz.textWithLabel(ServerServer.TEXT_SERVER_NAME).setText(serverName);
@@ -442,6 +446,9 @@
* @param seamHome path to seam home directory
*/
public void addSeamRuntime(String name, String version, String seamHome) {
+ log.info("Adding Seam Runtime: " + name +
+ "\nVersion: " + version +
+ "\nHome: " + seamHome);
SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
SWTBotTable tbRuntimeEnvironments = bot.table();
boolean createRuntime = true;
@@ -505,6 +512,9 @@
*/
public void addJbossServerRuntime(IServerRuntime runtime,
String runtimeHome, String name, String jreToUse) {
+ log.info("Adding JBoss Server Runtime: " + name +
+ "\nHome: " + runtimeHome +
+ "\nJRE: " + jreToUse);
Properties props = new Properties();
props
.put(IDELabel.JBossServerRuntimeDialog.HOME_DIRECTORY,
@@ -522,6 +532,8 @@
*/
public void addServerRuntime(IServerRuntime runtime, Properties properties,
String jreToUse) {
+ log.info("Addding Server Runtime: " + runtime.getName() +
+ "\nJRE: " + jreToUse);
SWTBot wiz = open
.preferenceOpen(ActionItem.Preference.ServerRuntimeEnvironments.LABEL);
@@ -569,6 +581,7 @@
* path to jre
*/
public void addJavaVM(String vmName, String jreHome) {
+ log.info("Adding Java Virtual Machine: " + vmName + "\nHome: " + jreHome);
SWTBot pref = open
.preferenceOpen(ActionItem.Preference.JavaInstalledJREs.LABEL);
pref.button(IDELabel.Button.ADD).click();
@@ -591,7 +604,10 @@
*/
public void addServerRuntime(String runtimeName, String runtimeGroup,
String runtimeType, String runtimeHomeDir) {
-
+ log.info("Adding Server Runtime: " + runtimeName +
+ "\nRuntime Group: " + runtimeGroup +
+ "\nRuntime Type: " + runtimeType +
+ "\nHome: " + runtimeHomeDir);
bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
bot.shell(IDELabel.Shell.PREFERENCES).activate();
bot.tree().expandNode(IDELabel.PreferencesDialog.SERVER_GROUP).select(
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.ui.bot.ext;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withTooltip;
import static org.junit.Assert.fail;
import java.io.BufferedReader;
@@ -19,6 +20,7 @@
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.Properties;
@@ -46,6 +48,7 @@
import org.osgi.framework.Bundle;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
+import org.hamcrest.Matcher;
/**
* Base class for all classes using SWTBot
@@ -662,10 +665,38 @@
List<SWTBotToolbarButton> buttons = view.getToolbarButtons();
for (SWTBotToolbarButton button : buttons){
System.out.println("Button Tooltip: " + button.getToolTipText() +
- " Text: " + button.getText());
+ " Text: " + button.getText() +
+ " Class: " + button.getClass());
}
}
/**
+ * Returns Toolbar Button of view with specified toolTip
+ * @param view
+ * @param toolTip
+ */
+ public static SWTBotToolbarButton getViewToolbarButtonWithTooltip (SWTBotView view, String toolTip){
+ List<SWTBotToolbarButton> buttons = view.getToolbarButtons();
+ SWTBotToolbarButton result = null;
+ if (buttons != null){
+ Matcher<Widget> withTooltip = withTooltip(toolTip);
+ Iterator<SWTBotToolbarButton> iterator = buttons.iterator();
+ while (iterator.hasNext() && result == null){
+ SWTBotToolbarButton button = iterator.next();
+ if (withTooltip.matches(button)){
+ result = button;
+ }
+ }
+ }
+
+ if (result == null){
+ throw new WidgetNotFoundException("Unable to find Toolbar Button with ToolTip " +
+ toolTip);
+ }else{
+ return result;
+ }
+
+ }
+ /**
* Invoke method on object and returns result as String
* @param object
* @param method
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -20,8 +20,9 @@
@Override
public void handle(){
- SWTTestExt.servers.startServer(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.configuredState.getServer().isRunning = true;
-
+ if (!SWTTestExt.configuredState.getServer().isRunning){
+ SWTTestExt.servers.startServer(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.configuredState.getServer().isRunning = true;
+ }
}
}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -0,0 +1,23 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+/**
+ * Stops server (as dependent requirement has {@link AddServer}
+ * @author Vladimir Pakan
+ *
+ */
+public class StopServer extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ return !SWTTestExt.configuredState.getServer().isRunning;
+ }
+
+ @Override
+ public void handle(){
+ if (SWTTestExt.configuredState.getServer().isRunning){
+ SWTTestExt.servers.stopServer(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.configuredState.getServer().isRunning = false;
+ }
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -8,12 +8,15 @@
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
import org.hamcrest.SelfDescribing;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
/**
* browser component
@@ -201,5 +204,35 @@
}
});
}
-
+ /**
+ * Click on the button generated via Java script on position specified by index
+ * @param index
+ */
+ public void clickOnButtonViaJavaScript(int index,SWTWorkbenchBot bot){
+ executeScriptAsync("document.getElementsByTagName('button')[" +
+ index +
+ "].click();");
+ bot.sleep(Timing.time5S());
+ }
+ /**
+ * Click on the button generated via Java script with specified label
+ * @param label
+ */
+ public void clickOnButtonViaJavaScript(String label,SWTWorkbenchBot bot){
+ executeScriptAsync("var buttons = document.getElementsByTagName('button');" +
+ "for (var i=0; i <=(buttons.length-1); i++){" +
+ "if (buttons[i].innerHTML == \"" + label + "\") {" +
+ " buttons[i].click();}" + "}");
+ bot.sleep(Timing.time5S());
+ }
+ /**
+ * Navigate Browser to url and wait until page is completely loaded
+ * @param url
+ * @param bot
+ */
+ public void loadUrlToBrowser(String url,SWTWorkbenchBot bot){
+ goURL(url);
+ new SWTUtilExt(bot).waitForBrowserLoadsPage(this);
+ bot.sleep(Timing.time5S());
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -65,6 +65,7 @@
public static final String TOGGLE_BREAKPOINT="Toggle Breakpoint";
public static final String DEBUG_AS = "Debug As";
public static final String DEBUG_AS_DROOLS_APPLICATION = "Drools Application";
+ public static final String OPEN_GUVNOR_CONSOLE = "Open Guvnor Console";
}
public class Button {
@@ -171,6 +172,7 @@
public static final String WEB_PROJECTS = "Web Projects";
public static final String PROBLEMS = "Problems";
public static final String DEBUG = "Debug";
+ public static final String GUVNOR_REPOSITORIES = "Guvnor Repositories";
}
public class ViewGroup {
@@ -180,6 +182,7 @@
public static final String SERVER = "Server";
public static final String JBOSS_TOOLS_WEB = "JBoss Tools Web";
public static final String DEBUG = "Debug";
+ public static final String GUVNOR = "Guvnor";
}
public class SelectPerspectiveDialog {
@@ -190,6 +193,7 @@
public static final String DB_DEVELOPMENT = "Database Development";
public static final String JPA = "JPA";
public static final String DEBUG = "Debug";
+ public static final String GUVNOR_REPOSITORY_EXPLORING = "Guvnor Repository Exploring";
}
/**
* Hibernate Console Wizard (ConsoleConfigurationCreationWizard) Labels (
@@ -430,4 +434,21 @@
public static final String SCOPE_COMBO_VALUE = "condition";
}
+
+ public static final class GuvnorRepositories {
+
+ public static final String ADD_GUVNOR_REPOSITORY_TOOLTIP = "Add a Guvnor respository connection";
+ public static final String REMOVE_GUVNOR_REPOSITORY_TOOLTIP = "Delete Guvnor repository connection";
+ public static final String REMOVE_GUVNOR_REPOSITORY_DIALOG_TITLE = "Remove repository connection";
+ public static final String GUVNOR_REPOSITORY_ROOT_TREE_ITEM = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav";
+ public static final String PACKAGES_TREE_ITEM = "packages/";
+ public static final String MORTGAGE_TREE_ITEM = "mortgages/";
+ }
+
+ public static final class GuvnorConsole {
+
+ public static final String GUVNOR_CONSOLE_TITLE = "JBoss Guvnor";
+ public static final String BUTTON_YES_INSTALL_SAMPLES = "Yes, please install samples";
+
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -16,6 +16,6 @@
*
*/
public enum PerspectiveType {
- SEAM, JAVA, WEB_DEVELOPMENT, HIBERNATE, DB_DEVELOPMENT, JPA, DEBUG;
+ SEAM, JAVA, WEB_DEVELOPMENT, HIBERNATE, DB_DEVELOPMENT, JPA, DEBUG, GUVNOR_REPOSITORY_EXPLORING;
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -18,7 +18,8 @@
*
*/
public enum ViewType {
- PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG;
+ PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,
+ SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG,GUVNOR_REPOSITORIES;
public String getGroupLabel() {
@@ -31,6 +32,7 @@
case WEB_PROJECTS: viewLabel = IDELabel.ViewGroup.JBOSS_TOOLS_WEB; break;
case PROBLEMS: viewLabel = IDELabel.ViewGroup.GENERAL; break;
case DEBUG: viewLabel = IDELabel.ViewGroup.DEBUG; break;
+ case GUVNOR_REPOSITORIES: viewLabel = IDELabel.ViewGroup.GUVNOR; break;
default: fail("Unknown View Type");
}
return viewLabel;
@@ -46,6 +48,7 @@
case WEB_PROJECTS: viewLabel = IDELabel.View.WEB_PROJECTS; break;
case PROBLEMS: viewLabel = IDELabel.View.PROBLEMS; break;
case DEBUG: viewLabel = IDELabel.View.DEBUG; break;
+ case GUVNOR_REPOSITORIES: viewLabel = IDELabel.View.GUVNOR_REPOSITORIES; break;
default: fail("Unknown View Type");
}
return viewLabel;
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -90,18 +90,21 @@
}
/**
* opens file (selects in tree and doubleclicks)
+ * @param timeOut
* @param projectName
* @param path to file
* @return editor with opened file
*/
- public SWTBotEditor openFile(String projectName, String... path) {
+ public SWTBotEditor openFile(int timeOut, String projectName, String... path) {
SWTBot viewBot = show().bot();
SWTBotTree tree = viewBot.tree();
SWTBotTreeItem item = tree.expandNode(projectName);
+ viewBot.sleep(timeOut);
StringBuilder builder = new StringBuilder(projectName);
// Go through path
for (String nodeName : path) {
item = item.expandNode(nodeName);
+ viewBot.sleep(timeOut);
builder.append("/" + nodeName);
}
item.select().doubleClick();
@@ -110,6 +113,15 @@
return editor;
}
/**
+ * opens file (selects in tree and doubleclicks) with zero timeOut for expandNode() method
+ * @param projectName
+ * @param path to file
+ * @return editor with opened file
+ */
+ public SWTBotEditor openFile(String projectName, String... path) {
+ return openFile(0,projectName,path);
+ }
+ /**
* runs given project on Server (uses default server, the first one) server MUST be running
* @param projectName
*/
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/GuvnorRepositories.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/GuvnorRepositories.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/GuvnorRepositories.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -0,0 +1,16 @@
+package org.jboss.tools.ui.bot.ext.view;
+
+import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GuvnorGuvnorRepositories;
+
+/**
+ * Class provides bot routines related to Repositories View
+ * @author Vlado Pakan
+ *
+ */
+public class GuvnorRepositories extends ExplorerBase {
+ Logger log = Logger.getLogger(GuvnorRepositories.class);
+ public GuvnorRepositories() {
+ viewObject = GuvnorGuvnorRepositories.LABEL;
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/GuvnorRepositories.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-05-05 12:27:43 UTC (rev 21904)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-05-05 13:02:06 UTC (rev 21905)
@@ -81,8 +81,11 @@
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.START, false)).click();
new SWTUtilExt(this).waitForNonIgnoredJobs(Timing.time100S());
new SWTUtilExt(this).waitForAll(Timing.time3S());
-
}
+ else{
+ throw new RuntimeException("Unable to start server witn name: " + serverName +
+ "\nThis server is not defined within Servers view");
+ }
}
private SWTBotTreeItem findServerByName(SWTBotTree tree, String name) {
14 years