JBoss Tools SVN: r15649 - trunk/freemarker/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-06-02 12:12:28 -0400 (Tue, 02 Jun 2009)
New Revision: 15649
Added:
trunk/freemarker/releng/.project
Log:
add .project file
Added: trunk/freemarker/releng/.project
===================================================================
--- trunk/freemarker/releng/.project (rev 0)
+++ trunk/freemarker/releng/.project 2009-06-02 16:12:28 UTC (rev 15649)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.freemarker.releng</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Property changes on: trunk/freemarker/releng/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r15648 - trunk/jmx.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-06-02 12:11:47 -0400 (Tue, 02 Jun 2009)
New Revision: 15648
Added:
trunk/jmx/.project
Log:
add .project file
Added: trunk/jmx/.project
===================================================================
--- trunk/jmx/.project (rev 0)
+++ trunk/jmx/.project 2009-06-02 16:11:47 UTC (rev 15648)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.jmx.releng</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Property changes on: trunk/jmx/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r15647 - in trunk/documentation/whatsnew/vpe: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-06-02 12:05:22 -0400 (Tue, 02 Jun 2009)
New Revision: 15647
Added:
trunk/documentation/whatsnew/vpe/images/context-menu.png
trunk/documentation/whatsnew/vpe/images/vpe-custom-tags-rendering.png
trunk/documentation/whatsnew/vpe/images/vpe-horizontal-split.png
trunk/documentation/whatsnew/vpe/images/vpe-vertical-split.png
trunk/documentation/whatsnew/vpe/vpe-news-3.1.0.M1.html
Log:
what's new page for vpe was has been added
Added: trunk/documentation/whatsnew/vpe/images/context-menu.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/context-menu.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/images/vpe-custom-tags-rendering.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/vpe-custom-tags-rendering.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/images/vpe-horizontal-split.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/vpe-horizontal-split.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/images/vpe-vertical-split.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/vpe-vertical-split.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/vpe-news-3.1.0.M1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.1.0.M1.html (rev 0)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.1.0.M1.html 2009-06-02 16:05:22 UTC (rev 15647)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>What's New Visual Page Editor</title>
+</head>
+<body>
+<h1>What's New Visual Page Editor</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+ href="../seam/seam-news-2.0.0.CR2.html">Seam Tools ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Visual Page Editor Templates</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Richfaces
+ 3.3.1</b></td>
+ <td valign="top">
+ <p>Richfaces 3.3.1 is now supported in code completion and visual
+ page editor.</p>
+
+ <p><small><a
+ href="https://jira.jboss.org/jira/browse/JBIDE-4381">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Visual Page Editor Core</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Context
+ menu adjustment</b></td>
+ <td valign="top">
+ <p>Additional actions (cut,add, past) have been added to menu of
+ parent tag.</p>
+
+ <p><img src="images/context-menu.png" /></p>
+
+ <p><small><a
+ href="https://jira.jboss.org/jira/browse/JBIDE-4226">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Vertical
+ and Horizontal Split</b></td>
+ <td valign="top">
+ <p>Visual/Source editor can be splitted vertically (on wide screen
+ monitors it's more convenient) or horizontally.</p>
+
+ <p><img src="images/vpe-vertical-split.png"
+ alt="Vpe Vertilal split" /></p>
+ <p><img src="images/vpe-horizontal-split.png"
+ alt="Vpe Horizontal split" /></p>
+ <p><small><a
+ href="https://jira.jboss.org/jira/browse/JBIDE-4152">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Rendering of facelet components</b></td>
+ <td valign="top">
+ <p>Visual rendering of custom facelet components has been added to
+ visual page editor.</p>
+
+ <p><img src="images/vpe-custom-tags-rendering.png" /></p>
+
+ <p><small><a
+ href="https://jira.jboss.org/jira/browse/JBIDE-3197">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
15 years, 6 months
JBoss Tools SVN: r15646 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-06-02 11:58:16 -0400 (Tue, 02 Jun 2009)
New Revision: 15646
Modified:
trunk/jmx/releng/build.properties.example.windows
Log:
create sample build.props for windows
Modified: trunk/jmx/releng/build.properties.example.windows
===================================================================
--- trunk/jmx/releng/build.properties.example.windows 2009-06-02 15:39:16 UTC (rev 15645)
+++ trunk/jmx/releng/build.properties.example.windows 2009-06-02 15:58:16 UTC (rev 15646)
@@ -15,14 +15,21 @@
build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
# Re-use local sources?
-#localSourceCheckoutDir=/Users/max/workspace-jmxbuild
-#relengBuilderDir=/Users/max/workspace-jmxbuild/org.jboss.tools.jmx.releng
-#relengBaseBuilderDir=/Users/max/workspace-jmxbuild/org.eclipse.releng.basebuilder
-#relengCommonBuilderDir=/Users/max/workspace-jmxbuild/org.eclipse.dash.common.releng
+#localSourceCheckoutDir=C:/Users/max/workspace-jmxbuild
-JAVA_HOME=/work/products/jdk-1.5.0_u18/bin/java
-JAVA50_HOME=/work/products/jdk-1.5.0_u18/bin/java
+# For windows, must be explicit about paths using correct slashes (/); dirs with spaces should be avoided
+#relengBuilderDir=C:/Users/max/workspace-jmxbuild/org.jboss.tools.jmx.releng
+#relengBaseBuilderDir=C:/Users/max/workspace-jmxbuild/org.eclipse.releng.basebuilder
+#relengCommonBuilderDir=C:/Users/max/workspace-jmxbuild/org.eclipse.dash.common.releng
+writableBuildRoot=C:/tmp/build
+#relengBuilderDir=C:/workspace/org.jboss.tools.jmx.releng
+#relengBaseBuilderDir=C:/workspace/org.eclipse.releng.basebuilder
+#relengCommonBuilderDir=C:/workspace/org.eclipse.dash.common.releng
+
+JAVA_HOME=c:/work/products/jdk-1.5.0_u18/bin/java
+JAVA50_HOME=c:/work/products/jdk-1.5.0_u18/bin/java
+
dependencyURLs=\
http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl...
#,\
15 years, 6 months
JBoss Tools SVN: r15645 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-06-02 11:39:16 -0400 (Tue, 02 Jun 2009)
New Revision: 15645
Added:
trunk/jmx/releng/build.properties.example.linux
trunk/jmx/releng/build.properties.example.windows
Modified:
trunk/jmx/releng/build.properties
Log:
create sample build.props for linux and windows
Modified: trunk/jmx/releng/build.properties
===================================================================
--- trunk/jmx/releng/build.properties 2009-06-02 15:20:46 UTC (rev 15644)
+++ trunk/jmx/releng/build.properties 2009-06-02 15:39:16 UTC (rev 15645)
@@ -39,7 +39,11 @@
#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-jpt-S-3.1M7-20090505073946.zip,\
#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/xsd-runtime-2.5.0M7.zip
+flattenDependencies=true
+parallelCompilation=true
+generateFeatureVersionSuffix=true
individualSourceBundles=true
+
domainNamespace=*
projNamespace=org.jboss.tools.jmx
projRelengName=org.jboss.tools.jmx.releng
Added: trunk/jmx/releng/build.properties.example.linux
===================================================================
--- trunk/jmx/releng/build.properties.example.linux (rev 0)
+++ trunk/jmx/releng/build.properties.example.linux 2009-06-02 15:39:16 UTC (rev 15645)
@@ -0,0 +1,56 @@
+## BEGIN PROJECT BUILD PROPERTIES ##
+
+# this property allows ant-contrib and pde-svn-plugin to be fetched and installed automatically for you
+thirdPartyDownloadLicenseAcceptance="I accept"
+
+projectid=jbosstools.jmx
+zipPrefix=JMX
+incubation=
+buildType=N
+version=1.1.0
+
+mainFeatureToBuildID=org.jboss.tools.jmx.sdk.feature
+testFeatureToBuildID=org.jboss.tools.jmx.tests.feature
+
+build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+
+# Re-use local sources?
+localSourceCheckoutDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx
+relengBuilderDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng
+relengBaseBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder
+relengCommonBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng
+
+JAVA_HOME=/usr/lib/jvm/java
+JAVA50_HOME=/usr/lib/jvm/java
+
+dependencyURLs=\
+http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk.tar.gz
+#,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-win32.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk-x86_64.tar.gz,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-macosx-carbon.tar.gz,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/tools/gef/downloads/drops/3.5.0/S200905011522/GEF-runtime-3.5.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/birt/downloads/drops/M-R1-2.5M7-200905061338/birt-report-framework-2.5M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/birt/downloads/drops/M-R1-2.5M7-200905061338/birt-wtp-integration-sdk-2.5M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/datatools/downloads/drops/N_DTP_1.7/dtp-1.7.0M7-200905052200.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/emf-runtime-2.5.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/tptp/4.6.0/TPTP-4.6.0M7-200904260100/tptp.runtime-TPTP-4.6.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-S-3.1M7-20090505073946.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-jpt-S-3.1M7-20090505073946.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/xsd-runtime-2.5.0M7.zip
+
+flattenDependencies=true
+parallelCompilation=true
+generateFeatureVersionSuffix=true
+individualSourceBundles=true
+
+domainNamespace=*
+projNamespace=org.jboss.tools.jmx
+projRelengName=org.jboss.tools.jmx.releng
+
+# needed for Hudson, not for local?
+#projRelengRoot=svn://svn.jboss.org/repos/jbosstools/trunk/jmx
+#projRelengPath=releng
+#basebuilderBranch=R35_M6
+
+## END PROJECT BUILD PROPERTIES ##
Property changes on: trunk/jmx/releng/build.properties.example.linux
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/jmx/releng/build.properties.example.windows
===================================================================
--- trunk/jmx/releng/build.properties.example.windows (rev 0)
+++ trunk/jmx/releng/build.properties.example.windows 2009-06-02 15:39:16 UTC (rev 15645)
@@ -0,0 +1,57 @@
+## BEGIN PROJECT BUILD PROPERTIES ##
+
+# this property allows ant-contrib and pde-svn-plugin to be fetched and installed automatically for you
+thirdPartyDownloadLicenseAcceptance="I accept"
+
+projectid=jbosstools.jmx
+zipPrefix=JMX
+incubation=
+buildType=N
+version=1.1.0
+
+mainFeatureToBuildID=org.jboss.tools.jmx.sdk.feature
+testFeatureToBuildID=org.jboss.tools.jmx.tests.feature
+
+build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+
+# Re-use local sources?
+#localSourceCheckoutDir=/Users/max/workspace-jmxbuild
+#relengBuilderDir=/Users/max/workspace-jmxbuild/org.jboss.tools.jmx.releng
+#relengBaseBuilderDir=/Users/max/workspace-jmxbuild/org.eclipse.releng.basebuilder
+#relengCommonBuilderDir=/Users/max/workspace-jmxbuild/org.eclipse.dash.common.releng
+
+JAVA_HOME=/work/products/jdk-1.5.0_u18/bin/java
+JAVA50_HOME=/work/products/jdk-1.5.0_u18/bin/java
+
+dependencyURLs=\
+http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-win32.zip
+#,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk.tar.gz,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-win32.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk-x86_64.tar.gz,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-macosx-carbon.tar.gz,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/tools/gef/downloads/drops/3.5.0/S200905011522/GEF-runtime-3.5.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/birt/downloads/drops/M-R1-2.5M7-200905061338/birt-report-framework-2.5M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/birt/downloads/drops/M-R1-2.5M7-200905061338/birt-wtp-integration-sdk-2.5M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/datatools/downloads/drops/N_DTP_1.7/dtp-1.7.0M7-200905052200.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/emf-runtime-2.5.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/tptp/4.6.0/TPTP-4.6.0M7-200904260100/tptp.runtime-TPTP-4.6.0M7.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-S-3.1M7-20090505073946.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-jpt-S-3.1M7-20090505073946.zip,\
+#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/xsd-runtime-2.5.0M7.zip
+
+flattenDependencies=true
+parallelCompilation=true
+generateFeatureVersionSuffix=true
+individualSourceBundles=true
+
+domainNamespace=*
+projNamespace=org.jboss.tools.jmx
+projRelengName=org.jboss.tools.jmx.releng
+
+# needed for Hudson, not for local?
+#projRelengRoot=svn://svn.jboss.org/repos/jbosstools/trunk/jmx
+#projRelengPath=releng
+#basebuilderBranch=R35_M6
+
+## END PROJECT BUILD PROPERTIES ##
Property changes on: trunk/jmx/releng/build.properties.example.windows
___________________________________________________________________
Name: svn:executable
+ *
15 years, 6 months
JBoss Tools SVN: r15644 - trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-06-02 11:20:46 -0400 (Tue, 02 Jun 2009)
New Revision: 15644
Modified:
trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_11.png
trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_2.png
trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_3.png
Log:
https://jira.jboss.org/jira/browse/JBDS-746 MyFaces kickstart project is excluded from project templates, the screen is updated
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_11.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_2.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/images/jsf_support/jsf_support_3.png
===================================================================
(Binary files differ)
15 years, 6 months
JBoss Tools SVN: r15643 - in trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test: ca and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-06-02 09:40:51 -0400 (Tue, 02 Jun 2009)
New Revision: 15643
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
(JBIDE-4408) JUnit test SeamUiAllTests suddenly fails
The project setup is moved to the Test Suite setup from each TestCase setup.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-06-02 13:38:25 UTC (rev 15642)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-06-02 13:40:51 UTC (rev 15643)
@@ -47,7 +47,7 @@
suite.addTestSuite(SeamFormNewWizardTest.class);
suite.addTestSuite(SeamPreferencesPageTest.class);
suite.addTestSuite(SeamViewHyperlinkPartitionerTest.class);
- suite.addTestSuite(SeamELContentAssistTest.class);
+ suite.addTest(SeamELContentAssistTest.suite());
suite.addTestSuite(SeamELContentAssistJbide1676Test.class);
suite.addTestSuite(SeamELContentAssistJbide1645Test.class);
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamSettingsPreferencesPageTest.class), "org.jboss.tools.seam.ui.test", "projects/TestSeamSettingsPreferencesPage", "TestSeamSettingsPreferencesPage"));
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-06-02 13:38:25 UTC (rev 15642)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-06-02 13:40:51 UTC (rev 15643)
@@ -1,626 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.seam.ui.test.ca;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.jboss.tools.common.test.util.TestProjectProvider;
-import org.jboss.tools.jst.jsp.test.TestUtil;
-import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
-import org.jboss.tools.seam.ui.text.java.SeamELProposalProcessor;
-import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
-public class SeamELContentAssistTest extends ContentAssistantTestCase {
- TestProjectProvider provider = null;
- boolean makeCopy = false;
+/**
+ *
+ * @author Victor Rubezhny
+ *
+ */
+public class SeamELContentAssistTest {
private static final String PROJECT_NAME = "TestSeamELContentAssist";
private static final String PAGE_NAME = "/WebContent/login.xhtml";
-
+
public static Test suite() {
- return new TestSuite(SeamELContentAssistTest.class);
+ TestSuite suite = new TestSuite();
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamELContentAssistTestCase.class),
+ "org.jboss.tools.seam.ui.test", "projects/" + PROJECT_NAME, PROJECT_NAME) {
+ public void setUp() throws Exception {
+ super.setUp();
+ IProject project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember(PROJECT_NAME);
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ JobUtils.waitForIdle();
+ //To ensure that the project is built.
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ }
+ } );
+ return suite;
}
- public void setUp() throws CoreException {
- provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null, PROJECT_NAME, makeCopy);
- project = provider.getProject();
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- JobUtils.waitForIdle();
- //To ensure that the project is built.
- project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
- }
-
- protected void tearDown() throws Exception {
- if(provider != null) {
- provider.dispose();
- }
- }
-
- /**
- * Test for https://jira.jboss.org/jira/browse/JBIDE-3213
- */
- public void testFrameworkComponents() {
- assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
- checkProposals("/WebContent/frameworkComponents.xhtml", 698, new String[]{"fullPostList.resultList", "fullPostList.next"}, false);
- }
-
- /**
- * Test for http://jira.jboss.com/jira/browse/JBIDE-1258
- */
- public void testMessages() {
- assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
- checkProposals("/WebContent/messages.xhtml", 494, new String[]{"messages.Text1", "messages.Text2"}, true);
- }
-
- /**
- * Test for http://jira.jboss.com/jira/browse/JBIDE-1803
- * http://jira.jboss.com/jira/browse/JBIDE-2007
- */
- public void testVarAttributes() {
- assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
-
- IFile component = project.getFile("src/action/demo/TestComponentForVarAttributes.java");
- IFile newComponent = project.getFile("src/action/demo/TestComponentForVarAttributes.1");
- IFile emptyComponent = project.getFile("src/action/demo/TestComponentForVarAttributes.2");
- try{
- component.setContents(newComponent.getContents(), true, false, new NullProgressMonitor());
- }catch(Exception e){
- JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.1'", e);
- }
- JobUtils.waitForIdle();
-
- checkProposals("/WebContent/varAttributes.xhtml", 458, new String[]{"test.name"}, false);
- checkProposals("/WebContent/varAttributes.xhtml", 640, new String[]{"item.name"}, false);
-
- try{
- component.setContents(emptyComponent.getContents(), true, false, new NullProgressMonitor());
- }catch(Exception e){
- JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.2'", e);
- }
- JobUtils.waitForIdle();
- }
-
- private static final String[] VALID_SEAM_EL_PROPOSALS = new String[] {
- "TestSeamELContentAssistEntityManagerFactory",
- "fullPostList",
- "actor",
- "applicationContext",
- "authenticator",
- "businessProcessContext",
- "businessProcess",
- "captcha",
- "conversationContext",
- "conversationList",
- "conversationStack",
- "conversation",
- "currentDatetime",
- "currentDate",
- "currentTime",
- "entityManager",
- "eventContext",
- "events",
- "expressions",
- "facesContext",
- "facesMessages",
- "httpError",
- "identity",
- "identity:addRole",
- "identity:addRole(arg0)",
- "identity:authenticate",
- "identity:authenticate()",
- "identity:authenticate(loginContext)",
- "identity:authenticateMethod",
- "identity:checkEntityPermission",
- "identity:checkEntityPermission(arg0, arg1)",
- "identity:checkPermission",
- "identity:checkPermission(name, action, arg)",
- "identity:checkRestriction",
- "identity:checkRestriction(expr)",
- "identity:checkRole",
- "identity:checkRole(role)",
- "identity:clearDirty",
- "identity:clearDirty()",
- "identity:cookieEnabled",
- "identity:cookieMaxAge",
- "identity:create",
- "identity:create()",
- "identity:hasPermission",
- "identity:hasPermission(name, action, arg)",
- "identity:hasRole",
- "identity:hasRole(arg0)",
- "identity:jaasConfigName",
- "identity:loggedIn",
- "identity:login",
- "identity:login()",
- "identity:logout",
- "identity:logout()",
- "identity:password",
- "identity:principal",
- "identity:rememberMe",
- "identity:removeRole",
- "identity:removeRole(arg0)",
- "identity:subject",
- "identity:username",
- "image",
- "interpolator",
- "isUserInRole",
- "jbpmContext",
- "localeSelector",
- "locale",
- "mailSession",
- "messages",
- "methodContext",
- "mockSecureEntity",
- "org.jboss.seam.captcha.captchaImage",
- "org.jboss.seam.captcha.captcha",
- "org.jboss.seam.core.actor",
- "org.jboss.seam.core.applicationContext",
- "org.jboss.seam.core.businessProcessContext",
- "org.jboss.seam.core.businessProcess",
- "org.jboss.seam.core.conversationContext",
- "org.jboss.seam.core.conversationEntries",
- "org.jboss.seam.core.conversationList",
- "org.jboss.seam.core.conversationStack",
- "org.jboss.seam.core.conversation",
- "org.jboss.seam.core.dispatcher",
- "org.jboss.seam.core.ejb",
- "org.jboss.seam.core.eventContext",
- "org.jboss.seam.core.events",
- "org.jboss.seam.core.exceptions",
- "org.jboss.seam.core.expressions",
- "org.jboss.seam.core.facesContext",
- "org.jboss.seam.core.facesMessages",
- "org.jboss.seam.core.facesPage",
- "org.jboss.seam.core.httpError",
- "org.jboss.seam.core.image",
- "org.jboss.seam.core.init",
- "org.jboss.seam.core.interpolator",
- "org.jboss.seam.core.isUserInRole",
- "org.jboss.seam.core.jbpmContext",
- "org.jboss.seam.core.jbpm",
- "org.jboss.seam.core.localeSelector",
- "org.jboss.seam.core.locale",
- "org.jboss.seam.core.manager",
- "org.jboss.seam.core.messages",
- "org.jboss.seam.core.methodContext",
- "org.jboss.seam.core.microcontainer",
- "org.jboss.seam.core.pageContext",
- "org.jboss.seam.core.pageflow",
- "org.jboss.seam.core.pages",
- "org.jboss.seam.core.persistenceContexts",
- "org.jboss.seam.core.pojoCache",
- "org.jboss.seam.core.pooledTaskInstanceList",
- "org.jboss.seam.core.pooledTask",
- "org.jboss.seam.core.processInstanceFinder",
- "org.jboss.seam.core.processInstanceList",
- "org.jboss.seam.core.processInstance",
- "org.jboss.seam.core.redirect",
- "org.jboss.seam.core.renderer",
- "org.jboss.seam.core.resourceBundle",
- "org.jboss.seam.core.safeActions",
- "org.jboss.seam.core.sessionContext",
- "org.jboss.seam.core.switcher",
- "org.jboss.seam.core.taskInstanceListForType",
- "org.jboss.seam.core.taskInstanceList",
- "org.jboss.seam.core.taskInstance",
- "org.jboss.seam.core.timeZoneSelector",
- "org.jboss.seam.core.timeZone",
- "org.jboss.seam.core.transactionListener",
- "org.jboss.seam.core.transition",
- "org.jboss.seam.core.uiComponent",
- "org.jboss.seam.core.userPrincipal",
- "org.jboss.seam.core.validation",
- "org.jboss.seam.core.validators",
- "org.jboss.seam.debug.contexts",
- "org.jboss.seam.debug.hotDeployFilter",
- "org.jboss.seam.debug.introspector",
- "org.jboss.seam.framework.currentDatetime",
- "org.jboss.seam.framework.currentDate",
- "org.jboss.seam.framework.currentTime",
- "org.jboss.seam.ioc.spring.contextLoader",
- "org.jboss.seam.ioc.spring.springELResolver",
- "org.jboss.seam.jms.queueConnection",
- "org.jboss.seam.jms.queueSession",
- "org.jboss.seam.jms.topicConnection",
- "org.jboss.seam.jms.topicSession",
- "org.jboss.seam.mail.mailSession",
- "org.jboss.seam.pdf.documentStore",
- "org.jboss.seam.persistence.persistenceProvider",
- "org.jboss.seam.remoting.messaging.subscriptionRegistry",
- "org.jboss.seam.remoting.remoting",
- "org.jboss.seam.security.configuration",
- "org.jboss.seam.security.identity",
- "org.jboss.seam.servlet.characterEncodingFilter",
- "org.jboss.seam.servlet.contextFilter",
- "org.jboss.seam.servlet.exceptionFilter",
- "org.jboss.seam.servlet.multipartFilter",
- "org.jboss.seam.servlet.redirectFilter",
- "org.jboss.seam.theme.themeSelector",
- "org.jboss.seam.theme.theme",
- "org.jboss.seam.ui.entityConverterStore",
- "org.jboss.seam.ui.entityConverter",
- "org.jboss.seam.ui.graphicImage.dynamicImageResource",
- "org.jboss.seam.ui.graphicImage.dynamicImageStore",
- "org.jboss.seam.ui.resource.webResource",
- "pageContext",
- "pageflow",
- "pdfKeyStore",
- "pojoCache",
- "pooledTaskInstanceList",
- "pooledTask",
- "processInstanceFinder",
- "processInstanceList",
- "processInstance",
- "queueSession",
- "redirect",
- "renderer",
- "resourceBundle",
- "securityRules",
- "sessionContext",
- "switcher",
- "taskInstanceListForType",
- "taskInstanceList",
- "taskInstance",
- "themeSelector",
- "theme",
- "timeZoneSelector",
- "timeZone",
- "topicSession",
- "transition",
- "uiComponent",
- "userPrincipal",
- "validation",
- "interfaceTest"
- };
-
-
-
-
- /**
- * Do not use this set as is because of colon used instead of dot to separate items of level 2 and more
- * @return
- */
- protected Set<String> getPageValidProposals() {
- TreeSet<String> pSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- for (int i = 0; i < VALID_SEAM_EL_PROPOSALS.length; i++) {
- pSet.add(VALID_SEAM_EL_PROPOSALS[i]);
- }
-
- return pSet;
- }
-
- private int getDotIndex (String expr) {
- if (expr == null)
- return 0;
-
- int count = 0;
- int index = 0;
- while ((index = expr.indexOf('.', index+1)) != -1) {
- count++;
- }
-
- return count;
- }
-
- private int getValidDotIndex (String expr) {
- if (expr == null)
- return 0;
-
- int count = 0;
- int index = 0;
- while ((index = expr.indexOf(':', index+1)) != -1) {
- count++;
- }
-
- return count;
- }
-
- protected Set<String> getFilteredProposals(Set<String> proposals, String filter) {
- TreeSet<String> fSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
-
- if (filter != null) {
- int dotIndex = getDotIndex(filter);
- for (String proposal : proposals) {
- if (getValidDotIndex(proposal) <= dotIndex) {
- proposal = proposal.replace(':', '.');
- if (proposal.startsWith(filter) ) {
- fSet.add(proposal);
- }
- }
- }
- }
-
- return fSet;
- }
-
- protected Set<String> renewWithPrefixAndPostfix(Set<String> proposals, String prefix, String suffix) {
- TreeSet<String> rSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
-
- for (String proposal : proposals) {
- rSet.add(prefix + proposal + suffix);
- }
-
- return rSet;
-
- }
-
- private int indexOfElBOB (String content, int startFrom) {
- int index1 = content.indexOf("${", startFrom);
- int index2 = content.indexOf("#{", startFrom);
-
- if (index1 == -1)
- return index2;
-
- if (index2 == -1)
- return index1;
-
- return (index1 < index2 ? index1 : index2);
- }
-
- protected List<IRegion> getAttributeValueRegions(ITextViewer viewer) {
- List<IRegion> regions = new ArrayList<IRegion>();
- IDocument document = viewer.getDocument();
- int startOffset = 0;
- int endOffset = document.getLength();
-
- IStructuredDocumentRegion sdRegion = null;
-
- while (startOffset < endOffset && (sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, startOffset)) != null) {
- ITextRegionList list = sdRegion.getRegions();
-
- for (int i = 0; list != null && i < list.size(); i++) {
- ITextRegion region = list.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-
- final int regionOffset = sdRegion.getStartOffset() + region.getStart();
- final int regionLength = region.getTextLength();
-
- regions.add(new Region (regionOffset,regionLength));
- }
- }
- startOffset += sdRegion.getLength();
- }
-
- return regions;
- }
-
- protected List<IRegion> getELRegionsToTest(IDocument document) {
- List<IRegion> regions = new ArrayList<IRegion>();
- String documentContent = document.get();
- if (documentContent == null)
- return regions;
-
- int fromIndex = indexOfElBOB(documentContent, 0);
-
- while (fromIndex != -1) {
- int endIndex = documentContent.indexOf("}", fromIndex);
- final int regionOffset = fromIndex;
- final int regionLength = (endIndex != -1 ? endIndex - fromIndex :
- documentContent.length() - fromIndex) + 1;
-
- regions.add(new Region (regionOffset,regionLength));
-
- fromIndex = (endIndex != -1 ? indexOfElBOB(documentContent, endIndex) : -1);
- }
-
- return regions;
- }
-
- /**
- * Test for https://jira.jboss.org/jira/browse/JBIDE-3528
- */
- public void testInterface() {
- checkProposals("/WebContent/interfaceTest.xhtml", 359, new String[]{"interfaceTest.test.text"}, false);
- }
-
- public void testSeamELContentAssist() {
- openEditor(PAGE_NAME);
-
- List<IRegion> regionsToTest = getELRegionsToTest(document);
- if (regionsToTest != null) {
- for (IRegion region : regionsToTest) {
- try {
-// System.out.println("Seam EL Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
-// document.get(region.getOffset(), region.getLength()) + "]");
-
- int startOffset = region.getOffset() + 2;
- for (int i = 2; i < region.getLength(); i++) {
- int offset = region.getOffset() + i;
-
- String filter = document.get(startOffset, offset - startOffset);
- Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), filter);
-
- ICompletionProposal[] result= null;
- String errorMessage = null;
-
- IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
- if (p != null) {
- try {
- result= p.computeCompletionProposals(viewer, offset);
- } catch (Throwable x) {
- x.printStackTrace();
- }
- errorMessage= p.getErrorMessage();
- }
-
-// if (errorMessage != null && errorMessage.trim().length() > 0) {
-// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
-// }
-
- // compare SeamELCompletionProposals in the result to the filtered valid proposals
- Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
-
- if (result != null && result.length > 0) {
- for (int j = 0; j < result.length; j++) {
-// System.out.println("Result#" + i + "-" + j + " ==> " + result[j].getClass().getName());
- // Look only for SeamELProposalProcessor proposals
- if (result[j] instanceof SeamELProposalProcessor.Proposal) {
- SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
- String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
- if (filteredValidProposals.contains(proposalString)) {
- existingProposals.add(proposalString);
- filteredValidProposals.remove(proposalString);
- } else {
- nonExistingProposals.add(proposalString);
- }
- }
- }
- }
- assertTrue("Some Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
- assertTrue("Some Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
- }
-
-
- } catch (BadLocationException e) {
- assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
- }
- }
- }
- regionsToTest = getAttributeValueRegions(viewer);
- if (regionsToTest != null) {
- for (IRegion region : regionsToTest) {
- try {
-// System.out.println("Attribute Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
-// document.get(region.getOffset(), region.getLength()) + "]");
-
- String attributeText = document.get(region.getOffset(), region.getLength());
- int openQuoteIndex = attributeText.indexOf('"');
- if (openQuoteIndex == -1)
- openQuoteIndex = attributeText.indexOf('\'');
- else {
- int openQuoteIndex2 = attributeText.indexOf('\'');
- if (openQuoteIndex2 != -1) {
- openQuoteIndex = (openQuoteIndex < openQuoteIndex2 ? openQuoteIndex : openQuoteIndex2);
- }
- }
-
- int closeQuoteIndex = (openQuoteIndex == -1 ? -1 : attributeText.lastIndexOf(attributeText.charAt(openQuoteIndex)));
-
- int startOffset = region.getOffset();
- for (int i = 0; i < region.getLength(); i++) {
- int offset = startOffset + i;
- if ((openQuoteIndex != -1 && i <= openQuoteIndex) ||
- (closeQuoteIndex != -1 && i >= closeQuoteIndex)) {
- // - Before and at opening quotation mark (single or double quote)
- // - or at and after closing quotation mark (single or double quote)
- // There is no prompting acceptable
- } else {
- String filter = document.get(startOffset + openQuoteIndex + 1, offset - startOffset - openQuoteIndex - 1);
-
- String clearedFilter = filter;
- if (filter.startsWith("#{")) {
- clearedFilter = filter.substring(2);
- } else {
- clearedFilter = null;
- }
-
- Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), clearedFilter);
-
- ICompletionProposal[] result= null;
- String errorMessage = null;
-
- IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
- if (p != null) {
- try {
- result= p.computeCompletionProposals(viewer, offset);
- } catch (Throwable x) {
- x.printStackTrace();
- }
- errorMessage= p.getErrorMessage();
- }
-
-// if (errorMessage != null && errorMessage.trim().length() > 0) {
-// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
-// }
-
- // compare SeamELCompletionProposals in the result to the filtered valid proposals
- Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
-
- if (result != null && result.length > 0) {
- for (int j = 0; j < result.length; j++) {
-// System.out.println("Result#" + i + "/" + j + " ==> " + result[j].getClass().getName());
- // Look only for SeamELProposalProcessor proposals
- if (result[j] instanceof SeamELProposalProcessor.Proposal) {
- SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
- String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
-
- if (filteredValidProposals.contains(proposalString)) {
- existingProposals.add(proposalString);
- filteredValidProposals.remove(proposalString);
- } else {
- nonExistingProposals.add(proposalString);
- }
- }
- }
- }
- assertTrue("Some in-attribute Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
- assertTrue("Some in-attribute Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
- }
- }
- } catch (BadLocationException e) {
- e.printStackTrace();
- assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
- }
- }
- }
-
- closeEditor();
-
- }
-
- private static final String PAGE_HOME_NAME = "/WebContent/home.xhtml";
-
- public void testContentAssistForInvocationOnString() {
- openEditor(PAGE_HOME_NAME);
-
- List<IRegion> regionsToTest = getELRegionsToTest(document);
- if (regionsToTest != null) {
- for (IRegion region : regionsToTest) {
- int startOffset = region.getOffset() + 2;
- int offset = startOffset + 10;
-
- ICompletionProposal[] result= null;
- String errorMessage = null;
-
- IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
- if (p != null) {
- try {
- result= p.computeCompletionProposals(viewer, offset);
- } catch (Throwable x) {
- x.printStackTrace();
- }
- errorMessage= p.getErrorMessage();
- }
- assertNotNull("Proposals were not created.", result);
- assertEquals("Incorrect number of proposals for #{'aa'.subst|ring(1)}", 3, result.length);
- }
-
- }
- closeEditor();
- }
-
}
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2009-06-02 13:40:51 UTC (rev 15643)
@@ -0,0 +1,639 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.seam.ui.test.ca;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.seam.ui.text.java.SeamELProposalProcessor;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+/**
+ *
+ * @author Jeremy
+ *
+ */
+public class SeamELContentAssistTestCase extends ContentAssistantTestCase {
+ private static final String PROJECT_NAME = "TestSeamELContentAssist";
+ private static final String PAGE_NAME = "/WebContent/login.xhtml";
+ private static final String[] VALID_SEAM_EL_PROPOSALS = new String[] {
+ "TestSeamELContentAssistEntityManagerFactory",
+ "fullPostList",
+ "actor",
+ "applicationContext",
+ "authenticator",
+ "businessProcessContext",
+ "businessProcess",
+ "captcha",
+ "conversationContext",
+ "conversationList",
+ "conversationStack",
+ "conversation",
+ "currentDatetime",
+ "currentDate",
+ "currentTime",
+ "entityManager",
+ "eventContext",
+ "events",
+ "expressions",
+ "facesContext",
+ "facesMessages",
+ "httpError",
+ "identity",
+ "identity:addRole",
+ "identity:addRole(arg0)",
+ "identity:authenticate",
+ "identity:authenticate()",
+ "identity:authenticate(loginContext)",
+ "identity:authenticateMethod",
+ "identity:checkEntityPermission",
+ "identity:checkEntityPermission(arg0, arg1)",
+ "identity:checkPermission",
+ "identity:checkPermission(name, action, arg)",
+ "identity:checkRestriction",
+ "identity:checkRestriction(expr)",
+ "identity:checkRole",
+ "identity:checkRole(role)",
+ "identity:clearDirty",
+ "identity:clearDirty()",
+ "identity:cookieEnabled",
+ "identity:cookieMaxAge",
+ "identity:create",
+ "identity:create()",
+ "identity:hasPermission",
+ "identity:hasPermission(name, action, arg)",
+ "identity:hasRole",
+ "identity:hasRole(arg0)",
+ "identity:jaasConfigName",
+ "identity:loggedIn",
+ "identity:login",
+ "identity:login()",
+ "identity:logout",
+ "identity:logout()",
+ "identity:password",
+ "identity:principal",
+ "identity:rememberMe",
+ "identity:removeRole",
+ "identity:removeRole(arg0)",
+ "identity:subject",
+ "identity:username",
+ "image",
+ "interpolator",
+ "isUserInRole",
+ "jbpmContext",
+ "localeSelector",
+ "locale",
+ "mailSession",
+ "messages",
+ "methodContext",
+ "mockSecureEntity",
+ "org.jboss.seam.captcha.captchaImage",
+ "org.jboss.seam.captcha.captcha",
+ "org.jboss.seam.core.actor",
+ "org.jboss.seam.core.applicationContext",
+ "org.jboss.seam.core.businessProcessContext",
+ "org.jboss.seam.core.businessProcess",
+ "org.jboss.seam.core.conversationContext",
+ "org.jboss.seam.core.conversationEntries",
+ "org.jboss.seam.core.conversationList",
+ "org.jboss.seam.core.conversationStack",
+ "org.jboss.seam.core.conversation",
+ "org.jboss.seam.core.dispatcher",
+ "org.jboss.seam.core.ejb",
+ "org.jboss.seam.core.eventContext",
+ "org.jboss.seam.core.events",
+ "org.jboss.seam.core.exceptions",
+ "org.jboss.seam.core.expressions",
+ "org.jboss.seam.core.facesContext",
+ "org.jboss.seam.core.facesMessages",
+ "org.jboss.seam.core.facesPage",
+ "org.jboss.seam.core.httpError",
+ "org.jboss.seam.core.image",
+ "org.jboss.seam.core.init",
+ "org.jboss.seam.core.interpolator",
+ "org.jboss.seam.core.isUserInRole",
+ "org.jboss.seam.core.jbpmContext",
+ "org.jboss.seam.core.jbpm",
+ "org.jboss.seam.core.localeSelector",
+ "org.jboss.seam.core.locale",
+ "org.jboss.seam.core.manager",
+ "org.jboss.seam.core.messages",
+ "org.jboss.seam.core.methodContext",
+ "org.jboss.seam.core.microcontainer",
+ "org.jboss.seam.core.pageContext",
+ "org.jboss.seam.core.pageflow",
+ "org.jboss.seam.core.pages",
+ "org.jboss.seam.core.persistenceContexts",
+ "org.jboss.seam.core.pojoCache",
+ "org.jboss.seam.core.pooledTaskInstanceList",
+ "org.jboss.seam.core.pooledTask",
+ "org.jboss.seam.core.processInstanceFinder",
+ "org.jboss.seam.core.processInstanceList",
+ "org.jboss.seam.core.processInstance",
+ "org.jboss.seam.core.redirect",
+ "org.jboss.seam.core.renderer",
+ "org.jboss.seam.core.resourceBundle",
+ "org.jboss.seam.core.safeActions",
+ "org.jboss.seam.core.sessionContext",
+ "org.jboss.seam.core.switcher",
+ "org.jboss.seam.core.taskInstanceListForType",
+ "org.jboss.seam.core.taskInstanceList",
+ "org.jboss.seam.core.taskInstance",
+ "org.jboss.seam.core.timeZoneSelector",
+ "org.jboss.seam.core.timeZone",
+ "org.jboss.seam.core.transactionListener",
+ "org.jboss.seam.core.transition",
+ "org.jboss.seam.core.uiComponent",
+ "org.jboss.seam.core.userPrincipal",
+ "org.jboss.seam.core.validation",
+ "org.jboss.seam.core.validators",
+ "org.jboss.seam.debug.contexts",
+ "org.jboss.seam.debug.hotDeployFilter",
+ "org.jboss.seam.debug.introspector",
+ "org.jboss.seam.framework.currentDatetime",
+ "org.jboss.seam.framework.currentDate",
+ "org.jboss.seam.framework.currentTime",
+ "org.jboss.seam.ioc.spring.contextLoader",
+ "org.jboss.seam.ioc.spring.springELResolver",
+ "org.jboss.seam.jms.queueConnection",
+ "org.jboss.seam.jms.queueSession",
+ "org.jboss.seam.jms.topicConnection",
+ "org.jboss.seam.jms.topicSession",
+ "org.jboss.seam.mail.mailSession",
+ "org.jboss.seam.pdf.documentStore",
+ "org.jboss.seam.persistence.persistenceProvider",
+ "org.jboss.seam.remoting.messaging.subscriptionRegistry",
+ "org.jboss.seam.remoting.remoting",
+ "org.jboss.seam.security.configuration",
+ "org.jboss.seam.security.identity",
+ "org.jboss.seam.servlet.characterEncodingFilter",
+ "org.jboss.seam.servlet.contextFilter",
+ "org.jboss.seam.servlet.exceptionFilter",
+ "org.jboss.seam.servlet.multipartFilter",
+ "org.jboss.seam.servlet.redirectFilter",
+ "org.jboss.seam.theme.themeSelector",
+ "org.jboss.seam.theme.theme",
+ "org.jboss.seam.ui.entityConverterStore",
+ "org.jboss.seam.ui.entityConverter",
+ "org.jboss.seam.ui.graphicImage.dynamicImageResource",
+ "org.jboss.seam.ui.graphicImage.dynamicImageStore",
+ "org.jboss.seam.ui.resource.webResource",
+ "pageContext",
+ "pageflow",
+ "pdfKeyStore",
+ "pojoCache",
+ "pooledTaskInstanceList",
+ "pooledTask",
+ "processInstanceFinder",
+ "processInstanceList",
+ "processInstance",
+ "queueSession",
+ "redirect",
+ "renderer",
+ "resourceBundle",
+ "securityRules",
+ "sessionContext",
+ "switcher",
+ "taskInstanceListForType",
+ "taskInstanceList",
+ "taskInstance",
+ "themeSelector",
+ "theme",
+ "timeZoneSelector",
+ "timeZone",
+ "topicSession",
+ "transition",
+ "uiComponent",
+ "userPrincipal",
+ "validation",
+ "interfaceTest"
+ };
+
+
+ protected void setUp() throws Exception {
+ JobUtils.waitForIdle();
+ if (project == null) {
+ IResource projectResource = ResourcesPlugin.getWorkspace().getRoot().findMember(PROJECT_NAME);
+ IProject prj = null;
+ if(projectResource == null) {
+ ProjectImportTestSetup setup = new ProjectImportTestSetup(
+ this,
+ "org.jboss.tools.seam.ui.test",
+ "projects/"+PROJECT_NAME,
+ PROJECT_NAME);
+ projectResource = setup.importProject();
+ }
+ if (projectResource == null)
+ return;
+ prj = projectResource.getProject();
+
+
+ this.project = prj;
+ }
+ JobUtils.waitForIdle();
+ }
+
+ /**
+ * Test for https://jira.jboss.org/jira/browse/JBIDE-3213
+ */
+ public void testFrameworkComponents() {
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+ checkProposals("/WebContent/frameworkComponents.xhtml", 698, new String[]{"fullPostList.resultList", "fullPostList.next"}, false);
+ }
+
+ /**
+ * Test for http://jira.jboss.com/jira/browse/JBIDE-1258
+ */
+ public void testMessages() {
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+ checkProposals("/WebContent/messages.xhtml", 494, new String[]{"messages.Text1", "messages.Text2"}, true);
+ }
+
+ /**
+ * Test for http://jira.jboss.com/jira/browse/JBIDE-1803
+ * http://jira.jboss.com/jira/browse/JBIDE-2007
+ */
+ public void testVarAttributes() {
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+
+ IFile component = project.getFile("src/action/demo/TestComponentForVarAttributes.java");
+ IFile newComponent = project.getFile("src/action/demo/TestComponentForVarAttributes.1");
+ IFile emptyComponent = project.getFile("src/action/demo/TestComponentForVarAttributes.2");
+ try{
+ component.setContents(newComponent.getContents(), true, false, new NullProgressMonitor());
+ }catch(Exception e){
+ JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.1'", e);
+ }
+ JobUtils.waitForIdle();
+
+ checkProposals("/WebContent/varAttributes.xhtml", 458, new String[]{"test.name"}, false);
+ checkProposals("/WebContent/varAttributes.xhtml", 640, new String[]{"item.name"}, false);
+
+ try{
+ component.setContents(emptyComponent.getContents(), true, false, new NullProgressMonitor());
+ }catch(Exception e){
+ JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.2'", e);
+ }
+ JobUtils.waitForIdle();
+ }
+
+
+
+
+
+ /**
+ * Do not use this set as is because of colon used instead of dot to separate items of level 2 and more
+ * @return
+ */
+ protected Set<String> getPageValidProposals() {
+ TreeSet<String> pSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (int i = 0; i < VALID_SEAM_EL_PROPOSALS.length; i++) {
+ pSet.add(VALID_SEAM_EL_PROPOSALS[i]);
+ }
+
+ return pSet;
+ }
+
+ private int getDotIndex (String expr) {
+ if (expr == null)
+ return 0;
+
+ int count = 0;
+ int index = 0;
+ while ((index = expr.indexOf('.', index+1)) != -1) {
+ count++;
+ }
+
+ return count;
+ }
+
+ private int getValidDotIndex (String expr) {
+ if (expr == null)
+ return 0;
+
+ int count = 0;
+ int index = 0;
+ while ((index = expr.indexOf(':', index+1)) != -1) {
+ count++;
+ }
+
+ return count;
+ }
+
+ protected Set<String> getFilteredProposals(Set<String> proposals, String filter) {
+ TreeSet<String> fSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ if (filter != null) {
+ int dotIndex = getDotIndex(filter);
+ for (String proposal : proposals) {
+ if (getValidDotIndex(proposal) <= dotIndex) {
+ proposal = proposal.replace(':', '.');
+ if (proposal.startsWith(filter) ) {
+ fSet.add(proposal);
+ }
+ }
+ }
+ }
+
+ return fSet;
+ }
+
+ protected Set<String> renewWithPrefixAndPostfix(Set<String> proposals, String prefix, String suffix) {
+ TreeSet<String> rSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ for (String proposal : proposals) {
+ rSet.add(prefix + proposal + suffix);
+ }
+
+ return rSet;
+
+ }
+
+ private int indexOfElBOB (String content, int startFrom) {
+ int index1 = content.indexOf("${", startFrom);
+ int index2 = content.indexOf("#{", startFrom);
+
+ if (index1 == -1)
+ return index2;
+
+ if (index2 == -1)
+ return index1;
+
+ return (index1 < index2 ? index1 : index2);
+ }
+
+ protected List<IRegion> getAttributeValueRegions(ITextViewer viewer) {
+ List<IRegion> regions = new ArrayList<IRegion>();
+ IDocument document = viewer.getDocument();
+ int startOffset = 0;
+ int endOffset = document.getLength();
+
+ IStructuredDocumentRegion sdRegion = null;
+
+ while (startOffset < endOffset && (sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, startOffset)) != null) {
+ ITextRegionList list = sdRegion.getRegions();
+
+ for (int i = 0; list != null && i < list.size(); i++) {
+ ITextRegion region = list.get(i);
+ if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
+
+ final int regionOffset = sdRegion.getStartOffset() + region.getStart();
+ final int regionLength = region.getTextLength();
+
+ regions.add(new Region (regionOffset,regionLength));
+ }
+ }
+ startOffset += sdRegion.getLength();
+ }
+
+ return regions;
+ }
+
+ protected List<IRegion> getELRegionsToTest(IDocument document) {
+ List<IRegion> regions = new ArrayList<IRegion>();
+ String documentContent = document.get();
+ if (documentContent == null)
+ return regions;
+
+ int fromIndex = indexOfElBOB(documentContent, 0);
+
+ while (fromIndex != -1) {
+ int endIndex = documentContent.indexOf("}", fromIndex);
+ final int regionOffset = fromIndex;
+ final int regionLength = (endIndex != -1 ? endIndex - fromIndex :
+ documentContent.length() - fromIndex) + 1;
+
+ regions.add(new Region (regionOffset,regionLength));
+
+ fromIndex = (endIndex != -1 ? indexOfElBOB(documentContent, endIndex) : -1);
+ }
+
+ return regions;
+ }
+
+ /**
+ * Test for https://jira.jboss.org/jira/browse/JBIDE-3528
+ */
+ public void testInterface() {
+ checkProposals("/WebContent/interfaceTest.xhtml", 359, new String[]{"interfaceTest.test.text"}, false);
+ }
+
+ public void testSeamELContentAssist() {
+ openEditor(PAGE_NAME);
+
+ List<IRegion> regionsToTest = getELRegionsToTest(document);
+ if (regionsToTest != null) {
+ for (IRegion region : regionsToTest) {
+ try {
+// System.out.println("Seam EL Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
+// document.get(region.getOffset(), region.getLength()) + "]");
+
+ int startOffset = region.getOffset() + 2;
+ for (int i = 2; i < region.getLength(); i++) {
+ int offset = region.getOffset() + i;
+
+ String filter = document.get(startOffset, offset - startOffset);
+ Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), filter);
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offset);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+
+// if (errorMessage != null && errorMessage.trim().length() > 0) {
+// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
+// }
+
+ // compare SeamELCompletionProposals in the result to the filtered valid proposals
+ Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ if (result != null && result.length > 0) {
+ for (int j = 0; j < result.length; j++) {
+// System.out.println("Result#" + i + "-" + j + " ==> " + result[j].getClass().getName());
+ // Look only for SeamELProposalProcessor proposals
+ if (result[j] instanceof SeamELProposalProcessor.Proposal) {
+ SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
+ String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
+ }
+ }
+ }
+ assertTrue("Some Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
+ assertTrue("Some Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
+ }
+
+
+ } catch (BadLocationException e) {
+ assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
+ }
+ }
+ }
+ regionsToTest = getAttributeValueRegions(viewer);
+ if (regionsToTest != null) {
+ for (IRegion region : regionsToTest) {
+ try {
+// System.out.println("Attribute Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
+// document.get(region.getOffset(), region.getLength()) + "]");
+
+ String attributeText = document.get(region.getOffset(), region.getLength());
+ int openQuoteIndex = attributeText.indexOf('"');
+ if (openQuoteIndex == -1)
+ openQuoteIndex = attributeText.indexOf('\'');
+ else {
+ int openQuoteIndex2 = attributeText.indexOf('\'');
+ if (openQuoteIndex2 != -1) {
+ openQuoteIndex = (openQuoteIndex < openQuoteIndex2 ? openQuoteIndex : openQuoteIndex2);
+ }
+ }
+
+ int closeQuoteIndex = (openQuoteIndex == -1 ? -1 : attributeText.lastIndexOf(attributeText.charAt(openQuoteIndex)));
+
+ int startOffset = region.getOffset();
+ for (int i = 0; i < region.getLength(); i++) {
+ int offset = startOffset + i;
+ if ((openQuoteIndex != -1 && i <= openQuoteIndex) ||
+ (closeQuoteIndex != -1 && i >= closeQuoteIndex)) {
+ // - Before and at opening quotation mark (single or double quote)
+ // - or at and after closing quotation mark (single or double quote)
+ // There is no prompting acceptable
+ } else {
+ String filter = document.get(startOffset + openQuoteIndex + 1, offset - startOffset - openQuoteIndex - 1);
+
+ String clearedFilter = filter;
+ if (filter.startsWith("#{")) {
+ clearedFilter = filter.substring(2);
+ } else {
+ clearedFilter = null;
+ }
+
+ Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), clearedFilter);
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offset);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+
+// if (errorMessage != null && errorMessage.trim().length() > 0) {
+// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
+// }
+
+ // compare SeamELCompletionProposals in the result to the filtered valid proposals
+ Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ if (result != null && result.length > 0) {
+ for (int j = 0; j < result.length; j++) {
+// System.out.println("Result#" + i + "/" + j + " ==> " + result[j].getClass().getName());
+ // Look only for SeamELProposalProcessor proposals
+ if (result[j] instanceof SeamELProposalProcessor.Proposal) {
+ SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
+ String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
+
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
+ }
+ }
+ }
+ assertTrue("Some in-attribute Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
+ assertTrue("Some in-attribute Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
+ }
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
+ }
+ }
+ }
+
+ closeEditor();
+
+ }
+
+ private static final String PAGE_HOME_NAME = "/WebContent/home.xhtml";
+
+ public void testContentAssistForInvocationOnString() {
+ openEditor(PAGE_HOME_NAME);
+
+ List<IRegion> regionsToTest = getELRegionsToTest(document);
+ if (regionsToTest != null) {
+ for (IRegion region : regionsToTest) {
+ int startOffset = region.getOffset() + 2;
+ int offset = startOffset + 10;
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ IContentAssistProcessor p= TestUtil.getProcessor(viewer, offset, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offset);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+ assertNotNull("Proposals were not created.", result);
+ assertEquals("Incorrect number of proposals for #{'aa'.subst|ring(1)}", 3, result.length);
+ }
+
+ }
+ closeEditor();
+ }
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r15642 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-06-02 09:38:25 -0400 (Tue, 02 Jun 2009)
New Revision: 15642
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4381, styles and css classes were added to junit test for rich:page, template code was corrected.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2009-06-02 12:59:25 UTC (rev 15641)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2009-06-02 13:38:25 UTC (rev 15642)
@@ -171,8 +171,8 @@
if(sidebarFacet != null) {
pageSidebarDiv = visualDocument.createElement(HTML.TAG_DIV);
String sidebarClass = CSS_PAGE_SIDEBAR;
- if (ComponentUtil.isNotBlank(attrs.getSiderbarClass())) {
- sidebarClass += Constants.WHITE_SPACE + attrs.getSiderbarClass();
+ if (ComponentUtil.isNotBlank(attrs.getSidebarClass())) {
+ sidebarClass += Constants.WHITE_SPACE + attrs.getSidebarClass();
}
pageSidebarDiv.setAttribute(HTML.ATTR_CLASS, sidebarClass);
pageContentDiv.appendChild(pageSidebarDiv);
@@ -302,7 +302,7 @@
private final String MARKUP_TYPE = "markupType"; //$NON-NLS-1$
private final String NAMESPACE = "namespace"; //$NON-NLS-1$
private final String PAGE_TITLE = "pageTitle"; //$NON-NLS-1$
- private final String SIDERBAR_CLASS = "siderbarClass"; //$NON-NLS-1$
+ private final String SIDEBAR_CLASS = "sidebarClass"; //$NON-NLS-1$
private final String SIDEBAR_POSITION = "sidebarPosition"; //$NON-NLS-1$
private final String SIDEBAR_WIDTH = "sidebarWidth"; //$NON-NLS-1$
private final String THEME = "theme"; //$NON-NLS-1$
@@ -317,7 +317,7 @@
private String markupType;
private String namespace;
private String pageTitle;
- private String siderbarClass;
+ private String sidebarClass;
private String sidebarPosition;
private String sidebarWidth;
private String style;
@@ -336,7 +336,7 @@
markupType = sourceElement.getAttribute(MARKUP_TYPE);
namespace = sourceElement.getAttribute(NAMESPACE);
pageTitle = sourceElement.getAttribute(PAGE_TITLE);
- siderbarClass = sourceElement.getAttribute(SIDERBAR_CLASS);
+ sidebarClass = sourceElement.getAttribute(SIDEBAR_CLASS);
sidebarPosition = sourceElement.getAttribute(SIDEBAR_POSITION);
sidebarWidth = sourceElement.getAttribute(SIDEBAR_WIDTH);
style = sourceElement.getAttribute(HTML.ATTR_STYLE);
@@ -390,8 +390,8 @@
return pageTitle;
}
- public String getSiderbarClass() {
- return siderbarClass;
+ public String getSidebarClass() {
+ return sidebarClass;
}
public String getSidebarPosition() {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml
===================================================================
(Binary files differ)
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-02 12:59:25 UTC (rev 15641)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-02 13:38:25 UTC (rev 15642)
@@ -2,7 +2,7 @@
<test id="id1">
- <DIV CLASS="rich-page someClass" STYLE="width: 800px; background-color: white;">
+ <DIV CLASS="rich-page styleClass" STYLE="width: 800px; background-color: white;">
<DIV CLASS="rich-page-header headerClass">
<DIV CLASS="rich-page-header-content">
<SPAN STYLE="font-size: 2em;">
@@ -16,7 +16,7 @@
</SPAN>
</DIV>
<DIV CLASS="rich-page-content">
- <DIV CLASS="rich-page-sidebar" STYLE="width: 15em; float: right;">
+ <DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
<SPAN STYLE="font-size: 2em;">
SIDEBAR
</SPAN>
@@ -32,7 +32,7 @@
<DIV WIDTH="100%" STYLE="width: 100%;">
<SPAN CLASS="vpe-text">
TOP PANEL
- </SPAN>
+ </SPAN>
</DIV>
<DIV WIDTH="50%" STYLE="width: 50%; float: left;">
<SPAN CLASS="vpe-text">
15 years, 6 months
JBoss Tools SVN: r15641 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-06-02 08:59:25 -0400 (Tue, 02 Jun 2009)
New Revision: 15641
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HibernateAllMappingTests.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4366 - update tests - execute project build in setUp
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java 2009-06-02 12:29:00 UTC (rev 15640)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java 2009-06-02 12:59:25 UTC (rev 15641)
@@ -49,7 +49,6 @@
KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
final ConsoleConfiguration consCFG = knownConfigurations.find(ConsoleConfigUtils.ConsoleCFGName);
assertNotNull(consCFG);
- //pack.getJavaProject().getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
consCFG.reset();
consCFG.build();
assertTrue(consCFG.hasConfiguration());
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HibernateAllMappingTests.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HibernateAllMappingTests.java 2009-06-02 12:29:00 UTC (rev 15640)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HibernateAllMappingTests.java 2009-06-02 12:59:25 UTC (rev 15641)
@@ -17,6 +17,7 @@
import junit.framework.TestResult;
import junit.framework.TestSuite;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -75,6 +76,7 @@
ConsoleConfigUtils.createConsoleConfig(ConsoleConfigUtils.ConsoleCFGName,
cfgFilePath, ConfigurableTestProject.PROJECT_NAME);
ProjectUtils.toggleHibernateOnProject(project.getIProject(), true, ConsoleConfigUtils.ConsoleCFGName);
+ project.getIProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
}
/* (non-Javadoc)
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2009-06-02 12:29:00 UTC (rev 15640)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2009-06-02 12:59:25 UTC (rev 15641)
@@ -31,9 +31,9 @@
}
private static void addPackTests(TestSuite suite) {
- /*suite.addTestSuite(OpenSourceFileTest.class);
- suite.addTestSuite(OpenMappingFileTest.class);
- suite.addTestSuite(OpenMappingDiagramTest.class);*/
suite.addTestSuite(HbmExportExceptionTest.class);
+ //suite.addTestSuite(OpenSourceFileTest.class);
+ //suite.addTestSuite(OpenMappingFileTest.class);
+ //suite.addTestSuite(OpenMappingDiagramTest.class);
}
}
15 years, 6 months
JBoss Tools SVN: r15640 - 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: mareshkau
Date: 2009-06-02 08:29:00 -0400 (Tue, 02 Jun 2009)
New Revision: 15640
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
Log:
fixing errors in junit, way how to close editor when background job running hasn't been founed, so test not works on eclipse 3.5 -> test caese removed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2009-06-02 11:57:42 UTC (rev 15639)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2009-06-02 12:29:00 UTC (rev 15640)
@@ -11,14 +11,9 @@
package org.jboss.tools.jsf.vpe.jsf.test.jbide;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.progress.UIJob;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
@@ -221,99 +216,101 @@
throw getException();
}
}
-
- public void testClosePageWhenBackgroundJobIsRun() throws Throwable {
-
- TestUtil.waitForJobs();
-
- // wait
- TestUtil.waitForJobs();
- // set exception
- setException(null);
- // Tests CA
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath("JBIDE/675/employee.xhtml", //$NON-NLS-1$
- JsfAllTests.IMPORT_PROJECT_NAME);
- assertNotNull("Could not open specified file " + "JBIDE/675/employee.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
-
- // open and get editor
- final JSPMultiPageEditor part = openEditor(input);
-
- StyledText styledText = part.getSourceEditor().getTextViewer()
- .getTextWidget();
- styledText.setCaretOffset(951);
- styledText.insert("<a"); //$NON-NLS-1$
- styledText.setCaretOffset(953);
- for(int i=0;i<50;i++) {
- styledText.insert(""+i); //$NON-NLS-1$
- }
- Job job = new UIJob("Close editor Job"){ //$NON-NLS-1$
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- part.close(false);
- part.dispose();
- return Status.OK_STATUS;
- }};
- job.setPriority(Job.SHORT);
- job.schedule(900);
- TestUtil.delay(450);
- if(getException()!=null) {
- throw getException();
- }
- }
- /**
- * test Visual Editor Refresh method
- * @throws Throwable
- */
- public void testVisualEditorRefreshAdnCloseWhenUIJobIsRunning() throws Throwable {
- TestUtil.waitForJobs();
-
- // wait
- TestUtil.waitForJobs();
- // set exception
- setException(null);
- // Tests CA
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath("JBIDE/675/employee.xhtml", //$NON-NLS-1$
- JsfAllTests.IMPORT_PROJECT_NAME);
- assertNotNull("Could not open specified file " + "JBIDE/675/employee.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
-
- // open and get editor
- final JSPMultiPageEditor part = openEditor(input);
-
- StyledText styledText = part.getSourceEditor().getTextViewer()
- .getTextWidget();
- styledText.setCaretOffset(951);
- styledText.insert("<a"); //$NON-NLS-1$
- styledText.setCaretOffset(953);
- for(int i=0;i<10;i++) {
- styledText.insert(""+i); //$NON-NLS-1$
- TestUtil.delay(30);
- }
- Job job = new UIJob("Close editor Job"){ //$NON-NLS-1$
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- part.close(false);
- return Status.OK_STATUS;
- }};
- job.setPriority(Job.SHORT);
- job.schedule(900);
- part.getVisualEditor().getController().visualRefresh();
- TestUtil.delay(450);
- if(getException()!=null) {
- throw getException();
- }
- }
+//
+// **commented by Maksim Areshkau, no way have been founeded how to close editor
+// when ui job is running on eclipse 3.5, so this test cases moved to qa smokes tests
+// public void testClosePageWhenBackgroundJobIsRun() throws Throwable {
+//
+// TestUtil.waitForJobs();
+//
+// // wait
+// TestUtil.waitForJobs();
+// // set exception
+// setException(null);
+// // Tests CA
+// // get test page path
+// IFile file = (IFile) TestUtil.getComponentPath("JBIDE/675/employee.xhtml", //$NON-NLS-1$
+// JsfAllTests.IMPORT_PROJECT_NAME);
+// assertNotNull("Could not open specified file " + "JBIDE/675/employee.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// IEditorInput input = new FileEditorInput(file);
+//
+// assertNotNull("Editor input is null", input); //$NON-NLS-1$
+//
+// // open and get editor
+// final JSPMultiPageEditor part = openEditor(input);
+//
+// StyledText styledText = part.getSourceEditor().getTextViewer()
+// .getTextWidget();
+// styledText.setCaretOffset(951);
+// styledText.insert("<a"); //$NON-NLS-1$
+// styledText.setCaretOffset(953);
+// for(int i=0;i<50;i++) {
+// styledText.insert(""+i); //$NON-NLS-1$
+// }
+// Job job = new UIJob("Close editor Job"){ //$NON-NLS-1$
+//
+// @Override
+// public IStatus runInUIThread(IProgressMonitor monitor) {
+//
+// part.close(false);
+// part.dispose();
+// return Status.OK_STATUS;
+// }};
+// job.setPriority(Job.SHORT);
+// job.schedule(900);
+// TestUtil.delay(450);
+// if(getException()!=null) {
+// throw getException();
+// }
+// }
+// /**
+// * test Visual Editor Refresh method
+// * @throws Throwable
+// */
+// public void testVisualEditorRefreshAdnCloseWhenUIJobIsRunning() throws Throwable {
+// TestUtil.waitForJobs();
+//
+// // wait
+// TestUtil.waitForJobs();
+// // set exception
+// setException(null);
+// // Tests CA
+// // get test page path
+// IFile file = (IFile) TestUtil.getComponentPath("JBIDE/675/employee.xhtml", //$NON-NLS-1$
+// JsfAllTests.IMPORT_PROJECT_NAME);
+// assertNotNull("Could not open specified file " + "JBIDE/675/employee.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// IEditorInput input = new FileEditorInput(file);
+//
+// assertNotNull("Editor input is null", input); //$NON-NLS-1$
+//
+// // open and get editor
+// final JSPMultiPageEditor part = openEditor(input);
+//
+// StyledText styledText = part.getSourceEditor().getTextViewer()
+// .getTextWidget();
+// styledText.setCaretOffset(951);
+// styledText.insert("<a"); //$NON-NLS-1$
+// styledText.setCaretOffset(953);
+// for(int i=0;i<10;i++) {
+// styledText.insert(""+i); //$NON-NLS-1$
+// TestUtil.delay(30);
+// }
+// Job job = new UIJob("Close editor Job"){ //$NON-NLS-1$
+//
+// @Override
+// public IStatus runInUIThread(IProgressMonitor monitor) {
+//
+// part.close(false);
+// return Status.OK_STATUS;
+// }};
+// job.setPriority(Job.SHORT);
+// job.schedule(900);
+// part.getVisualEditor().getController().visualRefresh();
+// TestUtil.delay(450);
+// if(getException()!=null) {
+// throw getException();
+// }
+// }
}
15 years, 6 months