JBoss Tools SVN: r21994 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 11:59:56 -0400 (Mon, 10 May 2010)
New Revision: 21994
Modified:
branches/modular_build/build/build.xml
Log:
add -Dhudson.managed.sources=true option (for running on Windows slave)
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 15:57:06 UTC (rev 21993)
+++ branches/modular_build/build/build.xml 2010-05-10 15:59:56 UTC (rev 21994)
@@ -82,7 +82,11 @@
ant -DCOMPONENT=jmx create.update.site; \
ant -DCOMPONENT=jbpm create.update.site
-Note: if tests stall on Linux, install Xvfb and this script will use that to run Maven.
+To have hudson manage sources (rather than having this script checkout/update them) use:
+ -Dhudson.managed.sources=true
+
+Note: if tests stall on Linux, install Xvfb and this script will use that to run Maven, unless use:
+ -DnoXvfb=true
Here is the order in which components must be built:
</echo>
@@ -164,10 +168,7 @@
<echo level="debug">${os.name}, ${os.arch}, ${os.version}, ${osgi.os}</echo>
<property name="SVNANT_MIRROR" value="http://www.tigris.org/files/documents/906/46267" />
<if>
- <or>
- <os family="windows" />
- <contains string="${os.name}" substring="windows" casesensitive="false" />
- </or>
+ <istrue value="${isWindows}" />
<then>
<var name="svnant.enabled" unset="true" />
<var name="svnant.enabled" value="false" />
@@ -254,6 +255,13 @@
</sequential>
</macrodef>
+ <condition property="isWindows" value="true" else="false">
+ <or>
+ <os family="windows" />
+ <contains string="${os.name}" substring="windows" casesensitive="false" />
+ </or>
+ </condition>
+
<!-- https://jira.jboss.org/jira/browse/JBQA-3313 Use static, shared space outside workspace, instead of working directly in the workspace -->
<condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
<available file="/home/hudson/static_build_env/jbds" type="dir" />
@@ -293,7 +301,7 @@
<antcall target="get.maven" />
</target>
- <target name="get.sources" description="if sources not already on disk, fetch them">
+ <target name="get.sources" description="if sources not already on disk, fetch them" unless="hudson.managed.sources">
<property name="clean.sources" value="false" />
<property name="svn.recurse" value="true" />
@@ -339,7 +347,6 @@
destpath="${WORKINGDIR}/@{component}"
/>
</svn>
-
</then>
<else>
<antcall target="mvn">
15 years, 11 months
JBoss Tools SVN: r21993 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-05-10 11:57:06 -0400 (Mon, 10 May 2010)
New Revision: 21993
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
SWTEclipseExt.maximizeActiveShell method added
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-10 15:46:06 UTC (rev 21992)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-10 15:57:06 UTC (rev 21993)
@@ -1109,5 +1109,18 @@
*/
public boolean existEditorWithLabel(String editorLabel){
return SWTEclipseExt.existEditorWithLabel(bot, editorLabel);
+ }
+ /**
+ * Maximizes active shell
+ */
+ public void maximizeActiveShell() {
+ final Shell shell = (Shell)(bot.activeShell().widget);
+ bot.getDisplay().syncExec(new Runnable() {
+
+ public void run() {
+ shell.setMaximized(true);
+
+ }
+ });
}
}
\ No newline at end of file
15 years, 11 months
JBoss Tools SVN: r21992 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 11:46:06 -0400 (Mon, 10 May 2010)
New Revision: 21992
Modified:
branches/modular_build/build/build.xml
Log:
tweak windows performance
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 15:37:48 UTC (rev 21991)
+++ branches/modular_build/build/build.xml 2010-05-10 15:46:06 UTC (rev 21992)
@@ -180,40 +180,50 @@
</if>
<if>
- <available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file" />
+ <istrue value="${svnant.enabled}" />
<then>
- <touch file="${COMMON_TOOLS}/svnant-1.3.0.zip" />
- <mkdir dir="${java.io.tmpdir}/svnant-1.3.0.zip_" />
- <unzip src="${COMMON_TOOLS}/svnant-1.3.0.zip"
- dest="${java.io.tmpdir}/svnant-1.3.0.zip_"
- overwrite="true"
- />
- <copy todir="${COMMON_TOOLS}" failonerror="true">
- <fileset dir="${java.io.tmpdir}/svnant-1.3.0.zip_/svnant-1.3.0/lib/" includes="*.jar" />
- </copy>
- <delete dir="${java.io.tmpdir}/svnant-1.3.0.zip_" includeemptydirs="true" quiet="true" />
- </then>
- <elseif>
- <or>
- <not>
- <available file="${COMMON_TOOLS}/svnant.jar" type="file" />
- </not>
- <not>
- <available file="${COMMON_TOOLS}/svnkit.jar" type="file" />
- </not>
- <not>
- <available file="${COMMON_TOOLS}/svnClientAdapter.jar" type="file" />
- </not>
- </or>
- <then>
- <fail>Error!
+ <if>
+ <available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file" />
+ <then>
+ <touch file="${COMMON_TOOLS}/svnant-1.3.0.zip" />
+ <mkdir dir="${java.io.tmpdir}/svnant-1.3.0.zip_" />
+ <unzip src="${COMMON_TOOLS}/svnant-1.3.0.zip"
+ dest="${java.io.tmpdir}/svnant-1.3.0.zip_"
+ overwrite="true"
+ />
+ <copy todir="${COMMON_TOOLS}" failonerror="true">
+ <fileset dir="${java.io.tmpdir}/svnant-1.3.0.zip_/svnant-1.3.0/lib/" includes="*.jar" />
+ </copy>
+ <delete dir="${java.io.tmpdir}/svnant-1.3.0.zip_" includeemptydirs="true" quiet="true" />
+ </then>
+ <elseif>
+ <or>
+ <not>
+ <available file="${COMMON_TOOLS}/svnant.jar" type="file" />
+ </not>
+ <not>
+ <available file="${COMMON_TOOLS}/svnkit.jar" type="file" />
+ </not>
+ <not>
+ <available file="${COMMON_TOOLS}/svnClientAdapter.jar" type="file" />
+ </not>
+ </or>
+ <then>
+ <fail>Error!
Build cannot proceed!
Must install svnant.jar, svnkit.jar + svnClientAdapter.jar from
${SVNANT_MIRROR}/svnant-1.3.0.zip
into ${COMMON_TOOLS}/.
</fail>
- </then>
- </elseif>
+ </then>
+ </elseif>
+ </if>
+ </then>
+ <else>
+ <echo level="warning">Warning!
+Svnant unavailable. Will use Maven to fetch sources.
+</echo>
+ </else>
</if>
</target>
15 years, 11 months
JBoss Tools SVN: r21991 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 11:37:48 -0400 (Mon, 10 May 2010)
New Revision: 21991
Modified:
branches/modular_build/build/build.xml
Log:
fix platform check
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 15:08:28 UTC (rev 21990)
+++ branches/modular_build/build/build.xml 2010-05-10 15:37:48 UTC (rev 21991)
@@ -161,12 +161,13 @@
</target>
<target name="get.svnant" unless="svnant.jar.exists">
- <echo>${os.name}, ${os.arch}, ${os.version}, ${osgi.os}</echo>
+ <echo level="debug">${os.name}, ${os.arch}, ${os.version}, ${osgi.os}</echo>
<property name="SVNANT_MIRROR" value="http://www.tigris.org/files/documents/906/46267" />
<if>
- <not>
+ <or>
<os family="windows" />
- </not>
+ <contains string="${os.name}" substring="windows" casesensitive="false" />
+ </or>
<then>
<var name="svnant.enabled" unset="true" />
<var name="svnant.enabled" value="false" />
15 years, 11 months
JBoss Tools SVN: r21990 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 11:08:28 -0400 (Mon, 10 May 2010)
New Revision: 21990
Modified:
branches/modular_build/build/build.xml
Log:
fix istrue check; add -f parent=pom.xml
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 15:01:52 UTC (rev 21989)
+++ branches/modular_build/build/build.xml 2010-05-10 15:08:28 UTC (rev 21990)
@@ -300,7 +300,7 @@
<then>
<now level="info">Update @{COMPONENT}</now>
<if>
- <istrue value="svnant.enabled" />
+ <istrue value="${svnant.enabled}" />
<then>
<svn javahl="false" svnkit="true" failonerror="false">
<update recurse="${svn.recurse}" dir="@{component}" />
@@ -310,7 +310,7 @@
<antcall target="mvn">
<param name="MAVEN_DIR" value="${WORKINGDIR}" />
<param name="MAVEN_FLAGS"
- value="scm:update -e -q -B -fae -Dmaven.test.skip -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ value="scm:update -f ${WORKINGDIR}/parent-pom.xml -e -q -B -fae -Dmaven.test.skip -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
/>
<param name="noXvfb" value="true" />
</antcall>
@@ -320,7 +320,7 @@
<else>
<now level="info">Fetch sources from ${svn.root}/@{component} into ${WORKINGDIR}/@{component}</now>
<if>
- <istrue value="svnant.enabled" />
+ <istrue value="${svnant.enabled}" />
<then>
<svn javahl="false" svnkit="true" failonerror="true">
<checkout recurse="${svn.recurse}"
@@ -334,7 +334,7 @@
<antcall target="mvn">
<param name="MAVEN_DIR" value="${WORKINGDIR}" />
<param name="MAVEN_FLAGS"
- value="scm:checkout -e -q -B -fae -Dmaven.test.skip -DskipCheckoutIfExists=true -DcheckoutDirectory=${WORKINGDIR}/@{component} -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ value="scm:checkout -f ${WORKINGDIR}/parent-pom.xml -e -q -B -fae -Dmaven.test.skip -DskipCheckoutIfExists=true -DcheckoutDirectory=${WORKINGDIR}/@{component} -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
/>
<param name="noXvfb" value="true" />
</antcall>
@@ -345,7 +345,7 @@
<!-- Store svn info so we can compare it later and thus not need to update or checkout every time -->
<if>
- <istrue value="svnant.enabled" />
+ <istrue value="${svnant.enabled}" />
<then>
<svn javahl="false" svnkit="true" failonerror="false">
<info target="${WORKINGDIR}/@{component}"
@@ -411,7 +411,7 @@
<property file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt" />
<!-- check svn info; if new version found, svn up -->
<if>
- <istrue value="svnant.enabled" />
+ <istrue value="${svnant.enabled}" />
<then>
<svn javahl="false" svnkit="true" failonerror="false">
<info target="${WORKINGDIR}/@{COMPONENT}"
15 years, 11 months
JBoss Tools SVN: r21989 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 11:01:52 -0400 (Mon, 10 May 2010)
New Revision: 21989
Modified:
branches/modular_build/build/build.xml
Log:
debug -- win7 not <os family="windows">, apparently
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 14:56:30 UTC (rev 21988)
+++ branches/modular_build/build/build.xml 2010-05-10 15:01:52 UTC (rev 21989)
@@ -161,6 +161,7 @@
</target>
<target name="get.svnant" unless="svnant.jar.exists">
+ <echo>${os.name}, ${os.arch}, ${os.version}, ${osgi.os}</echo>
<property name="SVNANT_MIRROR" value="http://www.tigris.org/files/documents/906/46267" />
<if>
<not>
15 years, 11 months
JBoss Tools SVN: r21988 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-10 10:56:30 -0400 (Mon, 10 May 2010)
New Revision: 21988
Modified:
branches/modular_build/build/build.xml
Log:
make svnant.enabled more global
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-10 13:17:38 UTC (rev 21987)
+++ branches/modular_build/build/build.xml 2010-05-10 14:56:30 UTC (rev 21988)
@@ -167,10 +167,10 @@
<os family="windows" />
</not>
<then>
- <property name="svnant.enabled" value="false" />
+ <var name="svnant.enabled" unset="true" />
+ <var name="svnant.enabled" value="false" />
</then>
<else>
- <property name="svnant.enabled" value="true" />
<exec executable="wget" dir="${COMMON_TOOLS}">
<arg line="${SVNANT_MIRROR}/svnant-1.3.0.zip --no-clobber" />
</exec>
@@ -266,6 +266,7 @@
</classpath>
</taskdef>
+ <property name="svnant.enabled" value="true" />
<available file="${COMMON_TOOLS}/svnant.jar" type="file" property="svnant.jar.exists" />
<antcall target="get.svnant" />
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">
15 years, 11 months
JBoss Tools SVN: r21987 - in trunk: drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-05-10 09:17:38 -0400 (Mon, 10 May 2010)
New Revision: 21987
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/DragAndDropHelper.java
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
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/ManageDroolsProject.java
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/helper/ContextMenuHelper.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.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/view/ExplorerBase.java
Log:
Added Guvnor repository Tests.
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2010-05-10 11:56:49 UTC (rev 21986)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2010-05-10 13:17:38 UTC (rev 21987)
@@ -13,7 +13,8 @@
org.junit4;bundle-version="4.5.0",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0",
org.drools.eclipse;bundle-version="5.1.0",
- org.eclipse.swtbot.eclipse.gef.finder;bundle-version="0.1.0"
+ org.eclipse.swtbot.eclipse.gef.finder;bundle-version="0.1.0",
+ org.apache.log4j;bundle-version="1.2.13"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
Modified: 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 2010-05-10 11:56:49 UTC (rev 21986)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -11,25 +11,29 @@
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.apache.log4j.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests;
+import org.jboss.tools.ui.bot.ext.config.requirement.PrepareViews;
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.DragAndDropHelper;
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.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.JobName;
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;
@@ -42,19 +46,26 @@
*
*/
public class GuvnorRepositoriesTest extends SWTTestExt{
+ @SuppressWarnings("unused")
+ private static final Logger log = Logger.getLogger(GuvnorRepositoriesTest.class);
+ private static final String GUVNOR_TEST_FILE = "Dummy rule.drl";
+ private static final String GUVNOR_REPOSITORY_IMPORT_TEST_FILE = "Underage.brl";
private GuvnorRepositories guvnorRepositories = new GuvnorRepositories();
/**
* Tests Guvnor Repositories
*/
@Test
public void testGuvnorRepositories() {
- //startGuvnor();
+ startGuvnor();
addGuvnorRepository();
deleteGuvnorRepository();
addGuvnorRepository();
openGuvnorConsole();
- browseGuvnorRepository();
- //stopGuvnor();
+ browseGuvnorRepository(GuvnorRepositoriesTest.GUVNOR_TEST_FILE);
+ importFileFromGuvnorRepository(GuvnorRepositoriesTest.GUVNOR_TEST_FILE,
+ DroolsAllBotTests.SAMPLE_DROOLS_RULE_NAME,
+ GuvnorRepositoriesTest.GUVNOR_REPOSITORY_IMPORT_TEST_FILE);
+ stopGuvnor();
}
/**
@@ -114,14 +125,14 @@
KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
}
/**
- * Browse Guvnor Repository
+ * Browse Guvnor Repository and open fileToOpenFile
+ * @param fileToOpen
*/
- private void browseGuvnorRepository(){
+ private void browseGuvnorRepository(String fileToOpen){
guvnorRepositories.show();
- String fileToOpen = "Underage.brl";
- guvnorRepositories.openFile(Timing.time1S(),IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ guvnorRepositories.openFile(Timing.time3S(),IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM,
fileToOpen);
@@ -136,6 +147,7 @@
private void startGuvnor(){
try {
new StartServer().fulfill();
+ new PrepareViews().fulfill();
} catch (RequirementNotFulfilledException e) {
throw new RuntimeException(e);
}
@@ -150,4 +162,170 @@
throw new RuntimeException(e);
}
}
+ /**
+ * Imports file with fileName to Drools project
+ * @param fileName
+ * @param sampleFileName
+ * @param importFileName
+ */
+ private void importFileFromGuvnorRepository(String fileName, String sampleFileName, String importFileName){
+ eclipse.openPerspective(PerspectiveType.JAVA);
+ guvnorRepositories.show().bot();
+ SWTBotTreeItem tiGuvnorFile = guvnorRepositories.selectTreeItem(Timing.time3S(),fileName,
+ new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM});
+ tiGuvnorFile.select();
+ SWTBot packageExplorerBot = packageExplorer.show().bot();
+ SWTBotTreeItem tiDroolRuleDir = packageExplorer.selectTreeItem(DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE,
+ new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME});
+ DragAndDropHelper.dragAndDropOnTo(tiGuvnorFile.widget,tiDroolRuleDir.widget);
+ bot.sleep(Timing.time5S());
+ SWTBotTree packageExplorerTree = packageExplorerBot.tree();
+ // File is renamed because there is appended Guvnor info to Tree Item Label
+ // So we need to get real label of Tree Item and use it later
+ SWTBotTreeItem tiDroolRuleFile = SWTEclipseExt.getTreeItemOnPathStartsWith(packageExplorerBot,
+ packageExplorerTree,
+ Timing.time1S(),
+ fileName,
+ new String[]{DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE});
+ SWTBotEditor editor = packageExplorer.openFile(DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE,
+ tiDroolRuleFile.getText());
+
+ assertTrue("File moved from Guvnor Repository to Drools project was not opened properly. File " + fileName + " is not opened in editor",
+ SWTEclipseExt.existEditorWithLabel(bot,fileName));
+ // Test Update from Guvnor Repository
+ final String changeText = "#$%SWTBot Change#$%";
+ final String originalEditorText = editor.toTextEditor().getText();
+ editor.toTextEditor().insertText(0, 0, changeText);
+ editor.save();
+ bot.sleep(Timing.time1S());
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiDroolRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_UPDATE);
+ bot.sleep(Timing.time5S());
+ assertTrue("Update from Guvnor Repository was not successful. File " + fileName + " has not updated content.",
+ editor.toTextEditor().getText().equals(originalEditorText));
+ // Test commit to Guvnor Repository
+ editor.toTextEditor().insertText(0, 0, changeText);
+ editor.save();
+ bot.sleep(Timing.time1S());
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiDroolRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_COMMIT);
+ bot.sleep(Timing.time5S());
+ editor.close();
+ editor = guvnorRepositories.openFile(Timing.time2S(),IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM,
+ fileName);
+ assertTrue("Commit to Guvnor Repository was not successful. File " + fileName + " was not commited properly." +
+ "\nIt has content: " + editor.toTextEditor().getText() +
+ "\nExpected content: " + changeText + originalEditorText,
+ editor.toTextEditor().getText().equals(changeText + originalEditorText));
+ // Test Add To Repository
+ SWTBotTreeItem tiSampleFile = packageExplorer.selectTreeItem(sampleFileName,
+ new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE});
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiSampleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_ADD);
+ eclipse.waitForShell("");
+ SWTBotShell addToGuvnorShell = packageExplorerBot.activeShell();
+ SWTBot addToGuvnorDialogBot = addToGuvnorShell.bot();
+ addToGuvnorDialogBot.button(IDELabel.Button.NEXT).click();
+ SWTEclipseExt.getTreeItemOnPath(addToGuvnorDialogBot,
+ addToGuvnorDialogBot.tree(),
+ Timing.time3S(),
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM,
+ new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM})
+ .select();
+ addToGuvnorDialogBot.button(IDELabel.Button.FINISH).click();
+ eclipse.waitForClosedShell(addToGuvnorShell);
+ boolean isAddedToGuvnorRepository = false;
+ try{
+ guvnorRepositories.selectTreeItem(Timing.time2S(),sampleFileName,
+ new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM});
+ isAddedToGuvnorRepository = true;
+ } catch (WidgetNotFoundException wnfe){
+ isAddedToGuvnorRepository = false;
+ }
+
+ assertTrue("File " + sampleFileName + " was not added to Guvnor Repository.",
+ isAddedToGuvnorRepository);
+ // Test Deleting from Guvnor Repository file is already selected in Guvnor Repository Tree
+ packageExplorerBot = packageExplorer.show().bot();
+ packageExplorerTree = packageExplorerBot.tree();
+ packageExplorerBot.sleep(Timing.time2S());
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiSampleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_DELETE);
+ SWTBot dialogBot = packageExplorerBot.shell(IDELabel.Shell.CONFIRM_DELETE).activate().bot();
+ dialogBot.button(IDELabel.Button.OK).click();
+ packageExplorerBot.sleep(Timing.time2S());
+ boolean isRemovedFromGuvnorRepository = false;
+ try{
+ guvnorRepositories.selectTreeItem(Timing.time2S(),sampleFileName,
+ new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM});
+ isRemovedFromGuvnorRepository = false;
+ } catch (WidgetNotFoundException wnfe){
+ isRemovedFromGuvnorRepository = true;
+ }
+ assertTrue("File " + sampleFileName + " was not removed from Guvnor Repository.",
+ isRemovedFromGuvnorRepository);
+ // Import File From Repository
+ eclipse.createNew(EntityType.RESOURCES_FROM_GUVNOR);
+ bot.button(IDELabel.Button.NEXT).click();
+ SWTEclipseExt.getTreeItemOnPath(
+ bot,
+ bot.tree(),
+ Timing.time3S(),
+ importFileName,
+ new String[] {
+ IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM }).select();
+ bot.button(IDELabel.Button.NEXT).click();
+ SWTEclipseExt.getTreeItemOnPath(bot,
+ bot.tree(),
+ Timing.time1S(),
+ "rules",
+ new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME,"src","main"}).select();
+ bot.button(IDELabel.Button.FINISH).click();
+ util.waitForJobs(Timing.time5S(),JobName.BUILDING_WS);
+ bot.sleep(Timing.time1S());
+ packageExplorerBot = packageExplorer.show().bot();
+ packageExplorerTree = packageExplorerBot.tree();
+ boolean isAddedFromGuvnorRepository = false;
+ SWTBotTreeItem tiImportRuleFile = null;
+ try{
+ tiImportRuleFile = SWTEclipseExt.getTreeItemOnPathStartsWith(packageExplorerBot,
+ packageExplorerTree,
+ Timing.time1S(),
+ importFileName,
+ new String[]{DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE});
+ isAddedFromGuvnorRepository = true;
+ } catch (WidgetNotFoundException wnfe){
+ isAddedFromGuvnorRepository = false;
+ }
+ assertTrue("File " + importFileName + " was not added from Guvnor Repository.",
+ isAddedFromGuvnorRepository);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiImportRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_DISCONNECT);
+ bot.sleep(Timing.time1S());
+ // name of the file has to be without Guvnor information appended to end of file name
+ // when imported from Guvnor repository
+ assertTrue("File " + importFileName + " was not disconnected from Guvnor Repository.",
+ tiImportRuleFile.getText().trim().equals(importFileName));
+ }
}
\ No newline at end of file
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2010-05-10 11:56:49 UTC (rev 21986)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -73,7 +73,7 @@
}
bot.button(IDELabel.Button.NEXT).click();
bot.button(IDELabel.Button.FINISH).click();
- SWTTestExt.util.waitForAll(20*1000L);
+ SWTTestExt.util.waitForAll(30*1000L);
jbt.delay();
assertTrue("Project "
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-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -117,7 +117,7 @@
SWTBotMenu menu1 = bot.menu(IDELabel.Menu.WINDOW);
SWTBotMenu menu2 = menu1.menu(IDELabel.Menu.SHOW_VIEW);
menu2.menu(IDELabel.Menu.OTHER).click();
-
+ bot.shell(IDELabel.Shell.SHOW_VIEW).activate();
bot.tree().expandNode(type.getGroupLabel()).expandNode(
type.getViewLabel()).select();
bot.button(IDELabel.Button.OK).click();
@@ -165,12 +165,15 @@
default:
fail("Unknown perspective to open");
}
-
+ bot.sleep(Timing.time1S());
SWTBotMenu menu1 = bot.menu(IDELabel.Menu.WINDOW);
+ bot.sleep(Timing.time1S());
SWTBotMenu menu2 = menu1.menu(IDELabel.Menu.OPEN_PERSPECTIVE);
+ bot.sleep(Timing.time1S());
menu2.menu(IDELabel.Menu.OTHER).click();
+ bot.sleep(Timing.time1S());
bot.table().select(perspectiveLabel);
-
+ bot.sleep(Timing.time1S());
// Another approach
SWTBotShell openPerpectiveShell = bot.shell("Open Perspective");
openPerpectiveShell.activate();
@@ -818,20 +821,23 @@
/**
* Returns Tree Item with specified label and located on path
- *
+ * @param bot
* @param tree
+ * @param timeOut
* @param treeItemText
* @param path
* @return
*/
- public static SWTBotTreeItem getTreeItemOnPath(SWTBotTree tree,
+ public static SWTBotTreeItem getTreeItemOnPath(SWTBot bot,SWTBotTree tree, int timeOut,
String treeItemText, String[] path) {
SWTBotTreeItem parentTreeItem = null;
SWTBotTreeItem treeItem = null;
if (path != null && path.length > 0) {
parentTreeItem = tree.expandNode(path[0]);
+ bot.sleep(timeOut);
for (int index = 1; index < path.length; index++) {
parentTreeItem = parentTreeItem.expandNode(path[index]);
+ bot.sleep(timeOut);
}
treeItem = parentTreeItem.getNode(treeItemText);
} else {
@@ -839,7 +845,41 @@
}
return treeItem;
}
+ /**
+ * Returns first Tree Item with label starting with treeItemTextStartsWith and located on path
+ * @param bot
+ * @param tree
+ * @param timeOut
+ * @param treeItemTextStartsWith
+ * @param path
+ * @return
+ */
+ public static SWTBotTreeItem getTreeItemOnPathStartsWith(SWTBot bot,SWTBotTree tree, int timeOut,
+ String treeItemTextStartsWith, String[] path) {
+ SWTBotTreeItem[] items = null;
+ if (path.length > 0){
+ String[] parentPath = new String[path.length - 1];
+ System.arraycopy(path, 0, parentPath, 0, parentPath.length);
+ SWTBotTreeItem parentTreeItem = getTreeItemOnPath(bot, tree, timeOut, path[path.length - 1], parentPath);
+ parentTreeItem.expand();
+ bot.sleep(timeOut);
+ items = parentTreeItem.getItems();
+ }else{
+ items = tree.getAllItems();
+ }
+ SWTBotTreeItem treeItem = null;
+ for (int index = 0 ; index < items.length && treeItem == null; index++){
+ if (items[index].getText().trim()
+ .startsWith(treeItemTextStartsWith)){
+ treeItem = items[index];
+ }
+ }
+ if (treeItem == null){
+ throw new WidgetNotFoundException("Unable to find Tree Item with label starting with " + treeItemTextStartsWith);
+ }
+ return treeItem;
+ }
/**
* Choose Run As Java Application menu for specified Tree Item
*
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-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -41,6 +41,8 @@
import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
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.JobLists;
@@ -670,6 +672,31 @@
}
}
/**
+ * Displays all tree items of parentTreeItem node
+ * @param tree
+ * @param parentTreeItem
+ */
+ public static void displayAllTreeItemChildren (SWTBotTree tree,SWTBotTreeItem parentTreeItem){
+ SWTBotTreeItem[] items = parentTreeItem.getItems();
+ if (items != null){
+ for (int index = 0 ; index < items.length ; index++){
+ StringBuffer columnsText = new StringBuffer("");
+ for (int column = 0;column < tree.columnCount(); column++){
+ if (column > 0){
+ columnsText.append(" ");
+ }
+ columnsText.append(column);
+ columnsText.append("[");
+ columnsText.append(items[index].cell(column));
+ columnsText.append("]");
+ }
+ System.out.println("TreeItem text: " + items[index].getText() +
+ " tooltip: " + items[index].getToolTipText() +
+ " columns: " + columnsText.toString());
+ }
+ }
+ }
+ /**
* Returns Toolbar Button of view with specified toolTip
* @param view
* @param toolTip
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-05-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -19,6 +19,7 @@
import java.util.List;
import java.util.Vector;
+import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
@@ -40,7 +41,7 @@
*
*/
public class ContextMenuHelper {
-
+ protected static final Logger log = Logger.getLogger(ContextMenuHelper.class);
/**
* Clicks the context menu matching the text.
*
@@ -235,6 +236,7 @@
UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
public void run() {
+ log.info("Click on menu item: " + menuItem.getText());
menuItem.notifyListeners(SWT.Selection, event);
}
});
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/DragAndDropHelper.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/DragAndDropHelper.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/DragAndDropHelper.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -0,0 +1,138 @@
+ /*******************************************************************************
+ * 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.ui.bot.ext.helper;
+
+import static org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.syncExec;
+
+import java.awt.AWTException;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
+/**
+ * Adds DnD Bot functionality
+ * @author Vladimir Pakan
+ *
+ */
+public class DragAndDropHelper {
+ private static final Logger log = Logger.getLogger(DragAndDropHelper.class);
+ private static Robot robot = null;
+ /**
+ * Drag&Drop sourceWidget on to targetWidget
+ * @param sourceWidget
+ * @param targetWidget
+ */
+ public static void dragAndDropOnTo(Widget sourceWidget, Widget targetWidget){
+ try {
+ if (DragAndDropHelper.robot == null){
+ DragAndDropHelper.robot = new Robot();
+ }
+ DragAndDropHelper.dragAndDropOnTo(calculateWidgetPositionOn(sourceWidget),
+ calculateWidgetPositionOn(targetWidget));
+ } catch (AWTException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Drag&Drop from sourcePoint on to targetPoint
+ * @param sourcePoint
+ * @param targetPoint
+ */
+ private static void dragAndDropOnTo(final Point sourcePoint,final Point targetPoint){
+ try {
+ if (DragAndDropHelper.robot == null){
+ DragAndDropHelper.robot = new Robot();
+ }
+ // the x+10 motion is needed to let native functions register a drag detect. It did not work under Windows
+ // otherwise and has been reported to be required for linux, too. But I could not test that.
+ syncExec(new VoidResult() {
+ public void run() {
+ DragAndDropHelper.robot.mouseMove(sourcePoint.x, sourcePoint.y);
+ DragAndDropHelper.robot.mousePress(InputEvent.BUTTON1_MASK);
+ DragAndDropHelper.robot.mouseMove((sourcePoint.x + 10), sourcePoint.y);
+ }
+ });
+ // now pause the test until all runnables on the Display thread have run this is necessary for the pick up
+ // to register on linux
+ DragAndDropHelper.waitForIdle(DragAndDropHelper.robot);
+
+ syncExec(new VoidResult() {
+ public void run() {
+ DragAndDropHelper.robot.mouseMove((targetPoint.x + 10), targetPoint.y);
+ DragAndDropHelper.robot.mouseMove(targetPoint.x, targetPoint.y);
+ }
+ });
+
+ DragAndDropHelper.waitForIdle(DragAndDropHelper.robot);
+
+ syncExec(new VoidResult() {
+ public void run() {
+ DragAndDropHelper.robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ }
+ });
+ waitForIdle(DragAndDropHelper.robot);
+ } catch (AWTException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ /**
+ * Needed for linux
+ * @param robot
+ */
+ private static void waitForIdle(final Robot robot) {
+ if (SWT.getPlatform().equals("gtk")) {
+ robot.waitForIdle();
+ }
+ }
+ /**
+ * Calculate position of point above widget to be used as mouse click point for DnD
+ * @param widget
+ * @return
+ */
+ private static Point calculateWidgetPositionOn (final Widget widget){
+ Point result = new Point(0,0);
+ final Rectangle sourceLocation = DragAndDropHelper.absoluteLocation(widget);
+ result.x = sourceLocation.x + 10;
+ result.y = sourceLocation.y + 10;
+ return result;
+ }
+ /**
+ * Gets absolute location of widget
+ * @param widget
+ * @return
+ */
+ private static Rectangle absoluteLocation(final Widget widget) {
+ return syncExec(new Result<Rectangle>() {
+ public Rectangle run() {
+ if (widget instanceof TreeItem){
+ return Display.getDefault().map(((TreeItem)widget).getParent(),
+ null,
+ ((TreeItem)widget).getBounds());
+ }
+ else{
+ return Display.getDefault().map(((Control)widget).getParent(),
+ null,
+ ((Control)widget).getBounds());
+ }
+ }
+ });
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/DragAndDropHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-05-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -22,7 +22,7 @@
public enum EntityType {
HIBERNATE_MAPPING_FILE, JAVA_PROJECT, JAVA_CLASS, HIBERNATE_REVERSE_FILE, HIBERNATE_CONSOLE,
HIBERNATE_CONFIGURATION_FILE, STRUTS_PROJECT, JPA_PROJECT, DROOLS_PROJECT, DROOLS_RULE,
- GUIDED_DROOLS_RULE,DSL_DROOLS_FILE;
+ GUIDED_DROOLS_RULE,DSL_DROOLS_FILE,RESOURCES_FROM_GUVNOR;
public List<String> getGroupsLabels() {
List<String> groupLabel = new LinkedList<String>();
@@ -40,6 +40,7 @@
case DROOLS_RULE: groupLabel.add(IDELabel.EntityGroup.DROOLS);break;
case GUIDED_DROOLS_RULE: groupLabel.add(IDELabel.EntityGroup.DROOLS);break;
case DSL_DROOLS_FILE: groupLabel.add(IDELabel.EntityGroup.DROOLS);break;
+ case RESOURCES_FROM_GUVNOR: groupLabel.add(IDELabel.EntityGroup.GUVNOR);break;
default: fail("Unknown Entity Type");
}
@@ -66,6 +67,7 @@
case DROOLS_RULE: entityLabel = IDELabel.EntityLabel.DROOLS_RULE; break;
case GUIDED_DROOLS_RULE: entityLabel = IDELabel.EntityLabel.GUIDED_DROOLS_RULE; break;
case DSL_DROOLS_FILE: entityLabel = IDELabel.EntityLabel.DSL_DROOLS_FILE; break;
+ case RESOURCES_FROM_GUVNOR: entityLabel = IDELabel.EntityLabel.RESOURCES_FROM_GUVNOR; break;
default: fail("Unknown Entity Type");
}
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-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -66,6 +66,12 @@
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 static final String GUVNOR = "Guvnor";
+ public static final String GUVNOR_UPDATE = "Update";
+ public static final String GUVNOR_COMMIT = "Commit";
+ public static final String GUVNOR_ADD = "Add...";
+ public static final String GUVNOR_DELETE = "Delete...";
+ public static final String GUVNOR_DISCONNECT = "Disconnect";
}
public class Button {
@@ -119,7 +125,9 @@
public static final String RENAME_JAVA_PROJECT = "Rename Java Project";
public static final String CONFIRM_PERSPECTIVE_SWITCH = "Confirm Perspective Switch";
public static final String NEW_SEAM_RUNTIME = "New Seam Runtime";
- public static final String NEW_ESB_RUNTIME = "New JBoss ESB Runtime";
+ public static final String NEW_ESB_RUNTIME = "New JBoss ESB Runtime";
+ public static final String CONFIRM_DELETE = "Confirm Delete";
+ public static final String SHOW_VIEW = "Show View";
}
public class EntityGroup {
@@ -130,6 +138,7 @@
public static final String JBOSS_TOOLS_WEB = "JBoss Tools Web";
public static final String JPA = "JPA";
public static final String DROOLS = "Drools";
+ public static final String GUVNOR = "Guvnor";
}
public class EntityLabel {
@@ -146,6 +155,7 @@
public static final String DROOLS_RULE = "Rule Resource";
public static final String GUIDED_DROOLS_RULE = "Guided Rule";
public static final String DSL_DROOLS_FILE = "Domain Specific Language";
+ public static final String RESOURCES_FROM_GUVNOR = "Resources from Guvnor";
}
public class JavaProjectWizard {
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-10 11:56:49 UTC (rev 21986)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-05-10 13:17:38 UTC (rev 21987)
@@ -33,19 +33,33 @@
public void selectProject(String projectName) {
SWTBot viewBot = viewByTitle(viewObject.getName()).bot();
viewBot.tree().expandNode(projectName).select();
- }
- /**
- * Selects Tree Item within Package Explorer
- * @param treeItemText
- * @param path
- * @return
- */
- public SWTBotTreeItem selectTreeItem(String treeItemText, String[] path) {
- show();
- return SWTEclipseExt.getTreeItemOnPath(viewByTitle(viewObject.getName()).bot().tree(),
- treeItemText, path)
- .select();
- }
+ }
+
+ /**
+ * Selects Tree Item within Package Explorer
+ *
+ * @param timeOut
+ * @param treeItemText
+ * @param path
+ * @return
+ */
+ public SWTBotTreeItem selectTreeItem(int timeOut, String treeItemText,
+ String[] path) {
+ SWTBot viewBot = show().bot();
+ return SWTEclipseExt.getTreeItemOnPath(viewBot, viewBot.tree(), timeOut,
+ treeItemText, path).select();
+ }
+ /**
+ * Selects Tree Item within Package Explorer
+ *
+ * @param treeItemText
+ * @param path
+ * @return
+ */
+ public SWTBotTreeItem selectTreeItem(String treeItemText,
+ String[] path) {
+ return selectTreeItem(0,treeItemText,path);
+ }
/**
* deletes given project from workspace
* @param projectName
15 years, 11 months
JBoss Tools SVN: r21986 - trunk/as/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-10 07:56:49 -0400 (Mon, 10 May 2010)
New Revision: 21986
Modified:
trunk/as/docs/reference/en-US/tptp_support.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-1 - Updated TPTP Profiling section.
Modified: trunk/as/docs/reference/en-US/tptp_support.xml
===================================================================
--- trunk/as/docs/reference/en-US/tptp_support.xml 2010-05-10 10:47:19 UTC (rev 21985)
+++ trunk/as/docs/reference/en-US/tptp_support.xml 2010-05-10 11:56:49 UTC (rev 21986)
@@ -8,12 +8,21 @@
<title>TPTP Profiling</title>
<para>To get TPTP profiling work on <property>JBoss Application Server</property> you should
- first download <ulink
- url="http://www.eclipse.org/downloads/download.php?file=/tptp/4.5.0/TPTP-4.5.0..."
- >TPTP 4.5.0 Runtime</ulink> and install it, i. e. just add the content of <emphasis>
- <property>plugins/features</property>
- </emphasis> folders from downloaded directory to the same folders in your eclipse
- installation directory.</para>
+ do the following:</para>
+
+ <itemizedlist>
+ <listitem><para>Download <ulink
+ url="http://www.eclipse.org/tptp/home/downloads/"
+ >TPTP Runtime</ulink> and install it, i. e. just add the content of <emphasis>
+ <code>plugins/features</code>
+ </emphasis> folders from downloaded directory to the same folders in your eclipse
+ installation directory or use the <emphasis><property>Help > Install New Software</property></emphasis>
+ command.</para>
+ </listitem>
+ <listitem><para>Install <property>JBoss TPTP Tools</property>
+ which provide TPTP support for JBoss AS servers (find the latest stable version of the JBoss TPTP profile feature at
+ <ulink url="http://www.jboss.org/tools/download/stable">http://www.jboss.org/tools/download/stable</ulink>).</para></listitem>
+ </itemizedlist>
<para>And now all profile actions should work for you. To start <property>JBoss
AS</property> in profiling mode use <emphasis>
@@ -52,7 +61,7 @@
<para>All additional information on TPTP(Test and Performance Tools Platform) you can find
in <ulink
url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic..."
- >eclipse documentation</ulink>.</para>
+ >eclipse documentation</ulink>.</para>
<para>In summary, this reference should help you to start with <ulink
url="http://www.jboss.org/jbossas">JBoss AS</ulink> and get to know with functionality
for work with it.</para>
15 years, 11 months
JBoss Tools SVN: r21985 - trunk/jst/tests/org.jboss.tools.ui.bot.ext.test.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-05-10 06:47:19 -0400 (Mon, 10 May 2010)
New Revision: 21985
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/
Log:
SWTbot extensions test - svn:ignore
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test
___________________________________________________________________
Name: svn:ignore
+ bin
screenshots
15 years, 11 months