JBoss Tools SVN: r37854 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-01-16 04:46:22 -0500 (Mon, 16 Jan 2012)
New Revision: 37854
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
Log:
JBIDE-10629 : Add a new "tag" attribute to Project Examples xml descriptors
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-01-16 09:23:27 UTC (rev 37853)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-01-16 09:46:22 UTC (rev 37854)
@@ -35,6 +35,7 @@
</properties>
-->
</mavenArchetype>
+ <tags>central</tags>
</project>
<project>
@@ -76,6 +77,7 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-helloworld/cheatsheets/helloworld.xml"/>
+ <tags>central</tags>
</project>
<project>
@@ -120,6 +122,7 @@
</fixes>
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <tags>central</tags>
</project>
@@ -162,6 +165,7 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-login/cheatsheets/login.xml"/>
+ <tags>central</tags>
</project>
<project>
@@ -203,6 +207,7 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-numberguess/cheatsheets/numberguess.xml"/>
+ <tags>central</tags>
</project>
<project>
@@ -245,20 +250,17 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-kitchensink/cheatsheets/kitchensink.xml"/>
+ <tags>central</tags>
</project>
-
<project>
- <category>Java EE 6 Quickstarts</category>
- <name>jboss-javaee6-webapp</name>
- <included-projects>jboss-javaee6-webapp</included-projects>
- <shortDescription>Java EE 6 example (Maven archetype)</shortDescription>
- <description>
-This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss AS 7.
-This project is setup to allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0.
-It includes a persistence unit and some sample persistence and transaction code to help you get your feet wet with database access in enterprise Java.
- </description>
- <size>8192</size>
- <url/>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>poh5-helloworld</name>
+ <included-projects>poh5-helloworld</included-projects>
+ <shortDescription>HTML5 Example for mobile devices</shortDescription>
+ <description>This example demonstrates the use of *CDI 1.0* and *JAX-RS* in *JBoss AS 7* using the Plain Old HTML5 (POH5) architecture.
+POH5 is basically a smart, HTML5+CSS3+JavaScript front-end using RESTful services on the backend.</description>
+ <size>7266</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
@@ -273,7 +275,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="versions">[0.13.1,0.16.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -281,214 +283,15 @@
<property name="id">org.jboss.tools.maven.core</property>
<property name="versions">[1.3.0,1.4.0)</property>
<property name="description">This project example requires JBoss Maven Tools.</property>
- <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature,org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
</fix>
</fixes>
- <importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
- <mavenArchetype>
- <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
- <archetypeArtifactId>jboss-javaee6-webapp</archetypeArtifactId>
- <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
- <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
- <groupId>org.jboss.tools.examples</groupId>
- <artifactId>jboss-javaee6-webapp</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <javaPackage>org.jboss.tools.examples</javaPackage>
- <properties>
- <property name="name" value="Java EE 6 webapp project"/>
- </properties>
- </mavenArchetype>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <!-- no cheatsheet yet
+ <welcome type="cheatsheets" url="/poh5-helloworld/cheatsheets/poh5-helloworld.xml"/>
+ -->
+ <tags>central, poh5</tags>
</project>
- <!-- Temporary EE6 project - replace with Pete's new archetype when it's ready -->
- <project>
- <category>Java EE 6 Quickstarts</category>
- <name>multi-javaee6-archetype</name>
- <included-projects>multi-javaee6-archetype</included-projects>
- <shortDescription>JBoss AS 7 / Java EE 6 EAR Webapp(Maven archetype)</shortDescription>
- <description>An archetype that generates a starter Java EE 6 webapp project for JBoss AS 7 / EAP 6. The project is an EAR, with an EJB-JAR and WAR</description>
- <size>13806</size>
- <url/>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.2.0)</property>
- <property name="description">This project example requires m2e >= 1.0.</property>
- <property name="connectorIds">org.eclipse.m2e.feature</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.15.0)</property>
- <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
- <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.jboss.tools.maven.core</property>
- <property name="versions">[1.3.0,1.4.0)</property>
- <property name="description">This project example requires JBoss Maven Tools.</property>
- <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
- </fix>
- </fixes>
- <importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
- <mavenArchetype>
- <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
- <archetypeArtifactId>jboss-javaee6-ear-webapp</archetypeArtifactId>
- <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
- <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
- <groupId>org.jboss.tools.example</groupId>
- <artifactId>multi</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <javaPackage></javaPackage>
- </mavenArchetype>
- <!--targetProjectFacet facet="jst.ear" version="6.0"/-->
- </project>
- <!-- Temporary POH5 project - replace with Pete's new archetype when it's ready -->
- <project>
- <category>Java EE 6 Quickstarts</category>
- <name>jboss-javaee6-poh5-archetype</name>
- <included-projects>jboss-javaee6-poh5</included-projects>
- <shortDescription>Java EE 6 HTML5 Mobile Webapp (Maven archetype)</shortDescription>
- <description>An archetype that generates a Java EE 6 HTML5 Mobile Webapp project for JBoss AS 7 / EAP 6</description>
- <size>165567</size>
- <url/>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.2.0)</property>
- <property name="description">This project example requires m2e >= 1.0.</property>
- <property name="connectorIds">org.eclipse.m2e.feature</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.15.0)</property>
- <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
- <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.jboss.tools.maven.core</property>
- <property name="versions">[1.3.0,1.4.0)</property>
- <property name="description">This project example requires JBoss Maven Tools.</property>
- <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
- </fix>
- </fixes>
- <importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
- <defaultMavenProfiles>arq-jbossas-remote</defaultMavenProfiles>
- <mavenArchetype>
- <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
- <archetypeArtifactId>jboss-javaee6-html5-mobile-archetype</archetypeArtifactId>
- <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
- <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
- <groupId>org.jboss.tools.example</groupId>
- <artifactId>html5-webapp</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <javaPackage>org.jboss.tools.example.html5</javaPackage>
- </mavenArchetype>
- </project>
- <!-- Temporary Spring MVC project - replace with Marius' new archetype when it's ready -->
- <project>
- <category>Java EE 6 Quickstarts</category>
- <name>spring-mvc-webapp</name>
- <included-projects>spring-mvc-webapp</included-projects>
- <shortDescription>Java EE 6 - Spring MVC Application (Maven archetype)</shortDescription>
- <description>An archetype that generates a starter Spring MVC application with Java EE persistence settings (server bootstrapped JPA, JTA transaction management) for JBoss AS7 / EAP 6</description>
- <size>165567</size>
- <url/>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.2.0)</property>
- <property name="description">This project example requires m2e >= 1.0.</property>
- <property name="connectorIds">org.eclipse.m2e.feature</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.15.0)</property>
- <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
- <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.jboss.tools.maven.core</property>
- <property name="versions">[1.3.0,1.4.0)</property>
- <property name="description">This project example requires JBoss Maven Tools.</property>
- <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
- </fix>
- </fixes>
- <importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
- <mavenArchetype>
- <archetypeGroupId>org.jboss.spring.archetypes</archetypeGroupId>
- <archetypeArtifactId>spring-mvc-webapp</archetypeArtifactId>
- <archetypeVersion>1.0.0.CR1</archetypeVersion>
- <!-- archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository -->
- <groupId>org.jboss.tools.example</groupId>
- <artifactId>springmvc</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <javaPackage>org.jboss.tools.example.springmvc</javaPackage>
- </mavenArchetype>
- </project>
- <!-- Richfaces project -->
- <project>
- <category>Java EE 6 Quickstarts</category>
- <name>richfaces-archetype-simpleapp</name>
- <included-projects>richfaces-archetype-simpleapp</included-projects>
- <shortDescription>Java EE 6 - RichFaces Simple Application (Maven archetype)</shortDescription>
- <description>An archetype that generates a simple Richfaces application</description>
- <size>165567</size>
- <url/>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.2.0)</property>
- <property name="description">This project example requires m2e >= 1.0.</property>
- <property name="connectorIds">org.eclipse.m2e.feature</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.15.0)</property>
- <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
- <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.jboss.tools.maven.core</property>
- <property name="versions">[1.3.0,1.4.0)</property>
- <property name="description">This project example requires JBoss Maven Tools.</property>
- <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
- </fix>
- </fixes>
- <importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
- <defaultMavenProfiles>jee6</defaultMavenProfiles>
- <mavenArchetype>
- <archetypeGroupId>org.richfaces.archetypes</archetypeGroupId>
- <archetypeArtifactId>richfaces-archetype-simpleapp</archetypeArtifactId>
- <archetypeVersion>4.1.0-SNAPSHOT</archetypeVersion>
- <archetypeRepository>http://repository.jboss.org/nexus/content/repositories/snapshots/</archetypeRepository>
- <groupId>org.jboss.tools.example</groupId>
- <artifactId>richfaces-webapp</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <javaPackage>org.jboss.tools.example.richfaces</javaPackage>
- </mavenArchetype>
- </project>
+
</projects>
14 years, 2 months
JBoss Tools SVN: r37853 - trunk/forge/plugins/org.jboss.tools.forge.runtime/modules/org/eclipse/javaparser/main.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-01-16 04:23:27 -0500 (Mon, 16 Jan 2012)
New Revision: 37853
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime/modules/org/eclipse/javaparser/main/
Log:
ignore *.index files
Property changes on: trunk/forge/plugins/org.jboss.tools.forge.runtime/modules/org/eclipse/javaparser/main
___________________________________________________________________
Added: svn:ignore
+ *.index
14 years, 2 months
JBoss Tools SVN: r37852 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-16 04:20:26 -0500 (Mon, 16 Jan 2012)
New Revision: 37852
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-10634] corrected typo
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2012-01-16 08:32:44 UTC (rev 37851)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2012-01-16 09:20:26 UTC (rev 37852)
@@ -76,7 +76,7 @@
super(
"Import OpenShift application",
"Choose to create a new/use existing project, " +
- "the GITbranch and clone destination, "
+ "the GIT branch and clone destination, "
+ "and configure your server adapter ",
"Server Adapter",
wizard);
14 years, 2 months
JBoss Tools SVN: r37851 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:32:44 -0500 (Mon, 16 Jan 2012)
New Revision: 37851
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
Log:
new method for copying content from resource with entered parameter to class opened in Eclipse editor
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-01-16 08:26:13 UTC (rev 37850)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-01-16 08:32:44 UTC (rev 37851)
@@ -13,6 +13,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.text.MessageFormat;
import java.util.Scanner;
import org.eclipse.core.resources.IFile;
@@ -50,6 +51,23 @@
}
/**
+ * Method copies resource to class opened in SWTBotEditor with entered parameters
+ * @param classEdit
+ * @param resource
+ * @param closeEdit
+ * @param param
+ */
+ public void replaceClassContentByResource(InputStream resource, boolean closeEdit, Object... param) {
+ SWTBotEclipseEditor classEdit = getEd().toTextEditor();
+ String s = readStream(resource);
+ String code = MessageFormat.format(s, param);
+ classEdit.toTextEditor().selectRange(0, 0, classEdit.toTextEditor().getText().length());
+ classEdit.toTextEditor().setText(code);
+ classEdit.save();
+ if (closeEdit) classEdit.close();
+ }
+
+ /**
* method copies resource from folder "src" param to folder "target" param
* @param src
* @param target
14 years, 2 months
JBoss Tools SVN: r37850 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:26:13 -0500 (Mon, 16 Jan 2012)
New Revision: 37850
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java
Log:
Moving CDIWizardBaseExt from WizardTest to CDIBase
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-16 08:25:31 UTC (rev 37849)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-16 08:26:13 UTC (rev 37850)
@@ -19,6 +19,7 @@
import org.jboss.tools.cdi.bot.test.uiutils.LibraryHelper;
import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
public class CDIBase extends SWTTestExt {
@@ -27,6 +28,7 @@
protected static CDIProjectHelper projectHelper = new CDIProjectHelper();
protected static BeansXMLValidationHelper beansHelper = new BeansXMLValidationHelper();
protected static CDIWizardHelper wizard = new CDIWizardHelper();
+ protected static CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
protected static OpenOnHelper openOnUtil = new OpenOnHelper();
protected static LibraryHelper libraryUtil = new LibraryHelper();
protected static EditorResourceHelper editResourceUtil = new EditorResourceHelper();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java 2012-01-16 08:25:31 UTC (rev 37849)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java 2012-01-16 08:26:13 UTC (rev 37850)
@@ -19,13 +19,12 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewCDIFileWizard;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBase;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.junit.Test;
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test checks all CDI components Wizards
+ * Test checks all CDI components wizardExts
*
* @author Lukas Jungmann
* @author jjankovi
@@ -34,10 +33,8 @@
@SuiteClasses({ CDIAllBotTests.class, CDISmokeBotTests.class })
public class WizardTest extends CDITestBase {
- private final CDIWizardBaseExt wizard = new CDIWizardBaseExt();
-
public String getProjectName() {
- return "CDIWizardTest";
+ return "CDIwizardExtTest";
}
@Override
@@ -51,7 +48,7 @@
@Test
public void testQualifier() {
- wizard.qualifier(getPackageName(), "Q1", false, false).finish();
+ wizardExt.qualifier(getPackageName(), "Q1", false, false).finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("Q1.java").equals(ed.getTitle()));
@@ -63,7 +60,7 @@
assertFalse(code.contains("@Inherited"));
assertFalse(code.startsWith("/**"));
- wizard.qualifier(getPackageName(), "Q2", true, true).finish();
+ wizardExt.qualifier(getPackageName(), "Q2", true, true).finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("Q2.java").equals(ed.getTitle()));
@@ -78,7 +75,7 @@
@Test
public void testScope() {
- wizard.scope(getPackageName(), "Scope1", true, false, true, false).finish();
+ wizardExt.scope(getPackageName(), "Scope1", true, false, true, false).finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("Scope1.java").equals(ed.getTitle()));
@@ -92,7 +89,7 @@
assertTrue(code.contains("@Inherited"));
assertFalse(code.startsWith("/**"));
- wizard.scope(getPackageName(), "Scope2", false, true, true, true).finish();
+ wizardExt.scope(getPackageName(), "Scope2", false, true, true, true).finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("Scope2.java").equals(ed.getTitle()));
@@ -105,7 +102,7 @@
assertFalse(code.contains("@Inherited"));
assertTrue(code.startsWith("/**"));
- wizard.scope(getPackageName(), "Scope3", false, true, false, false).finish();
+ wizardExt.scope(getPackageName(), "Scope3", false, true, false, false).finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("Scope3.java").equals(ed.getTitle()));
@@ -121,7 +118,7 @@
@Test
public void testIBinding() {
- CDIWizardBase w = wizard.binding(getPackageName(), "B1", null, true, false);
+ CDIWizardBase w = wizardExt.binding(getPackageName(), "B1", null, true, false);
assertEquals(2, w.getTargets().size());
w.finish();
util.waitForNonIgnoredJobs();
@@ -135,7 +132,7 @@
assertTrue(code.contains("@Inherited"));
assertFalse(code.startsWith("/**"));
- wizard.binding(getPackageName(), "B2", "TYPE", false, true).finish();
+ wizardExt.binding(getPackageName(), "B2", "TYPE", false, true).finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("B2.java").equals(ed.getTitle()));
@@ -147,7 +144,7 @@
assertFalse(code.contains("@Inherited"));
assertTrue(code.startsWith("/**"));
- wizard.binding(getPackageName(), "B3", "TYPE", false, true).finish();
+ wizardExt.binding(getPackageName(), "B3", "TYPE", false, true).finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
assertTrue(("B3.java").equals(ed.getTitle()));
@@ -159,7 +156,7 @@
assertFalse(code.contains("@Inherited"));
assertTrue(code.startsWith("/**"));
- w = wizard.binding(getPackageName(), "B4", "TYPE", true, false);
+ w = wizardExt.binding(getPackageName(), "B4", "TYPE", true, false);
w.addIBinding(getPackageName() + ".B2");
w.finish();
util.waitForNonIgnoredJobs();
@@ -177,7 +174,7 @@
@Test
public void testStereotype() {
- CDIWizardBase w = wizard.stereotype(getPackageName(), "S1", null, null, false, false, false, false,
+ CDIWizardBase w = wizardExt.stereotype(getPackageName(), "S1", null, null, false, false, false, false,
false);
assertEquals(9, w.getScopes().size());
assertEquals(5, w.getTargets().size());
@@ -195,7 +192,7 @@
assertFalse(code.contains("@Inherited"));
assertFalse(code.startsWith("/**"));
- wizard.stereotype(getPackageName(), "S2", "@Scope3", "FIELD", true, true, true, false, true)
+ wizardExt.stereotype(getPackageName(), "S2", "@Scope3", "FIELD", true, true, true, false, true)
.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
@@ -211,7 +208,7 @@
assertTrue(code.contains("@Target({ FIELD })"));
assertTrue(code.startsWith("/**"));
- w = wizard.stereotype(getPackageName(), "S3", null, null, false, false, true, false, false);
+ w = wizardExt.stereotype(getPackageName(), "S3", null, null, false, false, true, false, false);
w.addIBinding(getPackageName() + ".B1");
w.addStereotype(getPackageName() + ".S1");
w.finish();
@@ -235,7 +232,7 @@
@Test
public void testDecorator() {
bot.sleep(Timing.time1S());
- CDIWizardBase w = wizard.decorator(getPackageName(), "", "java.lang.Comparable", null, true, true, false, false);
+ CDIWizardBase w = wizardExt.decorator(getPackageName(), "", "java.lang.Comparable", null, true, true, false, false);
w.finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().editorByTitle("ComparableDecorator.java");
@@ -251,7 +248,7 @@
assertFalse(code.contains("final"));
assertFalse(code.startsWith("/**"));
- w = wizard.decorator(getPackageName(), "", "java.util.Map", "field", false, false, true, true);
+ w = wizardExt.decorator(getPackageName(), "", "java.util.Map", "field", false, false, true, true);
w.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().editorByTitle("MapDecorator.java");
@@ -270,7 +267,7 @@
@Test
public void testInterceptor() {
- CDIWizardBase w = wizard.interceptor(getPackageName(), "I1", "B2", null, null, false);
+ CDIWizardBase w = wizardExt.interceptor(getPackageName(), "I1", "B2", null, null, false);
w.finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().editorByTitle("I1.java");
@@ -284,7 +281,7 @@
assertFalse(code.contains("final"));
assertFalse(code.startsWith("/**"));
- w = wizard.interceptor(getPackageName(), "I2", "B4", "java.util.Date", "sample", true);
+ w = wizardExt.interceptor(getPackageName(), "I2", "B4", "java.util.Date", "sample", true);
w.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().editorByTitle("I2.java");
@@ -315,7 +312,7 @@
@Test
public void testBean() {
- CDIWizardBase w = wizard.bean(getPackageName(), "Bean1", true, true, false, false, false, false, null, null, null, null);
+ CDIWizardBase w = wizardExt.bean(getPackageName(), "Bean1", true, true, false, false, false, false, null, null, null, null);
w.finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
@@ -328,7 +325,7 @@
assertFalse(code.contains("final"));
assertFalse(code.startsWith("/**"));
- w = wizard.bean(getPackageName(), "Bean2", false, false, true, true, false, false, "", null, "@Dependent", null);
+ w = wizardExt.bean(getPackageName(), "Bean2", false, false, true, true, false, false, "", null, "@Dependent", null);
w.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
@@ -342,7 +339,7 @@
assertTrue(code.contains("final class Bean2 {"));
assertTrue(code.startsWith("/**"));
- w = wizard.bean(getPackageName(), "Bean3", true, false, false, true, false, false, "TestedBean", null, "@Scope2", "Q1");
+ w = wizardExt.bean(getPackageName(), "Bean3", true, false, false, true, false, false, "TestedBean", null, "@Scope2", "Q1");
w.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
@@ -360,7 +357,7 @@
@Test
public void testAnnLiteral() {
- CDIWizardBase w = wizard.annLiteral(getPackageName(), "AnnL1", true, false, true, false, getPackageName() + ".Q1");
+ CDIWizardBase w = wizardExt.annLiteral(getPackageName(), "AnnL1", true, false, true, false, getPackageName() + ".Q1");
w.finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
@@ -373,7 +370,7 @@
assertFalse(code.contains("abstract"));
assertFalse(code.startsWith("/**"));
- w = wizard.annLiteral(getPackageName(), "AnnL2", false, true, false, true, "Q2");
+ w = wizardExt.annLiteral(getPackageName(), "AnnL2", false, true, false, true, "Q2");
w.finish();
util.waitForNonIgnoredJobs();
ed = new SWTWorkbenchBot().activeEditor();
14 years, 2 months
JBoss Tools SVN: r37849 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:25:31 -0500 (Mon, 16 Jan 2012)
New Revision: 37849
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
Log:
Constants for label added
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-16 08:12:43 UTC (rev 37848)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-16 08:25:31 UTC (rev 37849)
@@ -23,6 +23,16 @@
public class CDIProjectHelper extends CDIBase{
+ private final String CDI_WEB_PROJECT = "CDI Web Project";
+ private final String CDI_GROUP = "CDI (Context and Dependency Injection)";
+ private final String WEB_GROUP = "Web";
+ private final String DYNAMIC_WEB_PROJECT = "Dynamic Web Project";
+ private final String CONFIGURE = "Configure";
+ private final String ADD_CDI_SUPPORT = "Add CDI (Context and Dependency Injection) support...";
+ private final String PROPERTIES = "Properties";
+ private final String CDI_PROPERTIES_SETTINGS = "CDI (Context and Dependency Injection) Settings";
+
+
/**
* Method creates new CDI Project with CDI Web Project wizard
* @param projectName
@@ -30,7 +40,7 @@
public void createCDIProjectWithCDIWizard(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("CDI (Context and Dependency Injection)", "CDI Web Project").next();
+ .selectTemplate(CDI_GROUP, CDI_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).finish();
util.waitForNonIgnoredJobs();
}
@@ -51,7 +61,7 @@
*/
public void createDynamicWebProjectWithCDIPreset(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIPreset().finish();
util.waitForNonIgnoredJobs();
}
@@ -62,7 +72,7 @@
*/
public void createDynamicWebProjectWithCDIFacets(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIFacet().finish();
bot.sleep(Timing.time5S());
util.waitForNonIgnoredJobs();
@@ -90,7 +100,7 @@
*/
private void createDynamicWebProject(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).finish();
util.waitForNonIgnoredJobs();
}
@@ -104,9 +114,7 @@
SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem item = tree.getTreeItem(projectName);
item.expand();
- NodeContextUtil.nodeContextMenu(tree, item, "Configure",
- "Add CDI (Context and Dependency Injection) support...")
- .click();
+ NodeContextUtil.nodeContextMenu(tree, item, CONFIGURE, ADD_CDI_SUPPORT).click();
bot.activeShell().bot().button("OK").click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
@@ -122,9 +130,9 @@
SWTBotTree tree = projectExplorer.bot().tree();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,PROPERTIES,false)).click();
- bot.tree().expandNode("CDI (Context and Dependency Injection) Settings").select();
+ bot.tree().expandNode(CDI_PROPERTIES_SETTINGS).select();
boolean isCDISupported = bot.checkBox().isChecked();
bot.button("Cancel").click();
return isCDISupported;
14 years, 2 months
JBoss Tools SVN: r37848 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: editor and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:12:43 -0500 (Mon, 16 Jan 2012)
New Revision: 37848
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java
Log:
Moving all helper class to CDIBase instead of CDITestBase + refactoring QuickFixTestBase
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -12,12 +12,27 @@
package org.jboss.tools.cdi.bot.test;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLValidationHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.LibraryHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-public class CDIBase extends SWTTestExt{
+public class CDIBase extends SWTTestExt {
private static SWTBotEclipseEditor ed;
-
+ protected static CDIProjectHelper projectHelper = new CDIProjectHelper();
+ protected static BeansXMLValidationHelper beansHelper = new BeansXMLValidationHelper();
+ protected static CDIWizardHelper wizard = new CDIWizardHelper();
+ protected static OpenOnHelper openOnUtil = new OpenOnHelper();
+ protected static LibraryHelper libraryUtil = new LibraryHelper();
+ protected static EditorResourceHelper editResourceUtil = new EditorResourceHelper();
+ protected static QuickFixHelper quickFixHelper = new QuickFixHelper();
+
+
public SWTBotEclipseEditor getEd() {
return ed;
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -13,12 +13,6 @@
import java.util.logging.Logger;
-import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLValidationHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.LibraryHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
@@ -40,15 +34,8 @@
protected final String LINE_SEPARATOR = System.getProperty("line.separator");
protected static final Logger LOGGER = Logger.getLogger(CDITestBase.class.getName());
- protected static CDIProjectHelper projectHelper = new CDIProjectHelper();
- protected static BeansXMLValidationHelper beansHelper = new BeansXMLValidationHelper();
- protected static CDIWizardHelper wizard = new CDIWizardHelper();
- protected static OpenOnHelper openOnUtil = new OpenOnHelper();
- protected static LibraryHelper libraryUtil = new LibraryHelper();
- protected static EditorResourceHelper editResourceUtil = new EditorResourceHelper();
-
@Before
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
projectHelper.createCDIProjectWithCDIWizard(getProjectName());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -66,7 +66,7 @@
}
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
new ProjectExplorer().openFile(getProjectName(), descPath.split("/"));
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -61,7 +61,7 @@
assertTrue(bot.activeEditor().toTextEditor().getSelection().equals(beanName));
}
- /*
+
@Test
public void testSearchNamedParameterBean() {
@@ -224,8 +224,8 @@
assertTrue(bot.activeEditor().getTitle().equals(beanName + ".java"));
assertTrue(bot.activeEditor().toTextEditor().getSelection().equals(beanName));
}
- */
+
private SearchNamedDialogWizard openSearchNamedDialog() {
bot.menu("Navigate").menu("Open CDI Named Bean").click();
bot.sleep(Timing.time500MS());
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -29,7 +29,7 @@
SWTBotTreeItem validationProblem = getProblem(CDIAnnotationsType.INJECT,
CDIWizardType.BEANS_XML);
- openQuickFix(validationProblem);
+ quickFixHelper.openQuickFix(validationProblem);
QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
qfWizard.setFix(qfWizard.getAvailableFixes().get(0));
qfWizard.setResource(qfWizard.getResources().get(0));
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -35,7 +35,7 @@
SWTBotTreeItem validationProblem = getProblem(CDIAnnotationsType.INJECT,
CDIWizardType.BEAN);
- openQuickFix(validationProblem);
+ quickFixHelper.openQuickFix(validationProblem);
QuickFixDialogWizard quickFixWizard = new QuickFixDialogWizard();
for (String availableFix : quickFixWizard.getAvailableFixes()) {
if (availableFix.contains(classToQualify)) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -15,9 +15,11 @@
import java.util.ArrayList;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIAnnotationsType;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.AbstractValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.BeanValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.BeansXmlValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.DecoratorValidationProvider;
@@ -26,7 +28,6 @@
import org.jboss.tools.cdi.bot.test.quickfix.validators.QualifierValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.ScopeValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.StereotypeValidationProvider;
-import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
import org.junit.BeforeClass;
@@ -36,8 +37,10 @@
* @author Jaroslav Jankovic
*/
-public class QuickFixTestBase extends QuickFixHelper {
+public class QuickFixTestBase extends CDITestBase {
+ protected AbstractValidationProvider validationErrorsProvider;
+
@BeforeClass
public static void setup() {
problems.show();
@@ -99,10 +102,10 @@
SWTBotTreeItem[] problemsInProblemsView = null;
if (validationErrorsProvider.getAllWarningsAnnotation().contains(annonType)) {
validationProblems = validationErrorsProvider.getAllWarningForAnnotationType(annonType);
- problemsInProblemsView = getProblems(ProblemsType.WARNINGS);
+ problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.WARNINGS, getProjectName());
} else {
validationProblems = validationErrorsProvider.getAllErrorsForAnnotationType(annonType);
- problemsInProblemsView = getProblems(ProblemsType.ERRORS);
+ problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.ERRORS, getProjectName());
}
for (SWTBotTreeItem ti: problemsInProblemsView) {
for (String validationProblem: validationProblems) {
@@ -121,7 +124,7 @@
* @param ti
*/
private void resolveQuickFix(SWTBotTreeItem ti) {
- openQuickFix(ti);
+ quickFixHelper.openQuickFix(ti);
QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -43,7 +43,7 @@
}
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
addSeamSolderLibrary();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -12,7 +12,7 @@
package org.jboss.tools.cdi.bot.test.uiutils;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.annotations.BeansXMLValidationErrors;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
@@ -26,7 +26,7 @@
*
*/
-public class BeansXMLValidationHelper extends CDITestBase {
+public class BeansXMLValidationHelper extends CDIBase {
private static final String CLEAR_BEANS_XML = "/resources/beansXML/beans.xml.cdi";
private static final String CLEAR_BEANS_XML_WITH_TAG = "/resources/beansXML/" +
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -13,11 +13,11 @@
import java.util.List;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
-public class CDIWizardHelper extends CDITestBase{
+public class CDIWizardHelper extends CDIBase{
private CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -1,15 +1,12 @@
package org.jboss.tools.cdi.bot.test.uiutils;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.AbstractValidationProvider;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
-public class QuickFixHelper extends CDITestBase{
+public class QuickFixHelper extends CDIBase {
- protected AbstractValidationProvider validationErrorsProvider;
-
/**
* Method open context menu for given tree item and opens Quick Fix option
* @param item
@@ -23,14 +20,14 @@
* @param problemType
* @return array of problems of given type
*/
- public SWTBotTreeItem[] getProblems(ProblemsType problemType) {
+ public SWTBotTreeItem[] getProblems(ProblemsType problemType, String projectName) {
SWTBotTreeItem[] problemsTree = null;
if (problemType == ProblemsType.WARNINGS) {
problemsTree = ProblemsView.getFilteredWarningsTreeItems(bot, null, "/"
- + getProjectName(), null, null);
+ + projectName, null, null);
}else if (problemType == ProblemsType.ERRORS) {
problemsTree = ProblemsView.getFilteredErrorsTreeItems(bot, null, "/"
- + getProjectName(), null, null);
+ + projectName, null, null);
}
return problemsTree;
}
@@ -39,11 +36,11 @@
* Method gets allProblems in problemsView as array of SWTBotTreeItem
* @return
*/
- public SWTBotTreeItem[] getAllProblems() {
+ public SWTBotTreeItem[] getAllProblems(String projectName) {
- SWTBotTreeItem[] warningProblemsTree = getProblems(ProblemsType.WARNINGS);
+ SWTBotTreeItem[] warningProblemsTree = getProblems(ProblemsType.WARNINGS, projectName);
- SWTBotTreeItem[] errorProblemsTree = getProblems(ProblemsType.ERRORS);
+ SWTBotTreeItem[] errorProblemsTree = getProblems(ProblemsType.ERRORS, projectName);
return joinTwoArrays(warningProblemsTree, errorProblemsTree);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -21,7 +21,7 @@
public class CDISupportTest extends CDITestBase {
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -28,7 +28,7 @@
public class ConfigurationPresetTest extends CDITestBase {
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
projectHelper.createDynamicWebProjectWithCDIPreset(getProjectName());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -25,11 +25,11 @@
@SuiteClasses({ CDIAllBotTests.class , CDISmokeBotTests.class })
public class FacetTest extends CDITestBase {
-
+
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createDynamicWebProjectWithCDIFacets(getProjectName());
+ projectHelper.createDynamicWebProjectWithCDIFacets(getProjectName());
}
}
@@ -41,13 +41,13 @@
@Test
public void testCDIFacet() {
if (projectHelper.projectExists(getProjectName())) {
- LOGGER.info("Dynamic Web Project with CDI Facet created");
+ LOGGER.info("Dynamic Web Project with CDI Facet created");
assertTrue("Error: beans.xml should be created when selecting CDI Facet",
projectExplorer.isFilePresent(getProjectName(), "WebContent/WEB-INF/beans.xml".split("/")));
} else {
fail("CDI project was not succesfully created with Dynamic Web Project wizard with CDI facet");
}
- ;
+
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java 2012-01-16 08:09:23 UTC (rev 37847)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java 2012-01-16 08:12:43 UTC (rev 37848)
@@ -35,7 +35,7 @@
public class PerspectiveTest extends CDITestBase {
@Override
- public void checkAndCreateProject() {
+ public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
projectHelper.createCDIProjectWithCDIWizard(getProjectName());
eclipse.openPerspective(PerspectiveType.CDI);
14 years, 2 months
JBoss Tools SVN: r37847 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:09:23 -0500 (Mon, 16 Jan 2012)
New Revision: 37847
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISeam3AllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
Log:
change bot tests suite to extend AbstractTestSuite
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-16 08:07:36 UTC (rev 37846)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-16 08:09:23 UTC (rev 37847)
@@ -29,14 +29,11 @@
import org.jboss.tools.cdi.bot.test.seam3.Seam3ConfigValidationTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3GenericOpenOnTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3ResourceOpenOnTest;
-import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ui.bot.ext.types.ViewType;
-import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -88,16 +85,6 @@
Seam3GenericOpenOnTest.class,
Seam3ConfigValidationTest.class,
})
-public class CDIAllBotTests extends CDITestBase {
+public class CDIAllBotTests extends AbstractTestSuite {
- /*
- * init method "setup()" shows a project explorer view as default,
- * disable folding (to easier source code editing)
- */
- @BeforeClass
- public static void setUpSuite() {
- eclipse.showView(ViewType.PROJECT_EXPLORER);
- SWTEclipseCDIExtUtil.disableFolding(bot, util);
- }
-
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISeam3AllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISeam3AllBotTests.java 2012-01-16 08:07:36 UTC (rev 37846)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISeam3AllBotTests.java 2012-01-16 08:09:23 UTC (rev 37847)
@@ -14,11 +14,7 @@
import org.jboss.tools.cdi.bot.test.seam3.Seam3ConfigValidationTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3GenericOpenOnTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3ResourceOpenOnTest;
-import org.jboss.tools.cdi.bot.test.seam3.Seam3TestBase;
-import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ui.bot.ext.types.ViewType;
-import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -48,15 +44,6 @@
Seam3GenericOpenOnTest.class,
Seam3ConfigValidationTest.class,
})
-public class CDISeam3AllBotTests extends Seam3TestBase {
+public class CDISeam3AllBotTests extends AbstractTestSuite {
- /*
- * init method "setup()" shows a project explorer view as default,
- * disable folding (due to easier source code editing)
- */
- @BeforeClass
- public static void setUpSuite() {
- eclipse.showView(ViewType.PROJECT_EXPLORER);
- SWTEclipseCDIExtUtil.disableFolding(bot, util);
- }
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2012-01-16 08:07:36 UTC (rev 37846)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2012-01-16 08:09:23 UTC (rev 37847)
@@ -11,14 +11,11 @@
package org.jboss.tools.cdi.bot.test;
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
-import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
-import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
+import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ui.bot.ext.types.ViewType;
-import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -51,15 +48,6 @@
WizardTest.class,
BeansEditorTest.class,
})
-public class CDISmokeBotTests extends CDITestBase {
+public class CDISmokeBotTests extends AbstractTestSuite {
- /*
- * init method "setup()" shows a project explorer view as default,
- * disable folding (due to easier source code editing)
- */
- @BeforeClass
- public static void setUpSuite() {
- eclipse.showView(ViewType.PROJECT_EXPLORER);
- SWTEclipseCDIExtUtil.disableFolding(bot, util);
- }
}
14 years, 2 months
JBoss Tools SVN: r37846 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-16 03:07:36 -0500 (Mon, 16 Jan 2012)
New Revision: 37846
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java
Log:
AbstractTestSuite added to be extended by all CDI bot tests suite classes
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java 2012-01-16 08:07:36 UTC (rev 37846)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.bot.test;
+
+import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.junit.BeforeClass;
+
+public abstract class AbstractTestSuite extends SWTTestExt {
+
+ /*
+ * init method "setup()" shows a project explorer view as default, disable
+ * folding (to easier source code editing)
+ */
+ @BeforeClass
+ public static void setUpSuite() {
+ eclipse.showView(ViewType.PROJECT_EXPLORER);
+ SWTEclipseCDIExtUtil.disableFolding(bot, util);
+ }
+
+}
14 years, 2 months
JBoss Tools SVN: r37845 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-01-16 02:59:27 -0500 (Mon, 16 Jan 2012)
New Revision: 37845
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLDetector.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLValidator.java
Log:
JBIDE-10472
CLONE - XHTML Validator hangs eclipse
The detector for XHTML documents is added
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLDetector.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLDetector.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLDetector.java 2012-01-16 07:59:27 UTC (rev 37845)
@@ -0,0 +1,538 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.web.validation;
+
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IToken;
+import org.jboss.tools.common.text.ext.util.TextScanner;
+import org.jboss.tools.common.text.ext.util.Utils;
+
+/**
+ * Detects if there is an xhtml is in reader
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+class XHTMLDetector extends TextScanner {
+
+ private static final String XML_DECLARATION_START = "<?";
+ private static final String XML_DECLARATION_END = "?>";
+ private static final String XML_DECLARATION = "xml";
+
+ private static final String DOCTYPE_DECLARATION = "DOCTYPE";
+ private static final String DOCTYPE_DECLARATION_END = ">";
+ private static final String VALID_DOCTYPE_ROOT = "html";
+ private static final String[] VALID_DOCTYPE_DTD_DECLARATION_REQUIRED_TOKENS = { "W3C", "DTD", "XHTML"};
+ private static final String[] VALID_DOCTYPE_DTD_DECLARATION_ONE_OF_TOKENS = { "Strict", "Transitional", "Frameset"};
+ private static final String[] VALID_DOCTYPE_DTD_DECLARATION_REQUIRED_SYSTEM_IDS = {
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd",
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd",
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+ };
+ private static final String VALID_ELEMENT_XMLNS_ATTRIBUTE = "xmlns";
+ private static final String VALID_ELEMENT_XMLNS_ATTRIBUTE_VALUE = "http://www.w3.org/1999/xhtml";
+
+ private static final String TEXT_TOKEN = "___TEXT_TOKEN";
+ private static final String COMMENT_TOKEN = "___COMMENT_TOKEN";
+ private static final String XML_DECL_TOKEN = "___XML_DECL_TOKEN";
+ private static final String DECL_TOKEN = "___DECL_TOKEN";
+ private static final String ELEMENT_TOKEN = "___ELEMENT_TOKEN";
+
+ private static final String PUBLIC = "PUBLIC";
+ private static final String SYSTEM = "SYSTEM";
+
+ public XHTMLDetector(Reader reader) {
+ super(reader);
+ }
+
+ public boolean detect () {
+ state = STATE_START;
+ clearText();
+
+ boolean docTypeFound = false;
+ String docTypeRootName = null;
+ String docTypeIdKind = null;
+ String docTypePublicId = null;
+ String docTypeSystemId = null;
+
+ for (IToken t = nextToken(); t != null && !t.isEOF() ; t = nextToken()) {
+ if (!(t instanceof TextToken))
+ continue;
+ TextToken token = (TextToken)t;
+ if (!docTypeFound && DECL_TOKEN.equals(token.getType())) {
+ if (declName != null && declName.equals(DOCTYPE_DECLARATION)) {
+ docTypeFound = true;
+ docTypeRootName = rootName;
+ docTypeIdKind = idKind;
+ docTypePublicId = publicId;
+ docTypeSystemId = systemId;
+
+// if (!VALID_DOCTYPE_ROOT.equals(docTypeRootName))
+// return false;
+ if (!PUBLIC.equals(docTypeIdKind))
+ return false;
+ if (!hasAllTokens(docTypePublicId, VALID_DOCTYPE_DTD_DECLARATION_REQUIRED_TOKENS))
+ return false;
+ if (!hasOneOfTokens(docTypePublicId, VALID_DOCTYPE_DTD_DECLARATION_ONE_OF_TOKENS))
+ return false;
+ }
+ }
+ if (ELEMENT_TOKEN.equals(token.getType())) {
+ if (docTypeFound) {
+ if (elementName == null)
+ return false;
+
+ String name = elementName.substring(elementName.indexOf(':') + 1); // Cut the prefix off
+
+ if (!docTypeRootName.equals(name))
+ return false;
+ if (!elementAttributes.containsKey(VALID_ELEMENT_XMLNS_ATTRIBUTE))
+ return false;
+
+ String value = elementAttributes.get(VALID_ELEMENT_XMLNS_ATTRIBUTE);
+ if (value == null) return false;
+ if (!VALID_ELEMENT_XMLNS_ATTRIBUTE_VALUE.equals(Utils.trimQuotes(value).toLowerCase()))
+ return false;
+ return true;
+ } else {
+ if (!elementAttributes.containsKey(VALID_ELEMENT_XMLNS_ATTRIBUTE))
+ continue;
+
+ String value = elementAttributes.get(VALID_ELEMENT_XMLNS_ATTRIBUTE);
+ if (value == null) continue;
+ if (!VALID_ELEMENT_XMLNS_ATTRIBUTE_VALUE.equals(Utils.trimQuotes(value).toLowerCase()))
+ continue;
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean hasAllTokens(String publicId, String[] reqiured) {
+ if (publicId == null) return false;
+ for (String r : reqiured) {
+ if (publicId.indexOf(r) == -1)
+ return false;
+ }
+ return true;
+ }
+ private boolean hasOneOfTokens(String publicId, String[] oneOf) {
+ if (publicId == null) return false;
+ boolean found = false;
+ for (String r : oneOf) {
+ if (publicId.indexOf(r) != -1) {
+ if (found)
+ return false; // Contains more than one token
+ found = true;
+ }
+ }
+ return found;
+ }
+
+ private static final int STATE_START = 0;
+ private static final int STATE_ELEMENT = 1;
+ private static final int STATE_ELEMENT_END = 2;
+
+ private static final int STATE_XML_DECL = 3;
+ private static final int STATE_XML_DECL_END = 4;
+
+ private static final int STATE_DECL = 5;
+ private static final int STATE_DECL_NAME = 6;
+ private static final int STATE_DECL_ROOT = 7;
+ private static final int STATE_DECL_PUBLIC = 8;
+ private static final int STATE_DECL_SYSTEM = 9;
+ private static final int STATE_DECL_PUBLIC_ID = 10;
+ private static final int STATE_DECL_SYSTEM_ID = 11;
+ private static final int STATE_DECL_END = 12;
+
+ private static final int STATE_COMMENT = 13;
+ private static final int STATE_COMMENT_END = 14;
+ private static final int STATE_END = 15;
+
+ private int state;
+
+ private String declName;
+ private String rootName;
+ private String idKind;
+ private String publicId;
+ private String systemId;
+
+ private String elementName;
+ private Map<String, String> elementAttributes = new HashMap<String, String>();
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.jsf.text.ext.util.TextScanner#nextToken()
+ */
+ public IToken nextToken() {
+ offset += length;
+ switch (state) {
+ case STATE_ELEMENT:
+ return nextElementToken();
+ case STATE_DECL:
+ return nextDeclToken();
+ case STATE_XML_DECL:
+ return nextXmlDeclToken();
+ case STATE_COMMENT:
+ return nextCommentToken();
+ }
+ return nextTextToken();
+ }
+
+ private IToken nextTextToken() {
+ int count = skipWhitespaceToken();
+ int ch = read();
+ while (ch != ICharacterScanner.EOF) {
+ if (ch == '<') {
+ state = STATE_ELEMENT;
+ ch = read();
+ if (ch == '!') {
+ state = STATE_DECL;
+ ch = read();
+ if (ch == '-') {
+ ch = read();
+ if (ch == '-') {
+ state = STATE_COMMENT;
+ unread(); // "-"
+ unread(); // "-"
+ unread(); // "!" char
+ unread(); // "<" char
+ return (count > 0 ? getToken(TEXT_TOKEN) : nextCommentToken());
+ }
+ if (ch != -1)
+ unread(); // last char
+ unread(); // "-"
+ }
+ if (ch != -1)
+ unread(); // last char
+ unread(); // "!" char
+ unread(); // "<" char
+ return (count > 0 ? getToken(TEXT_TOKEN) : nextDeclToken());
+ }
+ if (ch == '?') {
+ state = STATE_XML_DECL;
+ unread(); // "?" char
+ unread(); // "<" char
+ return (count > 0 ? getToken(TEXT_TOKEN) : nextXmlDeclToken());
+ }
+ if (ch != -1)
+ unread(); // last char
+ unread(); // "<" char
+ return (count > 0 ? getToken(TEXT_TOKEN) : nextElementToken());
+ }
+ count++;
+ ch = read();
+ }
+ state = STATE_END;
+ return getToken(TEXT_TOKEN);
+ }
+
+ private IToken nextCommentToken() {
+ int count = skip(3); // Skip '<!--' chars
+ if (count < 3) {
+ state = STATE_END;
+ return getToken(COMMENT_TOKEN);
+ }
+ int ch = read();
+ while (ch != ICharacterScanner.EOF) {
+ if (ch == '-') {
+ ch = read();
+ if (ch == ICharacterScanner.EOF) {
+ break;
+ }
+ if (ch == '-') {
+ ch = read();
+ if (ch == ICharacterScanner.EOF) {
+ break;
+ }
+ if (ch == '>') {
+ state = STATE_START;
+ return getToken(COMMENT_TOKEN);
+ }
+ }
+ }
+ count++;
+ ch = read();
+ }
+ state = STATE_END;
+ return getToken(COMMENT_TOKEN);
+ }
+
+ private IToken nextXmlDeclToken() {
+ int count = skip(2); // Skip '<?' chars
+ if (count < 2) {
+ state = STATE_END;
+ return getToken(XML_DECL_TOKEN);
+ }
+ int ch = read();
+ while (ch != ICharacterScanner.EOF) {
+ if (ch == '"' || ch == '\'') {
+ count += skipLiteralToken(ch);
+ ch = read();
+ continue;
+ }
+
+ if (ch == '?') {
+ ch = read();
+ if (ch == ICharacterScanner.EOF) {
+ break;
+ }
+ if (ch == '>') {
+ state = STATE_START;
+ return getToken(XML_DECL_TOKEN);
+ }
+ }
+ count++;
+ ch = read();
+ }
+ state = STATE_END;
+ return getToken(XML_DECL_TOKEN);
+ }
+
+
+ private IToken nextDeclToken() {
+ int count = skip(2); // Skip '<' chars
+ if (count < 2) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+
+ // Read declaration name (we're very expecting to see 'DOCTYPE' here)
+ declName = readName();
+ if (declName == null || declName.length() == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += declName.length();
+
+ // At least one WS-char is expected here
+ int wsCount = skipWhitespaceToken();
+ if (wsCount == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += wsCount;
+
+ // Read root element name here (http://www.w3.org/TR/xhtml1/#strict says that 'html' is strictly expected here)
+ rootName = readName();
+ if (declName == null || declName.length() == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += declName.length();
+
+ // At least one WS-char is expected here
+ wsCount = skipWhitespaceToken();
+ if (wsCount == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += wsCount;
+
+ // Read 'PUBLIC' or 'SYSTEM' word here
+ idKind = readName();
+ if (declName == null || declName.length() == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += declName.length();
+
+ // At least one WS-char is expected here
+ wsCount = skipWhitespaceToken();
+ if (wsCount == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += wsCount;
+
+ if (!PUBLIC.equals(idKind) && !SYSTEM.equals(idKind)) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+
+ // If ID is PUBLIC then read PUBLIC ID value
+ if (PUBLIC.equals(idKind)) {
+ publicId = readLiteralValue();
+ count += publicId.length();
+
+ // At least one WS-char is expected here
+ wsCount = skipWhitespaceToken();
+ if (wsCount == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += wsCount;
+ }
+
+ // Read SYSTEM ID value
+ systemId = readLiteralValue();
+ count += systemId.length();
+
+ // Expecting end of declaration, so don't check count of WS-chars
+ count += skipWhitespaceToken();
+ count += wsCount;
+
+ int ch = read();
+ state = ch == '>' ? STATE_START : STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+
+ private IToken nextElementToken() {
+ int count = skip(1); // Skip '<' char
+ if (count < 1) {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+
+ // Check for '/' char (ending tag)
+ int ch = read();
+ if (ch == -1) {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+ boolean closingTag = true;
+ if (ch != '/') { // unread if it's not '/' char
+ unread();
+ closingTag = false;
+ } else {
+ count++;
+ }
+
+ // Read tag name (the tag that is interesting for us is 'html', but it could be any tag)
+ elementName = readName();
+ elementAttributes.clear();
+
+ if (elementName == null || elementName.length() == 0) {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+ count += elementName.length();
+
+ ch = read(); // Check that the next char exists
+
+ while (ch != ICharacterScanner.EOF) {
+ if (ch == -1) {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+ unread();
+
+ int wsCount = skipWhitespaceToken();
+ count += wsCount;
+ // Check for end of tag:
+ ch = read();
+ if (!closingTag && ch == '/') { // - end of tag with no body
+ ch = read();
+ state = ch == '>' ? STATE_START : STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ } else if (ch == '>') { // - end of tag with body
+ state = STATE_START;
+ return getToken(ELEMENT_TOKEN);
+ } else {
+ if (wsCount == 0) {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+ }
+ unread();
+ count += wsCount;
+
+ if (!closingTag) {
+ // Read attr name
+ String attrName = readName();
+ if (attrName == null || attrName.length() == 0) {
+ state = STATE_END;
+ return getToken(DECL_TOKEN);
+ }
+ count += attrName.length();
+ count += skipWhitespaceToken();
+
+ // read eq sign
+ ch = read();
+ if (ch != '=') {
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+ count++;
+ count += skipWhitespaceToken();
+
+ // read attr value
+ String attrValue = readLiteralValue();
+ count += attrValue.length();
+
+ elementAttributes.put(attrName, attrValue);
+ }
+ //
+
+ ch = read();
+ }
+
+ state = STATE_END;
+ return getToken(ELEMENT_TOKEN);
+ }
+
+ int skip(int count) {
+ int skipped = 0;
+ for (;skipped < count && read() != -1;skipped++) ;
+ return skipped;
+ }
+
+ public int skipLiteralToken(int quote) {
+ int count = 0;
+ for (int ch = read(); ch != -1 && ch != quote; ch = read()) count++;
+ return count;
+ }
+
+ String readLiteralValue() {
+ StringBuffer sb = new StringBuffer();
+
+ int quote = read();
+ if (quote != '"' && quote != '\'') {
+ unread();
+ return sb.toString();
+ }
+ sb.append((char)quote);
+ int ch = read();
+ for (; ch != -1 && ch != quote; ch = read()) sb.append((char)ch);
+ if (ch != -1)
+ sb.append((char)ch);
+ return sb.toString();
+ }
+
+ String readName() {
+ StringBuffer sb = new StringBuffer();
+
+ // Check first one char in the stream
+ int ch = read();
+ if (ch == ICharacterScanner.EOF) {
+ return null;
+ }
+ if (!NMTOKEN_DETECTOR.isWordStart((char)ch)) {
+ return null;
+ }
+ sb.append((char)ch);
+
+ ch = read();
+ while (ch != ICharacterScanner.EOF) {
+ if (!NMTOKEN_DETECTOR.isWordPart((char)ch)) {
+ unread();
+ break;
+ }
+ sb.append((char)ch);
+ ch = read();
+ }
+ return sb.toString();
+ }
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLDetector.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLValidator.java 2012-01-16 05:43:11 UTC (rev 37844)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLValidator.java 2012-01-16 07:59:27 UTC (rev 37845)
@@ -12,12 +12,16 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.Reader;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
+import java.text.AttributedString;
import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.xerces.xni.XMLResourceIdentifier;
import org.apache.xerces.xni.XNIException;
@@ -32,6 +36,9 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IToken;
import org.eclipse.wst.validation.ValidationResult;
import org.eclipse.wst.validation.ValidationState;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -40,6 +47,7 @@
import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
import org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;
+import org.jboss.tools.common.text.ext.util.TextScanner;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.xml.sax.InputSource;
@@ -134,6 +142,16 @@
NestedValidatorContext context, ValidationResult result) {
displaySubtask(JSFValidationMessage.XHTML_VALIDATION, uri);
XMLValidationInfo report = new XMLValidationInfo(uri);
+
+ IDocument doc = resource instanceof IFile ? getDocument((IFile)resource) : null;
+
+ if (doc == null || !isXHTML(doc)) {
+ System.out.println("XHTML is NOT Detected: " + resource.getFullPath().toString());
+ return report;
+ } else {
+ System.out.println("XHTML is Detected: " + resource.getFullPath().toString());
+ }
+
XHTMLElementHandler handler = new XHTMLElementHandler(uri,
(resource instanceof IFile ? getDocument((IFile)resource) : null),
report);
@@ -176,6 +194,11 @@
return report;
}
+ boolean isXHTML(IDocument document) {
+ XHTMLDetector detector = new XHTMLDetector(new StringReader(document.get()));
+ return detector.detect();
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.wst.xml.core.internal.validation.eclipse.Validator#addInfoToMessage(org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage, org.eclipse.wst.validation.internal.provisional.core.IMessage)
14 years, 2 months