JBoss Tools SVN: r21543 - branches/modular_build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-16 12:40:29 -0400 (Fri, 16 Apr 2010)
New Revision: 21543
Modified:
branches/modular_build/genpom.xml
Log:
fix recursive generation when only doing a single component dir
Modified: branches/modular_build/genpom.xml
===================================================================
--- branches/modular_build/genpom.xml 2010-04-16 16:38:12 UTC (rev 21542)
+++ branches/modular_build/genpom.xml 2010-04-16 16:40:29 UTC (rev 21543)
@@ -2,9 +2,10 @@
<!-- Configuration Start -->
<property name="projectName" value="org.jboss.tools" />
<property name="pathToParentPom" value="" />
+ <property name="COMPONENT" value="trunk" />
<property name="pomVersion" value="0.0.1-SNAPSHOT" />
<property name="dirsToExclude"
- value="**/*.sdk.*, **/doc*, **/download.jboss.org, **/util, **/test, **/builders, **/contrib, **/releng, ."
+ value="**/*.sdk.*, **/doc*, **/download.jboss.org, **/util/**, **/test, **/builders, **/contrib, **/releng/**, ."
/>
<!-- Configuration Ends -->
@@ -15,8 +16,7 @@
cd /home/nboldt/workspace36/jbosstools-modular_build; ant -f genpom.xml -q
or, to build a specific module only:
cd /home/nboldt/workspace36/jbosstools-modular_build; \
- ant -f genpom.xml -q -DpathToParentPom=../ -DWORKINGDIR=/home/nboldt/workspace36/jbosstools-modular_build/as
-
+ ant -f genpom.xml -q -DCOMPONENT=common
-->
<target name="get.ant-contrib" unless="ant-contrib.jar.exists">
@@ -96,15 +96,15 @@
casesensitive="true"
override="true"
/>
- <echo level="debug"> Agg dir: ${activeDir}, artifactType: ${artifactType}, artifactId: ${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</echo>
+ <echo level="verbose"> Agg dir: ${activeDir}, artifactType: ${artifactType}, artifactId: ${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</echo>
<echo file="@{dir}/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>@{parentpom}</relativePath>
- <groupId>${projectName}</groupId>
- <artifactId>${projectName}.parent.pom</artifactId>
- <version>${pomVersion}</version>
+ <relativePath>@{parentpom}</relativePath>
+ <groupId>${projectName}</groupId>
+ <artifactId>${projectName}.parent.pom</artifactId>
+ <version>${pomVersion}</version>
</parent>
<groupId>${projectName}</groupId>
<artifactId>${artifactId}</artifactId>
@@ -170,7 +170,7 @@
casesensitive="true"
override="true"
/>
- <echo level="debug"> Mod dir: ${activeDir}, artifactType: ${artifactType}, artifactId: ${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</echo>
+ <echo level="verbose"> Mod dir: ${activeDir}, artifactType: ${artifactType}, artifactId: ${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</echo>
<echo file="@{dir}/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>
@@ -228,13 +228,27 @@
<attribute name="artifactId" default="" />
<attribute name="artifactVersion" default="" />
<sequential>
-
+ <if>
+ <equals arg1="${COMPONENT}" arg2="trunk" />
+ <then>
+ <path id="trunkDir">
+ <dirset dir="@{dir}" excludes="${dirsToExclude}" includes="*" />
+ </path>
+ </then>
+ <else>
+ <path id="trunkDir">
+ <dirset dir="@{dir}/${pathToParentPom}"
+ excludes="${dirsToExclude}"
+ includes="${COMPONENT}/*/*, ${COMPONENT}/plugins, ${COMPONENT}/features, ${COMPONENT}/tests, ${COMPONENT}/site"
+ />
+ </path>
+ </else>
+ </if>
<for param="subdir" delimiter=",
">
- <path>
- <dirset dir="@{dir}" excludes="${dirsToExclude}" includes="*" />
- </path>
+ <path refid="trunkDir" />
<sequential>
+ <echo level="debug">@{subdir}</echo>
<var name="aggregate" value="false" />
<if>
<or>
@@ -245,10 +259,10 @@
</or>
<then>
<!-- valid place to create a pom -->
- <writeModulePom dir="@{subdir}" parentpom="../@{parentpom}" />
+ <writeModulePom dir="@{subdir}" parentpom="../${pathToParentPom}@{parentpom}" />
</then>
<else>
- <for list="plugins tests features" param="type" delimiter=" ">
+ <for list="plugins tests features site" param="type" delimiter=" ">
<sequential>
<basename property="artifactIdAgg" file="@{subdir}" />
<if>
@@ -256,7 +270,7 @@
<then>
<var name="aggregate" value="true" />
<generateAggregator dir="@{subdir}/@{type}"
- parentpom="../../@{parentpom}"
+ parentpom="../../${pathToParentPom}@{parentpom}"
artifactId="${artifactIdAgg}.@{type}"
artifactVersion="@{artifactVersion}"
/>
@@ -270,9 +284,18 @@
<istrue value="${aggregate}" />
<else>
<basename property="artifactIdAgg" file="@{subdir}" />
+ <if>
+ <equals arg1="${COMPONENT}" arg2="trunk" />
+ <then>
+ <var name="artifactId" value="${artifactIdAgg}.all" />
+ </then>
+ <else>
+ <var name="artifactId" value="${COMPONENT}.${artifactIdAgg}" />
+ </else>
+ </if>
<writeAggregatePom dir="@{subdir}"
parentpom="../${pathToParentPom}parent-pom.xml"
- artifactId="${artifactIdAgg}.all"
+ artifactId="${artifactId}"
artifactVersion="@{artifactVersion}"
/>
@@ -280,6 +303,7 @@
<echo level="verbose">Aggregated: ${artifactIdAgg}</echo>
<var name="artifactIdAgg" unset="true" />
+ <var name="artifactId" unset="true" />
</else>
</if>
</else>
@@ -301,6 +325,17 @@
</then>
</if>
+ <if>
+ <not>
+ <equals arg1="${COMPONENT}" arg2="trunk" />
+ </not>
+ <then>
+ <var name="pathToParentPom" unset="true" />
+ <var name="pathToParentPom" value="../" />
+ </then>
+ </if>
+ <echo level="verbose">COMPONENT = ${COMPONENT}, pathToParentPom = ${pathToParentPom}</echo>
+
<!-- if set, compare values in tags file to values found in manifests and report discrepancies -->
<!--<property name="tagsFile"
value="/home/nboldt/eclipse/workspace-jboss/devstudio-trunk/releng/org.jboss.ide.eclipse.releng/builders/product/versionTags/jbosstools/3.1.0.GA.tags"
@@ -320,12 +355,25 @@
<var name="aggregatorcountstring" value="" />
<var name="modulecountstring" value="" />
- <!-- call generateAggregator for overall -->
- <generateAggregator dir="${WORKINGDIR}"
- parentpom="${pathToParentPom}parent-pom.xml"
- artifactId="trunk"
- artifactVersion="${pomVersion}"
- />
+ <if>
+ <equals arg1="${COMPONENT}" arg2="trunk" />
+ <then>
+ <!-- call generateAggregator for overall -->
+ <generateAggregator dir="${WORKINGDIR}"
+ parentpom="${pathToParentPom}parent-pom.xml"
+ artifactId="${COMPONENT}"
+ artifactVersion="${pomVersion}"
+ />
+ </then>
+ <else>
+ <!-- call generateAggregator for component -->
+ <generateAggregator dir="${WORKINGDIR}/${COMPONENT}"
+ parentpom="${pathToParentPom}parent-pom.xml"
+ artifactId="${COMPONENT}"
+ artifactVersion="${pomVersion}"
+ />
+ </else>
+ </if>
<!-- summary -->
<length string="${modulecountstring}" property="modulecount" />
<length string="${aggregatorcountstring}" property="aggregatorcount" />
14 years, 9 months
JBoss Tools SVN: r21542 - in branches/modular_build/tests: features and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-16 12:38:12 -0400 (Fri, 16 Apr 2010)
New Revision: 21542
Modified:
branches/modular_build/tests/
branches/modular_build/tests/features/org.jboss.tools.test.feature/
branches/modular_build/tests/features/org.jboss.tools.test.feature/pom.xml
branches/modular_build/tests/features/pom.xml
branches/modular_build/tests/plugins/org.jboss.tools.tests/pom.xml
branches/modular_build/tests/plugins/pom.xml
branches/modular_build/tests/pom.xml
Log:
add ignores and update poms using newer genpom.xml
Property changes on: branches/modular_build/tests
___________________________________________________________________
Name: svn:ignore
+ buildlog.latest.txt
Property changes on: branches/modular_build/tests/features/org.jboss.tools.test.feature
___________________________________________________________________
Name: svn:ignore
+ target
Modified: branches/modular_build/tests/features/org.jboss.tools.test.feature/pom.xml
===================================================================
--- branches/modular_build/tests/features/org.jboss.tools.test.feature/pom.xml 2010-04-16 15:56:34 UTC (rev 21541)
+++ branches/modular_build/tests/features/org.jboss.tools.test.feature/pom.xml 2010-04-16 16:38:12 UTC (rev 21542)
@@ -1,14 +1,15 @@
-<project
+<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>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.test.feature</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.test.feature</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
</project>
+
\ No newline at end of file
Modified: branches/modular_build/tests/features/pom.xml
===================================================================
--- branches/modular_build/tests/features/pom.xml 2010-04-16 15:56:34 UTC (rev 21541)
+++ branches/modular_build/tests/features/pom.xml 2010-04-16 16:38:12 UTC (rev 21542)
@@ -1,17 +1,18 @@
-<project
+<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>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>tests.features</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>org.jboss.tools.test.feature</module>
- </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>tests.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.jboss.tools.test.feature</module>
+ </modules>
</project>
+
\ No newline at end of file
Modified: branches/modular_build/tests/plugins/org.jboss.tools.tests/pom.xml
===================================================================
--- branches/modular_build/tests/plugins/org.jboss.tools.tests/pom.xml 2010-04-16 15:56:34 UTC (rev 21541)
+++ branches/modular_build/tests/plugins/org.jboss.tools.tests/pom.xml 2010-04-16 16:38:12 UTC (rev 21542)
@@ -1,14 +1,15 @@
-<project
+<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>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project>
+
\ No newline at end of file
Modified: branches/modular_build/tests/plugins/pom.xml
===================================================================
--- branches/modular_build/tests/plugins/pom.xml 2010-04-16 15:56:34 UTC (rev 21541)
+++ branches/modular_build/tests/plugins/pom.xml 2010-04-16 16:38:12 UTC (rev 21542)
@@ -1,17 +1,18 @@
-<project
+<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>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>tests.plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>org.jboss.tools.tests</module>
- </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>tests.plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.jboss.tools.tests</module>
+ </modules>
</project>
+
\ No newline at end of file
Modified: branches/modular_build/tests/pom.xml
===================================================================
--- branches/modular_build/tests/pom.xml 2010-04-16 15:56:34 UTC (rev 21541)
+++ branches/modular_build/tests/pom.xml 2010-04-16 16:38:12 UTC (rev 21542)
@@ -1,18 +1,19 @@
-<project
+<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>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>tests.all</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>features</module>
- <module>plugins</module>
- </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>features</module>
+ <module>plugins</module>
+ </modules>
</project>
+
\ No newline at end of file
14 years, 9 months
JBoss Tools SVN: r21541 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-04-16 11:56:34 -0400 (Fri, 16 Apr 2010)
New Revision: 21541
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/ContextMenuDoubleInsertionTest_JBIDE3888.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6189 - fixed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/ContextMenuDoubleInsertionTest_JBIDE3888.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/ContextMenuDoubleInsertionTest_JBIDE3888.java 2010-04-16 15:33:11 UTC (rev 21540)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/ContextMenuDoubleInsertionTest_JBIDE3888.java 2010-04-16 15:56:34 UTC (rev 21541)
@@ -12,6 +12,7 @@
import org.jboss.tools.vpe.editor.menu.InsertType;
import org.jboss.tools.vpe.editor.menu.action.InsertAction2;
+import org.jboss.tools.vpe.ui.test.TestUtil;
/**
@@ -61,11 +62,13 @@
"Insert Action", insertionItem, //$NON-NLS-1$
sourceEditor, InsertType.INSERT_INTO);
firstInsertAction.run();
+ TestUtil.delay(2000);
textWidget.setText("");
final InsertAction2 secondInsertAction = new InsertAction2(
"Insert Action", insertionItem, //$NON-NLS-1$
sourceEditor, InsertType.INSERT_INTO);
secondInsertAction.run();
+ TestUtil.delay(2000);
assertTrue(textWidget.getText()
.contains(REQUIRED_STRING));
}
14 years, 9 months
JBoss Tools SVN: r21540 - in trunk: drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-04-16 11:33:11 -0400 (Fri, 16 Apr 2010)
New Revision: 21540
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java
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/smoke/ManageDroolsProject.java
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsRuntime.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/SWTTestExt.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/ViewType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
Log:
Added Drools Tests related to Managing Drools Project
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-04-16 15:25:51 UTC (rev 21539)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -10,11 +10,14 @@
******************************************************************************/
package org.jboss.tools.drools.ui.bot.test;
+import java.io.File;
+
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsRuntime;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsProject;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -36,9 +39,34 @@
public static final String DROOLS_PROJECT_NAME = "droolsTest";
public static final String DROOLS_RUNTIME_NAME = "Drools Test Runtime";
public static String DROOLS_RUNTIME_LOCATION = null;
+ public static String CREATE_DROOLS_RUNTIME_LOCATION = null;
+ public static String SRC_MAIN_JAVA_TREE_NODE = "src/main/java";
+ public static String COM_SAMPLE_TREE_NODE = "com.sample";
+ public static String DROOLS_TEST_JAVA_TREE_NODE = "DroolsTest.java";
+ private static String testDroolsRuntimeName = null;
+ public static String getTestDroolsRuntimeName() {
+ return testDroolsRuntimeName;
+ }
+
+ public static void setTestDroolsRuntimeName(String testDroolsRuntimeName) {
+ DroolsAllBotTests.testDroolsRuntimeName = testDroolsRuntimeName;
+ }
+
+ public static String getTestDroolsRuntimeLocation() {
+ return testDroolsRuntimeLocation;
+ }
+
+ public static void setTestDroolsRuntimeLocation(String testDroolsRuntimeLocation) {
+ DroolsAllBotTests.testDroolsRuntimeLocation = testDroolsRuntimeLocation;
+ }
+
+ private static String testDroolsRuntimeLocation = null;
@BeforeClass
public static void setUpTest() {
- DROOLS_RUNTIME_LOCATION = System.getProperty("java.io.tmpdir");
+ DroolsAllBotTests.DROOLS_RUNTIME_LOCATION = System.getProperty("java.io.tmpdir");
+ DroolsAllBotTests.CREATE_DROOLS_RUNTIME_LOCATION = DroolsAllBotTests.DROOLS_RUNTIME_LOCATION + File.separator + "drools";
+ // Create directory for Drools Runtime which will be created as a part of test
+ new File(DroolsAllBotTests.CREATE_DROOLS_RUNTIME_LOCATION).mkdir();
properties = util.loadProperties(Activator.PLUGIN_ID);
try{
SWTBotView welcomeView = eclipse.getBot().viewByTitle(IDELabel.View.WELCOME);
@@ -51,7 +79,7 @@
@AfterClass
public static void tearDownTest() {
- // Ready for later usage
- }
-
+ // delete created drools runtime
+ SWTUtilExt.deleteDirectory(DroolsAllBotTests.CREATE_DROOLS_RUNTIME_LOCATION);
+ }
}
\ 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-04-16 15:25:51 UTC (rev 21539)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -11,18 +11,19 @@
package org.jboss.tools.drools.ui.bot.test.smoke;
+import java.io.File;
+
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
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.ViewType;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests;
import org.junit.Test;
-import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
/**
* Test managing of Drools Project
* @author Vladimir Pakan
@@ -35,8 +36,12 @@
@Test
public void testManageDroolsProject() {
createDroolsProject (DroolsAllBotTests.DROOLS_PROJECT_NAME);
+ runNewDroolsProject (DroolsAllBotTests.DROOLS_PROJECT_NAME);
}
-
+ /**
+ * Creates new Drools project
+ * @param droolsProjectName
+ */
private void createDroolsProject(String droolsProjectName){
eclipse.showView(ViewType.PACKAGE_EXPLORER);
eclipse.createNew(EntityType.DROOLS_PROJECT);
@@ -60,19 +65,48 @@
}
bot.button(IDELabel.Button.NEXT).click();
bot.button(IDELabel.Button.FINISH).click();
- SWTTestExt.util.waitForAllExcept(100*1000L, new String[]{JobName.USAGE_DATA_EVENT_CONSUMER});
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- boolean isOk = false;
- try {
- tree.getTreeItem(droolsProjectName);
- isOk = true;
- } catch (WidgetNotFoundException e) {
- }
+ SWTTestExt.util.waitForAll(20*1000L);
+ jbt.delay();
+
assertTrue("Project "
+ droolsProjectName
- + " was not created properly.",isOk);
+ + " was not created properly.",SWTEclipseExt.isProjectInPackageExplorer(bot,droolsProjectName));
+ String projectPath = File.separator + droolsProjectName;
+ SWTBotTreeItem[] errors = ProblemsView.getFilteredErrorsTreeItems(bot,null ,projectPath, null,null);
+ assertTrue("Project "
+ + droolsProjectName
+ + " was not created properly. There are these errors: "
+ + SWTEclipseExt.getFormattedTreeNodesText(bot.tree(), errors),
+ errors == null || errors.length == 0);
+ SWTBotTreeItem[] warnings = ProblemsView.getFilteredWarningsTreeItems(bot,null ,projectPath, null,null);
+ assertTrue("Project "
+ + droolsProjectName
+ + " was not created properly. There are these warnings: "
+ + SWTEclipseExt.getFormattedTreeNodesText(bot.tree(), warnings),
+ warnings == null || warnings.length == 0);
+
}
-
+ /**
+ * Runs newly created Drools project and check result
+ * @param droolsProjectName
+ */
+ private void runNewDroolsProject(String droolsProjectName){
+ console.clearConsole();
+ bot.sleep(5000L);
+
+ SWTBotTreeItem tiTestFile = packageExplorer.selectTreeItem(DroolsAllBotTests.DROOLS_TEST_JAVA_TREE_NODE,
+ new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_JAVA_TREE_NODE,
+ DroolsAllBotTests.COM_SAMPLE_TREE_NODE});
+
+ eclipse.runTreeItemAsJavaApplication(tiTestFile);
+
+ String consoleText = console.getConsoleText(3*1000L,60*1000L,true);
+
+ assertTrue("DroolsTest.java class didn't run properly.\n" +
+ "Console Text was: " + consoleText + "\n" +
+ "Expected console text is: " + "Hello World\nGoodbye cruel world\n",
+ "Hello World\nGoodbye cruel world\n".equals(consoleText));
+ }
}
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsRuntime.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsRuntime.java 2010-04-16 15:25:51 UTC (rev 21539)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsRuntime.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -11,6 +11,10 @@
package org.jboss.tools.drools.ui.bot.test.smoke;
+import static org.jboss.tools.ui.bot.ext.SWTTestExt.bot;
+import static org.jboss.tools.ui.bot.ext.SWTTestExt.console;
+import static org.jboss.tools.ui.bot.ext.SWTTestExt.eclipse;
+
import java.io.File;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
@@ -30,17 +34,17 @@
*
*/
public class ManageDroolsRuntime extends SWTTestExt{
- private String testDroolsRuntimeName = null;
- private String testDroolsRuntimeLocation = null;
/**
* Test manage Drools Runtime
*/
@Test
public void testManageDroolsRuntime() {
addDroolsRuntime(DroolsAllBotTests.DROOLS_RUNTIME_NAME,DroolsAllBotTests.DROOLS_RUNTIME_LOCATION);
- editDroolsRuntime(testDroolsRuntimeName,testDroolsRuntimeLocation, "edited" , "testedit");
- removeDroolsRuntime(testDroolsRuntimeName);
- createDroolsRuntime(DroolsAllBotTests.DROOLS_RUNTIME_NAME,DroolsAllBotTests.DROOLS_RUNTIME_LOCATION);
+ editDroolsRuntime(DroolsAllBotTests.getTestDroolsRuntimeName(),
+ DroolsAllBotTests.getTestDroolsRuntimeLocation(),
+ "edited" , "testedit");
+ removeDroolsRuntime(DroolsAllBotTests.getTestDroolsRuntimeName());
+ createDroolsRuntime(DroolsAllBotTests.DROOLS_RUNTIME_NAME,DroolsAllBotTests.CREATE_DROOLS_RUNTIME_LOCATION);
}
/**
* Adds Drools Runtime
@@ -63,13 +67,14 @@
assertTrue("Drools Runtime with name [" + runtimeName +
"] and location [" + runtimeLocation +
"] was not added properly.",droolsRuntimeAdded);
- testDroolsRuntimeName = runtimeName;
- testDroolsRuntimeLocation = runtimeLocation;
+ DroolsAllBotTests.setTestDroolsRuntimeName(runtimeName);
+ DroolsAllBotTests.setTestDroolsRuntimeLocation(runtimeLocation);
}
/**
* Selects Drools Preferences within Preferences Dialog
*/
private void selectDroolsPreferences(){
+ jbt.delay();
bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
bot.shell(IDELabel.Shell.PREFERENCES).activate();
SWTBotTreeItem tiDroolsGroup = bot.tree().expandNode(IDELabel.PreferencesDialog.DROOLS_GROUP);
@@ -104,8 +109,8 @@
assertTrue("Drools Runtime with name [" + runtimeName +
"] and location [" + runtimeLocation +
"] was not renamed properly.",droolsRuntimeEdited);
- testDroolsRuntimeName = editedDroolsRuntimeName;
- testDroolsRuntimeLocation = editedDroolsRuntimeLocation;
+ DroolsAllBotTests.setTestDroolsRuntimeName(editedDroolsRuntimeName);
+ DroolsAllBotTests.setTestDroolsRuntimeLocation(editedDroolsRuntimeLocation);
}
/**
@@ -124,14 +129,14 @@
assertTrue("Drools Runtime with name [" + runtimeName +
"] was not removed properly.",droolsRuntimeRemoved);
// Remove temporary directory created within editDroolsRuntime() method
- if (!testDroolsRuntimeLocation.equals(DroolsAllBotTests.DROOLS_RUNTIME_NAME)){
- File tempDir = new File (testDroolsRuntimeLocation);
+ if (!DroolsAllBotTests.getTestDroolsRuntimeLocation().equals(DroolsAllBotTests.DROOLS_RUNTIME_NAME)){
+ File tempDir = new File (DroolsAllBotTests.getTestDroolsRuntimeLocation());
if (tempDir.isDirectory()){
tempDir.delete();
}
}
- testDroolsRuntimeName = null;
- testDroolsRuntimeLocation = null;
+ DroolsAllBotTests.setTestDroolsRuntimeName(null);
+ DroolsAllBotTests.setTestDroolsRuntimeLocation(null);
}
/**
* Creates Drools Runtime
@@ -139,29 +144,27 @@
* @param runtimeLocation
*/
private void createDroolsRuntime(String runtimeName, String runtimeLocation){
- String newDroolsRuntimeLocation = runtimeLocation + File.separator + "drools";
- new File(newDroolsRuntimeLocation).mkdir();
- DroolsRuntimeManager.createDefaultRuntime(newDroolsRuntimeLocation);
+ DroolsRuntimeManager.createDefaultRuntime(runtimeLocation);
DroolsRuntime droolsRuntime = new DroolsRuntime();
droolsRuntime.setName(runtimeName);
- droolsRuntime.setPath(newDroolsRuntimeLocation);
+ droolsRuntime.setPath(runtimeLocation);
droolsRuntime.setDefault(true);
DroolsRuntimeManager.setDroolsRuntimes(new DroolsRuntime[]{droolsRuntime});
// Test if Drools runtime is defined
- assertTrue("Drools Runtime was not properly created on location: " + newDroolsRuntimeLocation,
- new File (newDroolsRuntimeLocation + File.separator + "drools-api.jar").exists());
+ assertTrue("Drools Runtime was not properly created on location: " + runtimeLocation,
+ new File (runtimeLocation + File.separator + "drools-api.jar").exists());
selectDroolsPreferences();
SWTBotTable table = bot.table();
boolean droolsRuntimeCreated =
SWTEclipseExt.isItemInTableColumn(table,runtimeName,IDELabel.DroolsRuntimeDialog.COLUMN_NAME_INDEX)
- && SWTEclipseExt.isItemInTableColumn(table,newDroolsRuntimeLocation,IDELabel.DroolsRuntimeDialog.COLUMN_LOCATION_INDEX);
+ && SWTEclipseExt.isItemInTableColumn(table,runtimeLocation,IDELabel.DroolsRuntimeDialog.COLUMN_LOCATION_INDEX);
bot.button(IDELabel.Button.OK).click();
SWTEclipseExt.hideWarningIfDisplayed(bot);
assertTrue("Drools Runtime with name [" + runtimeName +
- "] and location [" + newDroolsRuntimeLocation +
+ "] and location [" + runtimeLocation +
"] was not created properly.",droolsRuntimeCreated);
- testDroolsRuntimeName = runtimeName;
- testDroolsRuntimeLocation = newDroolsRuntimeLocation;
+ DroolsAllBotTests.setTestDroolsRuntimeName(runtimeName);
+ DroolsAllBotTests.setTestDroolsRuntimeLocation(runtimeLocation);
}
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-04-16 15:25:51 UTC (rev 21539)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -16,6 +16,8 @@
import java.io.File;
import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Properties;
import org.apache.log4j.Logger;
@@ -47,7 +49,6 @@
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.types.IDELabel.PreferencesDialog;
-import org.omg.CosNaming.NamingContextExtPackage.AddressHelper;
/**
* Provides Eclipse common operation based on SWTBot element operations
@@ -61,13 +62,18 @@
private SWTUtilExt util;
private SWTBotExt bot;
// private SWTUtilExt swtUtilExt;
- private Logger log = Logger.getLogger(SWTEclipseExt.class);
+ private static Logger log = Logger.getLogger(SWTEclipseExt.class);
+ public static final long DEFAULT_UI_TIMEOUT = 1000L;
+ public enum StringConditionType {
+ EQUALS, CONTAINS, STARTS_WITH;
+ }
+
public SWTWorkbenchBot getBot() {
return bot;
}
- public Logger getLog() {
+ public static Logger getLog() {
return log;
}
@@ -239,24 +245,7 @@
* @param path
*/
public SWTBotEditor openFile(String projectName, String... path) {
- SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
- bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).show();
- bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).setFocus();
- SWTBotTree tree = viewBot.tree();
- SWTBotTreeItem item = tree.expandNode(projectName);
- StringBuilder builder = new StringBuilder(projectName);
-
- // Go through path
- for (String nodeName : path) {
- item = item.expandNode(nodeName);
- builder.append("/" + nodeName);
- }
-
- item.select().doubleClick();
- log.info("File Opened:" + builder.toString());
-
- SWTBotEditor editor = bot.activeEditor();
- return editor;
+ return SWTEclipseExt.openFile(bot, projectName, path);
}
// ------------------------------------------------------------
@@ -276,7 +265,7 @@
*
* @return
*/
- public SWTBotTreeItem selectTreeLocation(SWTBot bot, String... path) {
+ public static SWTBotTreeItem selectTreeLocation(SWTBot bot, String... path) {
SWTBot viewBot = bot;
@@ -347,7 +336,7 @@
public void waitForClosedShell(SWTBotShell shell) {
while (shell.isActive()) {
- bot.sleep(200);
+ bot.sleep(SWTEclipseExt.DEFAULT_UI_TIMEOUT);
log.info("Waiting for closing shell...");
}
}
@@ -743,7 +732,6 @@
SWTEclipseExt.getMenuFromSubmenu(
bot.menu(IDELabel.Menu.RUN).menu(IDELabel.Menu.RUN_AS),
IDELabel.Menu.RUN_AS_JAVA_APPLICATION).click();
- System.out.println("stop");
}
/**
@@ -777,4 +765,139 @@
});
return new SWTBotMenu(menuItem);
}
+ /**
+ * Opens file from Package Explorer static version
+ * @param bot
+ * @param path
+ * @return SWTBotEditor
+ */
+ public static SWTBotEditor openFile(SWTBotExt bot, String projectName, String... path) {
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
+ bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).show();
+ bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).setFocus();
+ SWTBotTree tree = viewBot.tree();
+ SWTBotTreeItem item = tree.expandNode(projectName);
+ StringBuilder builder = new StringBuilder(projectName);
+
+ // Go through path
+ for (String nodeName : path) {
+ item = item.expandNode(nodeName);
+ builder.append("/" + nodeName);
+ }
+
+ item.select().doubleClick();
+ log.info("File Opened:" + builder.toString());
+
+ SWTBotEditor editor = bot.activeEditor();
+ return editor;
+ }
+
+ /**
+ * Collapse all expanded tree items
+ * @param tree
+ */
+ public static void collapseAll (SWTBotTree tree,SWTBotExt bot){
+ for (SWTBotTreeItem treeItem : tree.getAllItems()){
+ if (treeItem.isExpanded()){
+ treeItem.collapse();
+ }
+ }
+ bot.sleep(SWTEclipseExt.DEFAULT_UI_TIMEOUT);
+ }
+ /**
+ * Returns all tree items which are children of parent tree item
+ * @param bot
+ * @param tree
+ * @param parent
+ * @param expand
+ * @return
+ */
+ public static List<SWTBotTreeItem> getAllTreeItemsRecursive (SWTBotExt bot, SWTBotTree tree , SWTBotTreeItem parent, boolean expand){
+
+ LinkedList<SWTBotTreeItem> treeItems = new LinkedList<SWTBotTreeItem>();
+
+ if (parent != null){
+ if (expand) {
+ parent.expand();
+ bot.sleep(SWTEclipseExt.DEFAULT_UI_TIMEOUT);
+ }
+
+ SWTBotTreeItem[] nodeChildren = parent.getItems();
+ if (nodeChildren != null){
+ for (SWTBotTreeItem child : nodeChildren){
+ if (child.getText().length() > 0){
+ treeItems.add(child);
+ treeItems.addAll(SWTEclipseExt.getAllTreeItemsRecursive(bot,tree,child,expand));
+ }
+ }
+ }
+ }
+ else{
+ treeItems = (LinkedList<SWTBotTreeItem>)SWTEclipseExt.getAllTreeItemsRecursive(bot, tree, expand);
+ }
+
+ return treeItems;
+ }
+ /**
+ * Returns all tree items recursive
+ * @param bot
+ * @param tree
+ * @param expand
+ * @return
+ */
+ public static List<SWTBotTreeItem> getAllTreeItemsRecursive (SWTBotExt bot, SWTBotTree tree, boolean expand){
+
+ LinkedList<SWTBotTreeItem> treeItems = new LinkedList<SWTBotTreeItem>();
+
+ SWTBotTreeItem[] nodeChildren = tree.getAllItems();
+ if (nodeChildren != null){
+ for (SWTBotTreeItem child : nodeChildren){
+ if (child.getText().length() > 0){
+ treeItems.add(child);
+ treeItems.addAll(SWTEclipseExt.getAllTreeItemsRecursive(bot,tree,child,expand));
+ }
+ }
+ }
+
+ return treeItems;
+ }
+
+ public static String getFormattedTreeNodeText (SWTBotTree tree, SWTBotTreeItem item){
+ StringBuilder stringBuilder = new StringBuilder("");
+
+ if (item != null){
+ for (int column = 0 ; column < tree.columnCount(); column++){
+ if (column > 0){
+ stringBuilder.append(" - ");
+ }
+ String columnText = item.cell(column);
+ if (columnText == null){
+ columnText = "<null>";
+ } else if (columnText == null){
+ columnText = "<empty>";
+ }
+ stringBuilder.append(columnText);
+ }
+ }
+
+ return stringBuilder.toString();
+
+ }
+
+ public static String getFormattedTreeNodesText (SWTBotTree tree, SWTBotTreeItem[] items){
+ StringBuilder stringBuilder = new StringBuilder("");
+
+ if (items != null){
+ for (SWTBotTreeItem item : items){
+ if (stringBuilder.length() > 0){
+ stringBuilder.append("\n");
+ }
+ stringBuilder.append(SWTEclipseExt.getFormattedTreeNodeText(tree,item));
+ }
+ }
+
+ return stringBuilder.toString();
+
+ }
+
}
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-16 15:25:51 UTC (rev 21539)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -14,7 +14,9 @@
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.ui.bot.ext.view.ConsoleView;
import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
import org.jboss.tools.ui.bot.ext.view.ServersView;
/**
@@ -34,7 +36,9 @@
// Views
public static final PackageExplorer packageExplorer = new PackageExplorer();
public static final ProjectExplorer projectExplorer = new ProjectExplorer();
- public static final ServersView servers = new ServersView();
+ public static final ServersView servers = new ServersView();
+ public static final ProblemsView problems = new ProblemsView();
+ public static final ConsoleView console = new ConsoleView();
public static Properties properties;
/**
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-04-16 15:25:51 UTC (rev 21539)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -157,6 +157,7 @@
public static final String DATA_SOURCE_EXPLORER = "Data Source Explorer";
public static final String SERVERS = "Servers";
public static final String WEB_PROJECTS = "Web Projects";
+ public static final String PROBLEMS = "Problems";
}
public class ViewGroup {
@@ -341,4 +342,17 @@
public static final String NAME = "Project name:";
}
-}
+
+ public static class ProblemsTree {
+
+ public static final String WARNINGS = "Warnings";
+ public static final String ERRORS = "Errors";
+
+ }
+
+ public static class ConsoleView {
+
+ public static final String BUTTON_CLEAR_CONSOLE_TOOLTIP = "Clear Console";
+
+ }
+ }
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-04-16 15:25:51 UTC (rev 21539)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -18,7 +18,7 @@
*
*/
public enum ViewType {
- PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,SERVERS,WEB_PROJECTS;
+ PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,SERVERS,WEB_PROJECTS,PROBLEMS;
public String getGroupLabel() {
@@ -29,6 +29,7 @@
case DATA_SOURCE_EXPLORER: viewLabel = IDELabel.ViewGroup.DATA_MANAGEMENT; break;
case SERVERS: viewLabel = IDELabel.ViewGroup.SERVER; break;
case WEB_PROJECTS: viewLabel = IDELabel.ViewGroup.JBOSS_TOOLS_WEB; break;
+ case PROBLEMS: viewLabel = IDELabel.ViewGroup.GENERAL; break;
default: fail("Unknown View Type");
}
return viewLabel;
@@ -42,6 +43,7 @@
case DATA_SOURCE_EXPLORER: viewLabel = IDELabel.View.DATA_SOURCE_EXPLORER; break;
case SERVERS: viewLabel = IDELabel.View.SERVERS; break;
case WEB_PROJECTS: viewLabel = IDELabel.View.WEB_PROJECTS; break;
+ case PROBLEMS: viewLabel = IDELabel.View.PROBLEMS; break;
default: fail("Unknown View Type");
}
return viewLabel;
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -0,0 +1,103 @@
+ /*******************************************************************************
+ * 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.view;
+
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralConsole;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+/**
+ * Manage Console View related tasks
+ * @author Vlado Pakan
+ *
+ */
+public class ConsoleView extends SWTBotExt {
+ protected IView viewObject;
+ protected final SWTOpenExt open;
+ public static final int PROBLEMS_DESCRIPTION_COLUMN_INDEX = 0;
+ public static final int PROBLEMS_RESOURCE_COLUMN_INDEX = 1;
+ public static final int PROBLEMS_PATH_COLUMN_INDEX = 2;
+ public static final int PROBLEMS_TYPE_COLUMN_INDEX = 4;
+ Logger log = Logger.getLogger(ConsoleView.class);
+ public ConsoleView() {
+ viewObject = GeneralConsole.LABEL;
+ open = new SWTOpenExt(this);
+ }
+
+ /**
+ * shows Explorer view
+ */
+ public void show() {
+ open.viewOpen(viewObject);
+ }
+ /**
+ * Returns actual console text
+ * @return
+ */
+ public String getConsoleText(){
+
+ show();
+ SWTBot viewBot = viewByTitle(viewObject.getName()).bot();
+ String consoleText = null;
+ try{
+ consoleText = viewBot.styledText().getText();
+ }catch (WidgetNotFoundException wnfe){
+ consoleText = null;
+ }
+
+ return consoleText;
+
+ }
+ /**
+ * Clears console content
+ */
+ public void clearConsole(){
+
+ show();
+ SWTBot viewBot = viewByTitle(viewObject.getName()).bot();
+ try{
+ SWTBotButton clearConsole = viewBot.buttonWithTooltip(IDELabel.ConsoleView.BUTTON_CLEAR_CONSOLE_TOOLTIP).click();
+ clearConsole.click();
+ }catch (WidgetNotFoundException wnfe){
+ // Do nothing Clear Console button is not available
+ }
+ }
+
+ public String getConsoleText (long sleepTime , long timeOut , boolean quitWhenNoChange){
+
+ long estimatedTime = 0;
+ SWTBot viewBot = viewByTitle(viewObject.getName()).bot();
+ String prevConsoleText = getConsoleText();
+ String consoleText = prevConsoleText;
+ log.info("Waiting for console text with TimeOut: " + timeOut);
+ while ((estimatedTime <= timeOut)
+ && (!quitWhenNoChange
+ || prevConsoleText == null
+ || prevConsoleText.length() == 0
+ || !prevConsoleText.equals(consoleText))){
+ prevConsoleText = consoleText;
+ viewBot.sleep(sleepTime);
+ estimatedTime += sleepTime;
+ consoleText = getConsoleText();
+ }
+ log.info("Waiting for console text finished");
+
+ return consoleText;
+
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.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/ExplorerBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-04-16 15:25:51 UTC (rev 21539)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -57,6 +57,7 @@
* @return
*/
public SWTBotTreeItem selectTreeItem(String treeItemText, String[] path) {
+ show();
return SWTEclipseExt.getTreeItemOnPath(viewByTitle(viewObject.getName()).bot().tree(),
treeItemText, path)
.select();
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java 2010-04-16 15:33:11 UTC (rev 21540)
@@ -0,0 +1,218 @@
+ /*******************************************************************************
+ * 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.view;
+
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt.StringConditionType;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralProblems;
+
+import java.util.LinkedList;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.ViewType;
+/**
+ * Manage Problems View related tasks
+ * @author Vlado Pakan
+ *
+ */
+public class ProblemsView extends SWTBotExt {
+ protected IView viewObject;
+ protected final SWTOpenExt open;
+ public static final int PROBLEMS_DESCRIPTION_COLUMN_INDEX = 0;
+ public static final int PROBLEMS_RESOURCE_COLUMN_INDEX = 1;
+ public static final int PROBLEMS_PATH_COLUMN_INDEX = 2;
+ public static final int PROBLEMS_TYPE_COLUMN_INDEX = 4;
+ Logger log = Logger.getLogger(ProblemsView.class);
+ public ProblemsView() {
+ viewObject = GeneralProblems.LABEL;
+ open = new SWTOpenExt(this);
+ }
+
+ /**
+ * shows Explorer view
+ */
+ public void show() {
+ open.viewOpen(viewObject);
+ }
+ /**
+ * Returns all warnings nodes filtered by input parameters
+ * @param bot
+ * @param descriptionContains
+ * @param pathStartsWith
+ * @param resourceText
+ * @param typeText
+ * @return
+ */
+ public static SWTBotTreeItem[] getFilteredWarningsTreeItems(SWTBotExt bot, String descriptionContains, String pathStartsWith,
+ String resourceText,String typeText){
+
+ SWTBotTreeItem[] warningsTreeItems = null;
+ SWTBotTreeItem warningsNode = ProblemsView.getWarningsNode(bot);
+ SWTBotTree tree = bot.tree();
+ if (warningsNode != null){
+ warningsNode.expand();
+ bot.sleep(SWTEclipseExt.DEFAULT_UI_TIMEOUT);
+ warningsTreeItems = ProblemsView.getProblemsTreeItemsContainingText(bot,tree,warningsNode,
+ descriptionContains, pathStartsWith, resourceText, typeText,
+ false);
+ }
+
+ return warningsTreeItems;
+ }
+
+ /**
+ * Returns all errors nodes filtered by input parameters
+ * @param bot
+ * @param descriptionContains
+ * @param pathStartsWith
+ * @param resourceText
+ * @param typeText
+ * @return
+ */
+ public static SWTBotTreeItem[] getFilteredErrorsTreeItems(SWTBotExt bot, String descriptionContains, String pathStartsWith,
+ String resourceText,String typeText){
+
+ SWTBotTreeItem[] errorsTreeItems = null;
+ SWTBotTreeItem errorsNode = ProblemsView.getErrorsNode(bot);
+ SWTBotTree tree = bot.tree();
+ if (errorsNode != null){
+ errorsNode.expand();
+ bot.sleep(SWTEclipseExt.DEFAULT_UI_TIMEOUT);
+ errorsTreeItems = ProblemsView.getProblemsTreeItemsContainingText(bot,tree,errorsNode,
+ descriptionContains, pathStartsWith, resourceText, typeText,
+ false);
+ }
+
+ return errorsTreeItems;
+
+ }
+
+ /**
+ * Returns Errors Node from Problems View static version
+ * @param bot
+ * @return
+ */
+ public static SWTBotTreeItem getErrorsNode (SWTBotExt bot){
+ SWTBotTreeItem errorsNode = null;
+ SWTBot problemsBot = SWTEclipseExt.showView(bot,ViewType.PROBLEMS);
+ try{
+ SWTBotTreeItem[] filteredTreeItems = ProblemsView.getProblemsTreeItemsContainingText(bot,problemsBot.tree(),null,
+ IDELabel.ProblemsTree.ERRORS,"","","",
+ false);
+ if (filteredTreeItems != null && filteredTreeItems.length > 0){
+ errorsNode = filteredTreeItems[0];
+ }
+ } catch (WidgetNotFoundException wnfe){
+ // do nothing
+ }
+ return errorsNode;
+ }
+ /**
+ * Returns Warnings Node from Problems View static version
+ * @param bot
+ * @return
+ */
+ public static SWTBotTreeItem getWarningsNode (SWTBotExt bot){
+ SWTBotTreeItem warningsNode = null;
+ SWTBot problemsBot = SWTEclipseExt.showView(bot,ViewType.PROBLEMS);
+ try{
+ SWTBotTreeItem[] filteredTreeItems = ProblemsView.getProblemsTreeItemsContainingText(bot,problemsBot.tree(),null,
+ IDELabel.ProblemsTree.WARNINGS,"","","",
+ false);
+ if (filteredTreeItems != null && filteredTreeItems.length > 0){
+ warningsNode = filteredTreeItems[0];
+ }
+ } catch (WidgetNotFoundException wnfe){
+ // do nothing
+ }
+ return warningsNode;
+ }
+ /**
+ * Returns Tree Items from specified tree with specified attributes
+ * When attribute is null then is ignored
+ * @param bot
+ * @param tree
+ * @param parent - when null go thorough all tree items
+ * @param descriptionContains
+ * @param pathStartsWith
+ * @param resourceText
+ * @param typeText
+ * @param expand
+ * @return
+ */
+ public static SWTBotTreeItem[] getProblemsTreeItemsContainingText (SWTBotExt bot,SWTBotTree tree, SWTBotTreeItem parent,
+ String descriptionContains, String pathStartsWith,
+ String resourceText,String typeText,
+ boolean expand){
+
+ LinkedList<SWTBotTreeItem> treeItems = new LinkedList<SWTBotTreeItem>();
+ for (SWTBotTreeItem treeItem : SWTEclipseExt.getAllTreeItemsRecursive(bot, tree, parent, expand)){
+ if (ProblemsView.testProblemsTreeItemForStringCondition(treeItem, descriptionContains,
+ ProblemsView.PROBLEMS_DESCRIPTION_COLUMN_INDEX, StringConditionType.CONTAINS)
+ && ProblemsView.testProblemsTreeItemForStringCondition(treeItem, pathStartsWith,
+ ProblemsView.PROBLEMS_PATH_COLUMN_INDEX, StringConditionType.STARTS_WITH)
+ && ProblemsView.testProblemsTreeItemForStringCondition(treeItem, resourceText,
+ ProblemsView.PROBLEMS_RESOURCE_COLUMN_INDEX, StringConditionType.EQUALS)
+ && ProblemsView.testProblemsTreeItemForStringCondition(treeItem, typeText,
+ ProblemsView.PROBLEMS_TYPE_COLUMN_INDEX, StringConditionType.EQUALS)){
+ treeItems.add(treeItem);
+ }
+ }
+
+ return treeItems.toArray(new SWTBotTreeItem[treeItems.size()]);
+
+ }
+ /**
+ * Tests Tree Item for condition dependent on specified parameters
+ * @param treeItem
+ * @param testString - when null returns true
+ * @param column - tested column index
+ * @param conditionType
+ * @return
+ */
+ public static boolean testProblemsTreeItemForStringCondition (SWTBotTreeItem treeItem,
+ String testString, int column, StringConditionType conditionType){
+
+ boolean isOK = false;
+
+ if (testString != null){
+ String itemString = treeItem.cell(column);
+ if (itemString != null){
+ if (conditionType.equals(StringConditionType.STARTS_WITH)){
+ isOK = itemString.startsWith(testString);
+ }else if (conditionType.equals(StringConditionType.EQUALS)){
+ isOK = itemString.equals(testString);
+ }else if (conditionType.equals(StringConditionType.CONTAINS)){
+ isOK = itemString.indexOf(testString) > -1;
+ }
+
+ }
+ else{
+ isOK = false;
+ }
+ }
+ else{
+ isOK = true;
+ }
+
+ return isOK;
+
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r21539 - in trunk/maven/docs/maven_reference_guide/en-US: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 11:25:51 -0400 (Fri, 16 Apr 2010)
New Revision: 21539
Added:
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/addArchetypeDialog.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/archetypeParametersPage.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/createdMavenProjectWithSeamAndPortlet.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/newMavenProject.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/projectFacetForSeamBasic.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/seamSettingForCreatedProject.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePage.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePageWithSeamBasic.png
trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectWizardDialog.png
Modified:
trunk/maven/docs/maven_reference_guide/en-US/tasks.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-41 Architypes description
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/addArchetypeDialog.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/addArchetypeDialog.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/archetypeParametersPage.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/archetypeParametersPage.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/createdMavenProjectWithSeamAndPortlet.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/createdMavenProjectWithSeamAndPortlet.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/newMavenProject.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/newMavenProject.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/projectFacetForSeamBasic.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/projectFacetForSeamBasic.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/seamSettingForCreatedProject.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/seamSettingForCreatedProject.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePage.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePage.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePageWithSeamBasic.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectArchetypePageWithSeamBasic.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectWizardDialog.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/create_maven_project_with_archetype/selectWizardDialog.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/maven/docs/maven_reference_guide/en-US/tasks.xml
===================================================================
--- trunk/maven/docs/maven_reference_guide/en-US/tasks.xml 2010-04-16 15:10:03 UTC (rev 21538)
+++ trunk/maven/docs/maven_reference_guide/en-US/tasks.xml 2010-04-16 15:25:51 UTC (rev 21539)
@@ -171,7 +171,7 @@
</mediaobject>
</figure>
</section>
- <section>
+ <section id="jpa_project_with_maven">
<title>Create new JPA project with mavenized Hibernate support</title>
<para>To create new <property>JPA</property> project select in main Eclipse menu <emphasis><property>File > New > Other</property></emphasis>. Then choose
<emphasis><property>JPA > JPA Project</property></emphasis>. At the first wizard page enter <property>Project name</property>, select <property>Target Runtime</property>.To add Maven Integration you need to configure <property>Project Facets</property>, for that click <emphasis><property>Modify</property></emphasis> button.</para>
@@ -229,7 +229,26 @@
</mediaobject>
</figure>
</section>
- <section>
+ <section id="maven_archetype">
+ <title>Create new Seam Project with Portlets using Archetypes</title>
+ <para>To create new Maven project with Seam and Portlets from archetype you should have Seam Runtime 2.2 and JBoss AS 5.1.0 Server.</para>
+ <para>If you have necessary runtimes select File > New > Project From the Navigator or Project Explorer. After that The Select a wizard dialog appears.</para>
+ <figure>
+ <title>Select a wizard dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="image/create_maven_project_with_archetype/selectWizardDialog.png"/>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+ <para>Select Maven > Maven Project and you will see a New Maven Project wizard.
+ </para>
+
+
+ </section>
+
+ <section id="maven_project_import">
<title>Existing Maven Projects Import</title>
<section id="import_maven_project">
<title>Seam Projects Import</title>
14 years, 9 months
JBoss Tools SVN: r21538 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-04-16 11:10:03 -0400 (Fri, 16 Apr 2010)
New Revision: 21538
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6197 - fixed
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2010-04-16 15:06:06 UTC (rev 21537)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2010-04-16 15:10:03 UTC (rev 21538)
@@ -123,9 +123,11 @@
Job[] jobs = Job.getJobManager().find(null);
for (Job job : jobs) {
if (job instanceof StructuredRegionProcessor) {
- TestUtil.delay(50);
- isJobsCheck = true;
- break;
+ if (job.getState() == Job.RUNNING) {
+ TestUtil.delay(50);
+ isJobsCheck = true;
+ break;
+ }
}
}
}
14 years, 9 months
JBoss Tools SVN: r21537 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-04-16 11:06:06 -0400 (Fri, 16 Apr 2010)
New Revision: 21537
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added tests for disposer method validation.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 14:27:17 UTC (rev 21536)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 15:06:06 UTC (rev 21537)
@@ -300,16 +300,17 @@
}
private void validateClassBean(IClassBean bean) {
+ validateDisposers(bean);
+ }
+
+ private void validateDisposers(IClassBean bean) {
Set<IBeanMethod> disposers = bean.getDisposers();
- /*
- * 3.3.6. Declaring a disposer method
- * - method has more than one parameter annotated @Disposes
- */
for (IBeanMethod dssposer : disposers) {
List<IParameter> params = dssposer.getParameters();
- if(params.size()<2) {
- continue;
- }
+ /*
+ * 3.3.6. Declaring a disposer method
+ * - method has more than one parameter annotated @Disposes
+ */
Set<IAnnotationDeclaration> declarations = new HashSet<IAnnotationDeclaration>();
for (IParameter param : params) {
IAnnotationDeclaration declaration = param.getAnnotation(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
@@ -322,6 +323,31 @@
addError(CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, declaration, bean.getResource());
}
}
+ /*
+ * 3.3.6. Declaring a disposer method
+ * - a disposer method is annotated @Observes.
+ *
+ * 10.4.2. Declaring an observer method
+ * - a observer method is annotated @Disposes.
+ */
+ declarations = new HashSet<IAnnotationDeclaration>();
+ boolean observesExists = false;
+ for (IParameter param : params) {
+ IAnnotationDeclaration declaration = param.getAnnotation(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ declarations.add(declaration);
+ }
+ declaration = param.getAnnotation(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ declarations.add(declaration);
+ observesExists = true;
+ }
+ }
+ if(observesExists) {
+ for (IAnnotationDeclaration declaration : declarations) {
+ addError(CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferences.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, declaration, bean.getResource());
+ }
+ }
}
}
@@ -367,6 +393,9 @@
/*
* 3.3.2. Declaring a producer method
* - a has a parameter annotated @Observers
+ *
+ * 10.4.2. Declaring an observer method
+ * - an observer method is annotated @Produces
*/
declaration = param.getAnnotation(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
if(declaration!=null) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 14:27:17 UTC (rev 21536)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 15:06:06 UTC (rev 21537)
@@ -79,7 +79,7 @@
// {CDIPreferences.PRODUCER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerAnnotatedInject_label},
{CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerParameterIllegallyAnnotated_label},
// {CDIPreferences.OBSERVER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerAnnotatedInject_label},
-// {CDIPreferences.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerParameterIllegallyAnnotated_label},
+ {CDIPreferences.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerParameterIllegallyAnnotated_label},
// {CDIPreferences.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalProducerMethodInSessionBean_label},
{CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDisposingParameters_label},
// {CDIPreferences.DISPOSER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_disposerAnnotatedInject_label},
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 14:27:17 UTC (rev 21536)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 15:06:06 UTC (rev 21537)
@@ -182,6 +182,17 @@
}
/**
+ * 3.3.6. Declaring a disposer method
+ * - a disposer method is annotated @Observes.
+ *
+ * @throws Exception
+ */
+ public void testObserverParameterUnallowed() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/SpiderProducer_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
+ }
+
+ /**
* 3.3.2. Declaring a producer method
* - a producer method has a parameter annotated @Disposes
*
@@ -203,6 +214,28 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, 25, 26);
}
+ /**
+ * 10.4.2. Declaring an observer method
+ * - an observer method is annotated @Produces
+ *
+ * @throws Exception
+ */
+ public void testObserverMethodAnnotatedProducesFails() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, 25, 25);
+ }
+
+ /**
+ * 10.4.2. Declaring an observer method
+ * - a observer method is annotated @Disposes.
+ *
+ * @throws Exception
+ */
+ public void testObserverMethodWithDisposesParamFails() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
14 years, 9 months
JBoss Tools SVN: r21536 - in branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl: src/org/jbpm/gd/jpdl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-04-16 10:27:17 -0400 (Fri, 16 Apr 2010)
New Revision: 21536
Added:
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
Modified:
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
Log:
JBIDE-5951
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-04-16 14:26:42 UTC (rev 21535)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-04-16 14:27:17 UTC (rev 21536)
@@ -1531,4 +1531,8 @@
</propertySections>
</extension>
+ <extension point="org.eclipse.ui.startup">
+ <startup class="org.jbpm.gd.jpdl.StartupClass"/>
+ </extension>
+
</plugin>
Added: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java (rev 0)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java 2010-04-16 14:27:17 UTC (rev 21536)
@@ -0,0 +1,13 @@
+package org.jbpm.gd.jpdl;
+
+import org.eclipse.ui.IStartup;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
+
+public class StartupClass implements IStartup {
+
+ public void earlyStartup() {
+ // Reference the Jbpm3PreferencesManager to trigger the initialization.
+ Jbpm3PreferencesManager.INSTANCE.toString();
+ }
+
+}
Property changes on: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r21535 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-04-16 10:26:42 -0400 (Fri, 16 Apr 2010)
New Revision: 21535
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added tests for Observes method validation.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-04-16 14:22:03 UTC (rev 21534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-04-16 14:26:42 UTC (rev 21535)
@@ -51,4 +51,5 @@
public String PERSISTENCE_UNIT_ANNOTATION_TYPE_NAME = "javax.persistence.PersistenceUnit";
public String DISPOSES_ANNOTATION_TYPE_NAME = "javax.enterprise.inject.Disposes";
+ public String OBSERVERS_ANNOTATION_TYPE_NAME = "javax.enterprise.event.Observes";
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 14:22:03 UTC (rev 21534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 14:26:42 UTC (rev 21535)
@@ -47,6 +47,7 @@
import org.jboss.tools.cdi.core.IParameter;
import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.IScopeDeclaration;
@@ -327,11 +328,11 @@
private static final String[] RESOURCE_ANNOTATIONS = {CDIConstants.RESOURCE_ANNOTATION_TYPE_NAME, CDIConstants.WEB_SERVICE_REF_ANNOTATION_TYPE_NAME, CDIConstants.EJB_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_CONTEXT_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_UNIT_ANNOTATION_TYPE_NAME};
private void validateProducer(IProducer producer) {
- /*
- * 3.5.1. Declaring a resource
- * - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
- */
if(producer instanceof IProducerField) {
+ /*
+ * 3.5.1. Declaring a resource
+ * - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
+ */
IProducerField producerField = (IProducerField)producer;
if(producerField.getName()!=null) {
IAnnotationDeclaration declaration;
@@ -346,6 +347,37 @@
}
}
}
+ } else {
+ IProducerMethod producerMethod = (IProducerMethod)producer;
+ List<IParameter> params = producerMethod.getParameters();
+ Set<IAnnotationDeclaration> declarations = new HashSet<IAnnotationDeclaration>();
+ declarations.add(producerMethod.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+ for (IParameter param : params) {
+ /*
+ * 3.3.6. Declaring a disposer method
+ * - a disposer method is annotated @Produces.
+ *
+ * 3.3.2. Declaring a producer method
+ * - a has a parameter annotated @Disposes
+ */
+ IAnnotationDeclaration declaration = param.getAnnotation(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ declarations.add(declaration);
+ }
+ /*
+ * 3.3.2. Declaring a producer method
+ * - a has a parameter annotated @Observers
+ */
+ declaration = param.getAnnotation(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ declarations.add(declaration);
+ }
+ }
+ if(declarations.size()>1) {
+ for (IAnnotationDeclaration declaration : declarations) {
+ addError(CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, declaration, producer.getResource());
+ }
+ }
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-04-16 14:22:03 UTC (rev 21534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-04-16 14:26:42 UTC (rev 21535)
@@ -31,7 +31,7 @@
PRODUCER_ANNOTATED_INJECT=Producer method or field is annotated @Inject
PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED=Producer method has a parameter annotated @Disposes or @Observes
OBSERVER_ANNOTATED_INJECT=Observer method is annotated @Inject
-OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED=observer method has a parameter annotated @Disposes
+OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED=Observer method has a parameter annotated @Disposes
ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN=Non-static method of a session bean class is annotated @Produces, and the method is not a business method of the session bean
MULTIPLE_DISPOSING_PARAMETERS=Method has more than one parameter annotated @Disposes
DISPOSER_ANNOTATED_INJECT=Disposer method is annotated @Inject
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 14:22:03 UTC (rev 21534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 14:26:42 UTC (rev 21535)
@@ -77,7 +77,7 @@
CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_member,
new String[][]{
// {CDIPreferences.PRODUCER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerAnnotatedInject_label},
-// {CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerParameterIllegallyAnnotated_label},
+ {CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerParameterIllegallyAnnotated_label},
// {CDIPreferences.OBSERVER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerAnnotatedInject_label},
// {CDIPreferences.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerParameterIllegallyAnnotated_label},
// {CDIPreferences.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalProducerMethodInSessionBean_label},
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 14:22:03 UTC (rev 21534)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 14:26:42 UTC (rev 21535)
@@ -170,6 +170,39 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
}
+ /**
+ * 3.3.6. Declaring a disposer method
+ * - a disposer method is annotated @Produces.
+ *
+ * @throws Exception
+ */
+ public void testProducesUnallowed() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/producesUnallowed/SpiderProducer_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, 30, 31);
+ }
+
+ /**
+ * 3.3.2. Declaring a producer method
+ * - a producer method has a parameter annotated @Disposes
+ *
+ * @throws Exception
+ */
+ public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/SpiderProducer_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, 25, 26);
+ }
+
+ /**
+ * 3.3.2. Declaring a producer method
+ * - a producer method has a parameter annotated @Observers
+ *
+ * @throws Exception
+ */
+ public void testProducerMethodWithParameterAnnotatedObserves() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedObserves/SpiderProducer_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, 25, 26);
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
14 years, 9 months
JBoss Tools SVN: r21534 - in trunk/jbpm/plugins/org.jbpm.gd.jpdl: src/org/jbpm/gd/jpdl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-04-16 10:22:03 -0400 (Fri, 16 Apr 2010)
New Revision: 21534
Added:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
Log:
JBIDE-5951
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-04-16 14:02:57 UTC (rev 21533)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-04-16 14:22:03 UTC (rev 21534)
@@ -1531,4 +1531,8 @@
</propertySections>
</extension>
+ <extension point="org.eclipse.ui.startup">
+ <startup class="org.jbpm.gd.jpdl.StartupClass"/>
+ </extension>
+
</plugin>
Added: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java (rev 0)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java 2010-04-16 14:22:03 UTC (rev 21534)
@@ -0,0 +1,13 @@
+package org.jbpm.gd.jpdl;
+
+import org.eclipse.ui.IStartup;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
+
+public class StartupClass implements IStartup {
+
+ public void earlyStartup() {
+ // Reference the Jbpm3PreferencesManager to trigger the initialization.
+ Jbpm3PreferencesManager.INSTANCE.toString();
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months