JBoss Tools SVN: r33755 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: fix and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-08-10 02:56:40 -0400 (Wed, 10 Aug 2011)
New Revision: 33755
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/QuickFixTest.java
Log:
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/QuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/QuickFixTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/QuickFixTest.java 2011-08-10 06:56:40 UTC (rev 33755)
@@ -0,0 +1,37 @@
+package org.jboss.tools.cdi.bot.test.fix;
+
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/*
+ * Test operates on quick fixes of CDI components
+ *
+ * @author Jaroslav Jankovic
+ */
+
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ BeansEditorTest.class })
+public class QuickFixTest extends SWTBotExt{
+
+ private static final Logger LOGGER = Logger.getLogger(QuickFixTest.class.getName());
+
+
+ @Test
+ public void testQuickFix(){
+
+ }
+
+
+}
14 years, 8 months
JBoss Tools SVN: r33754 - in trunk: ws/tests/org.jboss.tools.ws.ui.bot.test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-08-10 02:46:57 -0400 (Wed, 10 Aug 2011)
New Revision: 33754
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
Log:
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 2011-08-10 04:37:20 UTC (rev 33753)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-08-10 06:46:57 UTC (rev 33754)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.bot.test;
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
-//import org.jboss.tools.cdi.bot.test.fix.QuickFixTest;
+import org.jboss.tools.cdi.bot.test.fix.QuickFixTest;
import org.jboss.tools.cdi.bot.test.wizard.CdiATWizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
@@ -39,9 +39,9 @@
*/
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
- //CdiATWizardTest.class,
- //BeansEditorTest.class,
-// QuickFixTest.class
+ CdiATWizardTest.class,
+ BeansEditorTest.class,
+ QuickFixTest.class
})
public class CDIAllBotTests {
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2011-08-10 04:37:20 UTC (rev 33753)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2011-08-10 06:46:57 UTC (rev 33754)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -36,5 +41,6 @@
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-10 04:37:20 UTC (rev 33753)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-10 06:46:57 UTC (rev 33754)
@@ -24,6 +24,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
@@ -110,11 +111,11 @@
JavaProjectEntity javaProject = new JavaProjectEntity();
javaProject.setProjectName(projectName);
eclipse.createJavaProject(javaProject);
-
SWTBotTree tree = projectExplorer.bot().tree();
assertTrue("Project " + projectName + " was not created properly",
SWTEclipseExt.treeContainsItemWithLabel(tree, projectName));
- SWTBotTreeItem ti = tree.expandNode(projectName);
+ SWTBotTreeItem ti = tree.expandNode(projectName);
+
new TreeItemAction(ti, "Configure","Add JAX-RS 1.1 support...").run();
bot.sleep(500);
util.waitForNonIgnoredJobs();
@@ -136,10 +137,13 @@
bot.sleep(1500);
}
+ // createSampleSOAPWS(getWsProjectName(), "HelloService", "sample", "SampleService");
+ //createSampleService(Type.SOAP, project, name, pkg, cls, null);
private void createSampleSOAPWS(String project, String name, String pkg, String cls) {
createSampleService(Type.SOAP, project, name, pkg, cls, null);
}
+ //checkSOAPService(getWsProjectName(), "HelloService", "sample", "SampleService", "You");
private void checkSOAPService(String project, String svcName, String svcPkg, String svcClass, String msgContent) {
checkService(Type.SOAP, project, svcName, svcPkg, svcClass, msgContent, null);
}
@@ -152,6 +156,10 @@
createSampleService(Type.REST, project, name, pkg, cls, appCls);
}
+
+
+ // createSampleSOAPWS(getWsProjectName(), "HelloService", "sample", "SampleService");
+ //createSampleService(Type.SOAP, project, name, pkg, cls, null);
private void createSampleService(Type type, String project, String name, String pkg, String cls, String appCls) {
SampleWSWizard w = new NewSampleWSWizardAction(type).run();
w.setProjectName(project).setServiceName(name);
14 years, 8 months
JBoss Tools SVN: r33753 - in branches/jbosstools-3.2.x/jsf/docs/userguide/en-US: images/visual_page and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-10 00:37:20 -0400 (Wed, 10 Aug 2011)
New Revision: 33753
Added:
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
Modified:
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/editors.xml
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_8.png
Log:
updated for TOOLSDOC-182
Modified: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/editors.xml 2011-08-10 04:37:10 UTC (rev 33752)
+++ branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/editors.xml 2011-08-10 04:37:20 UTC (rev 33753)
@@ -1934,10 +1934,21 @@
<section id="AdvancedSettings954">
<title>VPE Toolbar</title>
<para>
- The Visual Page Editor toolbar includes the next buttons:
+ The Visual Page Editor toolbar includes the following buttons:
</para>
<itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="vpe_externalize_string"/> (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/externalize_string_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ )
+ </para>
+ </listitem>
<listitem>
<para>
<xref linkend="vpe_preferences"/> (
@@ -2056,6 +2067,61 @@
</mediaobject>
</figure>
+ <section id="vpe_externalize_string">
+ <title>Externalize string</title>
+ <para>
+ The <guibutton>Externalize string</guibutton> button (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/externalize_string_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ) provides the ability to export a selected string.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 1</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The first page of the Visual Page Externalize string wizard asks you for the name of the <guilabel>Property key</guilabel> you wish to create and the then <guilabel>Property value</guilabel> for that key. You then have the choice to either have the wizard generate a new properties file for the string or to select a property file that already exists (if one is available).
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 2</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ On the second page of the wizard enter a new or select an existing folder where the property file of the string will be stored. Be sure to also name the property file.
+ </para>
+ <para>
+ By clicking on the <guibutton>Advanced</guibutton> button you will be shown an option to link the property file that will be created, to a file already on your computer. This step is not necessary for externalizing a string.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 3</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The final page asks you to choose a place for the string bundle to be registered. By default the option of <guilabel>manually by user</guilabel> will be selected.
+ </para>
+ </section>
+
<section id="vpe_preferences">
<title>Preferences</title>
<para>
@@ -2414,6 +2480,32 @@
</section>
</section>
+ <section id="vpe_EL_expressions">
+ <title>EL expressions</title>
+ <para>
+ The <guibutton>EL expressions</guibutton> button (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/show_bundles_mess_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ) provides quick access to the Visual Page Editor preferences.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Preferences Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_EL_expressions.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+
+ </para>
+ </section>
+
<section id="page_preview">
<title>Page Preview</title>
<para>
Added: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_8.png
===================================================================
(Binary files differ)
Added: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
14 years, 8 months
JBoss Tools SVN: r33752 - in trunk/jsf/docs/userguide/en-US: images/visual_page and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-10 00:37:10 -0400 (Wed, 10 Aug 2011)
New Revision: 33752
Added:
trunk/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
Modified:
trunk/jsf/docs/userguide/en-US/editors.xml
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_8.png
Log:
updated for TOOLSDOC-182
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2011-08-10 01:21:00 UTC (rev 33751)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2011-08-10 04:37:10 UTC (rev 33752)
@@ -1934,10 +1934,21 @@
<section id="AdvancedSettings954">
<title>VPE Toolbar</title>
<para>
- The Visual Page Editor toolbar includes the next buttons:
+ The Visual Page Editor toolbar includes the following buttons:
</para>
<itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="vpe_externalize_string"/> (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/externalize_string_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ )
+ </para>
+ </listitem>
<listitem>
<para>
<xref linkend="vpe_preferences"/> (
@@ -2056,6 +2067,61 @@
</mediaobject>
</figure>
+ <section id="vpe_externalize_string">
+ <title>Externalize string</title>
+ <para>
+ The <guibutton>Externalize string</guibutton> button (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/externalize_string_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ) provides the ability to export a selected string.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 1</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The first page of the Visual Page Externalize string wizard asks you for the name of the <guilabel>Property key</guilabel> you wish to create and the then <guilabel>Property value</guilabel> for that key. You then have the choice to either have the wizard generate a new properties file for the string or to select a property file that already exists (if one is available).
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 2</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ On the second page of the wizard enter a new or select an existing folder where the property file of the string will be stored. Be sure to also name the property file.
+ </para>
+ <para>
+ By clicking on the <guibutton>Advanced</guibutton> button you will be shown an option to link the property file that will be created, to a file already on your computer. This step is not necessary for externalizing a string.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Externalize string wizard page 3</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_export_string_wizard_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The final page asks you to choose a place for the string bundle to be registered. By default the option of <guilabel>manually by user</guilabel> will be selected.
+ </para>
+ </section>
+
<section id="vpe_preferences">
<title>Preferences</title>
<para>
@@ -2414,6 +2480,32 @@
</section>
</section>
+ <section id="vpe_EL_expressions">
+ <title>EL expressions</title>
+ <para>
+ The <guibutton>EL expressions</guibutton> button (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/show_bundles_mess_button.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ) provides quick access to the Visual Page Editor preferences.
+ </para>
+
+ <figure>
+ <title>Visual Page Editor Preferences Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_EL_expressions.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+
+ </para>
+ </section>
+
<section id="page_preview">
<title>Page Preview</title>
<para>
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/externalize_string_button.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_8.png
===================================================================
(Binary files differ)
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_export_string_wizard_3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
14 years, 8 months
JBoss Tools SVN: r33751 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:21:00 -0400 (Tue, 09 Aug 2011)
New Revision: 33751
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/IAnnotationType.java
Log:
removed unused imports
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/IAnnotationType.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/IAnnotationType.java 2011-08-10 01:11:43 UTC (rev 33750)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/IAnnotationType.java 2011-08-10 01:21:00 UTC (rev 33751)
@@ -1,9 +1,7 @@
package org.jboss.tools.common.java;
import java.util.List;
-import java.util.Set;
-import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
/**
14 years, 8 months
JBoss Tools SVN: r33750 - trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:11:43 -0400 (Tue, 09 Aug 2011)
New Revision: 33750
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/resources/
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/build.properties
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/build.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/build.properties 2011-08-10 01:11:10 UTC (rev 33749)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/build.properties 2011-08-10 01:11:43 UTC (rev 33750)
@@ -2,5 +2,4 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- resources/,\
projects/
14 years, 8 months
JBoss Tools SVN: r33749 - trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:11:10 -0400 (Tue, 09 Aug 2011)
New Revision: 33749
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java 2011-08-10 01:03:58 UTC (rev 33748)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java 2011-08-10 01:11:10 UTC (rev 33749)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.seam.core.test.international;
-
-import java.io.File;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.test.util.JobUtils;
-import org.jboss.tools.test.util.ResourcesUtils;
-import org.osgi.framework.Bundle;
-
-public class SeamInternationalTestSetup extends TestSetup {
-
- protected static String LIB_SUFFIX = "/lib";
- protected static final String SEAM_INTERNATIONAL_LIB_SUFFIX = "/seam-international.jar";
- protected static final String SEAM_INTERNATIONAL_PAGE_SUFFIX = "/seam-international.xhtml";
- protected static final String DEFAULT_RESOURCE_BUNDLE_SUFFIX = "/messages.properties";
- protected static final String DE_RESOURCE_BUNDLE_SUFFIX = "/messages_de.properties";
- protected static final String RESOURCES_SUFFIX = "/resources";
-
- public static final String PLUGIN_ID = "org.jboss.tools.cdi.seam.core.test";
-
- protected IProject project;
-
- public SeamInternationalTestSetup(Test test) {
- super(test);
- }
-
- @Override
- protected void setUp() throws Exception {
- project = TCKTest.importPreparedProject("/");
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
- // Set up seam-international.jar library into the project's WEB-INF/lib folder
- try {
- assertTrue("Cannot set up SEAM International module and resource bundles into a test project", setUpSeamInternationalLibraryAndResourceBundle());
- } catch (Exception e) {
- fail("Cannot set up SEAM International module and resource bundles into a test project: " + e.getLocalizedMessage());
- }
- }
-
- private boolean setUpSeamInternationalLibraryAndResourceBundle() throws Exception {
- Bundle b = Platform.getBundle(PLUGIN_ID);
- String projectPath = project.getLocation().toOSString();
- String resourcePath = FileLocator.resolve(b.getEntry(RESOURCES_SUFFIX)).getFile();
-
- File seamInternationalLibFrom = new File(resourcePath + SEAM_INTERNATIONAL_LIB_SUFFIX);
- File seamInternationalLibTo = new File(projectPath + TCKTest.WEB_CONTENT_SUFFIX + TCKTest.WEB_INF_SUFFIX
- + LIB_SUFFIX + SEAM_INTERNATIONAL_LIB_SUFFIX);
- if (!FileUtil.copyFile(seamInternationalLibFrom, seamInternationalLibTo))
- return false;
-
- File defaultResourceBundleFrom = new File(resourcePath + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
- File defaultResourceBundleTo = new File(projectPath + TCKTest.JAVA_SOURCE_SUFFIX + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
- if (!FileUtil.copyFile(defaultResourceBundleFrom, defaultResourceBundleTo))
- return false;
-
- File germanResourceBundleFrom = new File(resourcePath + DE_RESOURCE_BUNDLE_SUFFIX);
- File germanResourceBundleTo = new File(projectPath + TCKTest.JAVA_SOURCE_SUFFIX + DE_RESOURCE_BUNDLE_SUFFIX);
- if (!FileUtil.copyFile(germanResourceBundleFrom, germanResourceBundleTo))
- return false;
-
- File seamInternationalPageFrom = new File(resourcePath + SEAM_INTERNATIONAL_PAGE_SUFFIX);
- File seamInternationalPageTo = new File(projectPath + TCKTest.WEB_CONTENT_SUFFIX
- + SEAM_INTERNATIONAL_PAGE_SUFFIX);
- if (!FileUtil.copyFile(seamInternationalPageFrom, seamInternationalPageTo))
- return false;
-
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
- return true;
- }
-
- @Override
- protected void tearDown() throws Exception {
- boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- project.delete(true, true, null);
- JobUtils.waitForIdle();
- ResourcesUtils.setBuildAutomatically(saveAutoBuild);
- }
-}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33748 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:03:58 -0400 (Tue, 09 Aug 2011)
New Revision: 33748
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-08-10 01:03:28 UTC (rev 33747)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-08-10 01:03:58 UTC (rev 33748)
@@ -48,13 +48,13 @@
import org.osgi.framework.Bundle;
public class TCKTest extends TestCase {
- protected static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
- protected static String PROJECT_NAME = "tck";
- protected static String PROJECT_PATH = "/projects/tck";
+ protected final static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
+ public final static String PROJECT_NAME = "tck";
+ protected final static String PROJECT_PATH = "/projects/tck";
- protected static String JAVA_SOURCE_SUFFIX = "/JavaSource";
- protected static String WEB_CONTENT_SUFFIX = "/WebContent";
- protected static String WEB_INF_SUFFIX = "/WEB-INF";
+ public final static String JAVA_SOURCE_SUFFIX = "/JavaSource";
+ public final static String WEB_CONTENT_SUFFIX = "/WebContent";
+ public final static String WEB_INF_SUFFIX = "/WEB-INF";
// protected static String JAVA_SOURCE = PROJECT_PATH + JAVA_SOURCE_SUFFIX;
// protected static String WEB_CONTENT = PROJECT_PATH + WEB_CONTENT_SUFFIX;
// protected static String WEB_INF = WEB_CONTENT + WEB_INF_SUFFIX;
14 years, 8 months
JBoss Tools SVN: r33747 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest: .settings and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:03:28 -0400 (Tue, 09 Aug 2011)
New Revision: 33747
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/.jsdtscope
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.component
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/classes/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/faces-config.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/cdi-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/javax.inject.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/jboss-interceptor-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-international.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-impl.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/web.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/seam-international.xhtml
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages.properties
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages_de.properties
Log:
https://issues.jboss.org/browse/JBIDE-9394
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/.jsdtscope
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/.jsdtscope (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/.jsdtscope 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.jdt.core.prefs 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,8 @@
+#Tue Aug 09 17:45:22 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.component 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="SeamCoreTest">
+ <wb-resource deploy-path="/" source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="SeamCoreTest"/>
+ <property name="java-output-path" value="/SeamCoreTest/bin"/>
+ </wb-module>
+</project-modules>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,7 @@
+<root>
+ <facet id="jst.jsf">
+ <node name="libprov">
+ <attribute name="provider-id" value="jsf-no-op-library-provider"/>
+ </node>
+ </facet>
+</root>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="jst.jsf" version="2.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.container 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.settings/org.eclipse.wst.jsdt.ui.superType.name 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/MANIFEST.MF 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/beans.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/beans.xml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans>
+</beans>
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/faces-config.xml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+</faces-config>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/cdi-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/cdi-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/javax.inject.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/javax.inject.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/jboss-interceptor-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/jboss-interceptor-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-international.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-international.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/lib/seam-servlet-impl.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/web.xml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
+ <display-name>SeamCoreTest</display-name>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/seam-international.xhtml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/seam-international.xhtml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/WebContent/seam-international.xhtml 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,11 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:define name="body">
+ <h:outputText value="#{bundles.messages.home_header}"/>
+ </ui:define>
+</ui:composition>
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages.properties (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages.properties 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,5 @@
+home_header=About this example application
+home_body=This sample application demonstrates how easy it is to develop stateful web applications using Java EE 6 augmented with portable Seam modules. Just register, login, and book a room to see the future of Java EE in action. Throughout the application you'll see notes in the sidebar that explain how this platform helps you meet enterprise application requirements.
+home_note=Note: Please do NOT enter personal information or your credit card number in this sample application.
+
+home_header1=About this example application
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages_de.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages_de.properties (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages_de.properties 2011-08-10 01:03:28 UTC (rev 33747)
@@ -0,0 +1,5 @@
+de_home_header=�ber dieses Beispiel-Anwendung
+de_home_body=Dieses Beispiel demonstriert, wie einfach es ist, EE-Module zu entwickeln stateful Web-Applikationen mit Java 6 mit tragbaren Augmented Seam. Just register, login, and book a room to see the future of Java EE in action. Einfach registrieren, einloggen, und buchen Sie ein Zimmer zum Handeln sieht die Zukunft von Java EE in. Throughout the application you'll see notes in the sidebar that explain how this platform helps you meet enterprise application requirements. W�hrend der Anwendung, die Sie in der Seitenleiste sehen Noten, die erkl�ren, wie diese Plattform hilft Ihnen, Enterprise Application Anforderungen.
+de_home_note=HINWEIS: Bitte keine pers�nlichen Daten oder Ihre Kreditkartennummer in dieser Beispielanwendung in Kraft.
+
+home_header1=�ber dieses Beispiel-Anwendung
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/messages_de.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r33746 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test: projects/SeamCoreTest/src/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 21:01:41 -0400 (Tue, 09 Aug 2011)
New Revision: 33746
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamCoreTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/META-INF/beans.xml
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/BundleModelTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.classpath 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.classpath 2011-08-10 01:01:41 UTC (rev 33746)
@@ -2,10 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="lib" path="lib/cdi-api.jar"/>
- <classpathentry kind="lib" path="lib/javax.inject.jar"/>
- <classpathentry kind="lib" path="lib/jboss-interceptor-api.jar"/>
- <classpathentry kind="lib" path="lib/seam-servlet-impl.jar"/>
- <classpathentry kind="lib" path="lib/seam-servlet-api.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.project 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/.project 2011-08-10 01:01:41 UTC (rev 33746)
@@ -6,6 +6,16 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -27,8 +37,13 @@
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
<nature>org.jboss.tools.cdi.core.cdinature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/META-INF/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/META-INF/beans.xml 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreTest/src/META-INF/beans.xml 2011-08-10 01:01:41 UTC (rev 33746)
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<beans>
-</beans>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -31,11 +31,10 @@
TestSuite suiteAll = new TestSuite("Seam Core Tests");
- suiteAll.addTestSuite(SeamResourceBundlesTest.class);
- suiteAll.addTestSuite(BundleModelTest.class);
-
TestSuite suite = new TestSuite("Seam Core Project Tests");
suite.addTestSuite(SeamServletValidationTest.class);
+ suite.addTestSuite(SeamResourceBundlesTest.class);
+ suite.addTestSuite(BundleModelTest.class);
suiteAll.addTest(new SeamCoreTestSetup(suite));
suite = new TestSuite("Seam Persistence Project Tests");
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/BundleModelTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/BundleModelTest.java 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/BundleModelTest.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -2,17 +2,16 @@
import java.util.Set;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.seam.core.international.BundleModelFactory;
import org.jboss.tools.cdi.seam.core.international.IBundle;
import org.jboss.tools.cdi.seam.core.international.IBundleModel;
import org.jboss.tools.cdi.seam.core.international.ILocalizedValue;
import org.jboss.tools.cdi.seam.core.international.IProperty;
-public class BundleModelTest extends TCKTest {
+public class BundleModelTest extends SeamCoreTest {
public void testBundleModel() throws Exception {
- IBundleModel bundleModel = BundleModelFactory.getBundleModel(tckProject);
+ IBundleModel bundleModel = BundleModelFactory.getBundleModel(getTestProject());
assertNotNull(bundleModel);
Set<String> bundles = bundleModel.getAllAvailableBundles();
@@ -31,7 +30,5 @@
value = property.getValue();
assertNotNull(value);
assertEquals("About this example application", value.getValue());
-
}
-
-}
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamCoreTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamCoreTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamCoreTest.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.core.test.international;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.cdi.seam.core.test.SeamCoreTestSetup;
+import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class SeamCoreTest extends TestCase {
+
+ protected IProject project;
+
+ protected IProject getTestProject() throws Exception {
+ if(project==null) {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamCoreTestSetup.PROJECT_NAME);
+ if(!project.exists()) {
+ project = ResourcesUtils.importProject(SeamCoreTestSetup.PLUGIN_ID, SeamCoreTestSetup.PROJECT_PATH);
+ TestUtil.waitForValidation();
+ }
+ }
+ return project;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamCoreTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.core.test.international;
+
+import java.io.File;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.osgi.framework.Bundle;
+
+public class SeamInternationalTestSetup extends TestSetup {
+
+ protected static String LIB_SUFFIX = "/lib";
+ protected static final String SEAM_INTERNATIONAL_LIB_SUFFIX = "/seam-international.jar";
+ protected static final String SEAM_INTERNATIONAL_PAGE_SUFFIX = "/seam-international.xhtml";
+ protected static final String DEFAULT_RESOURCE_BUNDLE_SUFFIX = "/messages.properties";
+ protected static final String DE_RESOURCE_BUNDLE_SUFFIX = "/messages_de.properties";
+ protected static final String RESOURCES_SUFFIX = "/resources";
+
+ public static final String PLUGIN_ID = "org.jboss.tools.cdi.seam.core.test";
+
+ protected IProject project;
+
+ public SeamInternationalTestSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ project = TCKTest.importPreparedProject("/");
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ // Set up seam-international.jar library into the project's WEB-INF/lib folder
+ try {
+ assertTrue("Cannot set up SEAM International module and resource bundles into a test project", setUpSeamInternationalLibraryAndResourceBundle());
+ } catch (Exception e) {
+ fail("Cannot set up SEAM International module and resource bundles into a test project: " + e.getLocalizedMessage());
+ }
+ }
+
+ private boolean setUpSeamInternationalLibraryAndResourceBundle() throws Exception {
+ Bundle b = Platform.getBundle(PLUGIN_ID);
+ String projectPath = project.getLocation().toOSString();
+ String resourcePath = FileLocator.resolve(b.getEntry(RESOURCES_SUFFIX)).getFile();
+
+ File seamInternationalLibFrom = new File(resourcePath + SEAM_INTERNATIONAL_LIB_SUFFIX);
+ File seamInternationalLibTo = new File(projectPath + TCKTest.WEB_CONTENT_SUFFIX + TCKTest.WEB_INF_SUFFIX
+ + LIB_SUFFIX + SEAM_INTERNATIONAL_LIB_SUFFIX);
+ if (!FileUtil.copyFile(seamInternationalLibFrom, seamInternationalLibTo))
+ return false;
+
+ File defaultResourceBundleFrom = new File(resourcePath + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
+ File defaultResourceBundleTo = new File(projectPath + TCKTest.JAVA_SOURCE_SUFFIX + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
+ if (!FileUtil.copyFile(defaultResourceBundleFrom, defaultResourceBundleTo))
+ return false;
+
+ File germanResourceBundleFrom = new File(resourcePath + DE_RESOURCE_BUNDLE_SUFFIX);
+ File germanResourceBundleTo = new File(projectPath + TCKTest.JAVA_SOURCE_SUFFIX + DE_RESOURCE_BUNDLE_SUFFIX);
+ if (!FileUtil.copyFile(germanResourceBundleFrom, germanResourceBundleTo))
+ return false;
+
+ File seamInternationalPageFrom = new File(resourcePath + SEAM_INTERNATIONAL_PAGE_SUFFIX);
+ File seamInternationalPageTo = new File(projectPath + TCKTest.WEB_CONTENT_SUFFIX
+ + SEAM_INTERNATIONAL_PAGE_SUFFIX);
+ if (!FileUtil.copyFile(seamInternationalPageFrom, seamInternationalPageTo))
+ return false;
+
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ return true;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamInternationalTestSetup.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -10,24 +10,17 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.core.test.international;
-import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.seam.core.CDISeamCorePlugin;
import org.jboss.tools.cdi.seam.core.international.el.CDIInternationalMessagesELResolver;
-import org.jboss.tools.cdi.seam.core.test.CDISeamCoreAllTests;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.common.text.ext.util.Utils;
-import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
import org.jboss.tools.jst.text.ext.hyperlink.ELHyperlink;
import org.jboss.tools.jst.text.ext.hyperlink.ELHyperlinkDetector;
@@ -35,19 +28,11 @@
import org.jboss.tools.jst.text.ext.test.HyperlinkTestUtil.TestHyperlink;
import org.jboss.tools.jst.text.ext.test.HyperlinkTestUtil.TestRegion;
import org.jboss.tools.jst.web.kb.PageContextFactory;
-import org.osgi.framework.Bundle;
/**
* @author Victor Rubezhny
*/
-public class SeamResourceBundlesTest extends TCKTest {
- protected static final String SEAM_INTERNATIONAL_LIB_SUFFIX = "/seam-international.jar";
- protected static final String SEAM_INTERNATIONAL_PAGE_SUFFIX = "/seam-international.xhtml";
- protected static final String DEFAULT_RESOURCE_BUNDLE_SUFFIX = "/messages.properties";
- protected static final String DE_RESOURCE_BUNDLE_SUFFIX = "/messages_de.properties";
- protected static final String RESOURCES_SUFFIX = "/resources";
-
- protected static String LIB_SUFFIX = "/lib";
+public class SeamResourceBundlesTest extends SeamCoreTest {
private ContentAssistantTestCase caTest = new ContentAssistantTestCase();
private static final String PAGE_NAME = "WebContent/seam-international.xhtml";
@@ -56,49 +41,25 @@
private String[] germanResourceBundleNameProperties = new String[] {"bundles.messages.de_home_header", "bundles.messages.de_home_body", "bundles.messages.de_home_note"};
private String[] textDefaultResourceBundleNameProperties = new String[] {"home_header", "home_body", "home_note"};
private String[] textGermanResourceBundleNameProperties = new String[] {"de_home_header", "de_home_body", "de_home_note"};
-
- boolean bReadyForTesting = false;
- String errMessage = null;
-
- public SeamResourceBundlesTest () {
- super();
-
- boolean setupOK = true;
- // Set up seam-international.jar library into the project's WEB-INF/lib folder
- try {
- setupOK = setUpSeamInternationalLibraryAndResourceBundle();
- if (!setupOK)
- errMessage = "Cannot set up SEAM International module and resource bundles into a test project";
- } catch (Exception e) {
- setupOK = false;
- errMessage = "Cannot set up SEAM International module and resource bundles into a test project: "
- + e.getLocalizedMessage();
- }
-
- if (!setupOK)
- return;
-
- // Test that seam-international module is successfully installed on the CDI project
- setupOK = CDICorePlugin.getCDI(tckProject, true).getExtensionManager()
- .isCDIExtensionAvailable(CDISeamCorePlugin.CDI_INTERNATIONAL_RUNTIME_EXTENTION);
- if (!setupOK)
- errMessage = "SEAM International module is not installed or incorrectly installed";
-
- bReadyForTesting = setupOK;
+
+ /**
+ * Test that seam-international module is successfully installed on the CDI project
+ * @throws Exception
+ */
+ public void testExtension() throws Exception {
+ assertTrue("SEAM International module is not installed or incorrectly installed", CDICorePlugin.getCDI(getTestProject(), true).getExtensionManager().isCDIExtensionAvailable(CDISeamCorePlugin.CDI_INTERNATIONAL_RUNTIME_EXTENTION));
}
-
/**
* The method checks if CDIInternationalMessagesELResolver present among the EL Resolvers,
* then if the required resolver found uses it to retrieve and test proposals for bundle and their properties
+ * @throws Exception
*/
- public void testCDIInternationalMessages () {
- assertTrue(errMessage, bReadyForTesting);
-
- IFile page = tckProject.getFile(PAGE_NAME);
+ public void testCDIInternationalMessages () throws Exception {
+ IFile page = getTestProject().getFile(PAGE_NAME);
assertTrue("Test page not found: " + PAGE_NAME, (page != null && page.exists()));
ELContext elContext = PageContextFactory.createPageContext(page);
-
+
ELResolver[] elResolvers = elContext.getElResolvers();
ELResolver cdiInternationalModuleResolver = null;
if (elResolvers != null) {
@@ -110,19 +71,19 @@
}
}
assertNotNull("Seam International module resolver is not set up on the project", cdiInternationalModuleResolver);
-
+
List<TextProposal> bundleProposals = cdiInternationalModuleResolver.getProposals(elContext, "value=\"#{", 1);
assertTrue("Seam International module resolver didn't return proposals for bundles",
(bundleProposals != null && bundleProposals.size() > 0));
proposalsExist(bundleProposals, resourceBundleNames);
-
+
List<TextProposal> bundlePropertyProposals = cdiInternationalModuleResolver.getProposals(elContext, "value=\"#{bundles.messages.", 1);
assertTrue("Seam International module resolver didn't return proposals for bundles",
(bundlePropertyProposals != null && bundlePropertyProposals.size() > 0));
proposalsExist(bundlePropertyProposals, textDefaultResourceBundleNameProperties);
proposalsExist(bundlePropertyProposals, textGermanResourceBundleNameProperties);
}
-
+
public void proposalsExist(List<TextProposal> res, String[] proposals) {
TextProposal[] result = res.toArray(new TextProposal[res.size()]);
for (int i = 0; i < proposals.length; i++) {
@@ -130,7 +91,7 @@
assertTrue("Proposal " + proposals[i] + " not found!", found ); //$NON-NLS-1$ //$NON-NLS-2$
}
}
-
+
public boolean compareTextProposal(String proposal, TextProposal[] proposals){
for (int i = 0; i < proposals.length; i++) {
String replacementString = proposals[i].getReplacementString().toLowerCase();
@@ -139,67 +100,32 @@
replacementString = Utils.trimQuotes(replacementString);
if (replacementString.equalsIgnoreCase(proposal)) return true;
-
+
}
return false;
}
/**
* The method tests CA on CDI Seam International Module Resource Bundles
+ * @throws Exception
*/
- public void testResourceBundles() {
- assertTrue(errMessage, bReadyForTesting);
-
+ public void testResourceBundles() throws Exception {
// Perform CA test
+ caTest.setProject(getTestProject());
caTest.checkProposals(PAGE_NAME, "value=\"#{", 9, resourceBundleNames, false);
caTest.checkProposals(PAGE_NAME, "value=\"#{bundles.messages.", 26, defaultResourceBundleNameProperties, false);
caTest.checkProposals(PAGE_NAME, "value=\"#{bundles.messages.", 26, germanResourceBundleNameProperties, false);
}
-
+
/**
* The method tests CA on CDI Seam International Module Resource Bundles
*/
public void testSeamInternationalHyperlinks() throws Exception {
- assertTrue(errMessage, bReadyForTesting);
-
// Perform Hyperlink test
ArrayList<TestRegion> regionList = new ArrayList<TestRegion>();
regionList.add(new TestRegion(381, 15, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open bundle 'messages'", null)}));
regionList.add(new TestRegion(398, 10, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open property 'home_header' of bundle 'messages'", null)}));
-
- HyperlinkTestUtil.checkRegions(tckProject, PAGE_NAME, regionList, new ELHyperlinkDetector());
- }
-
- private boolean setUpSeamInternationalLibraryAndResourceBundle() throws Exception {
- Bundle b = Platform.getBundle(CDISeamCoreAllTests.PLUGIN_ID);
- String projectPath = tckProject.getLocation().toOSString();
- String resourcePath = FileLocator.resolve(b.getEntry(RESOURCES_SUFFIX)).getFile();
- File seamInternationalLibFrom = new File(resourcePath + SEAM_INTERNATIONAL_LIB_SUFFIX);
- File seamInternationalLibTo = new File(projectPath + WEB_CONTENT_SUFFIX + WEB_INF_SUFFIX
- + LIB_SUFFIX + SEAM_INTERNATIONAL_LIB_SUFFIX);
- if (!FileUtil.copyFile(seamInternationalLibFrom, seamInternationalLibTo))
- return false;
-
- File defaultResourceBundleFrom = new File(resourcePath + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
- File defaultResourceBundleTo = new File(projectPath + JAVA_SOURCE_SUFFIX + DEFAULT_RESOURCE_BUNDLE_SUFFIX);
- if (!FileUtil.copyFile(defaultResourceBundleFrom, defaultResourceBundleTo))
- return false;
-
- File germanResourceBundleFrom = new File(resourcePath + DE_RESOURCE_BUNDLE_SUFFIX);
- File germanResourceBundleTo = new File(projectPath + JAVA_SOURCE_SUFFIX + DE_RESOURCE_BUNDLE_SUFFIX);
- if (!FileUtil.copyFile(germanResourceBundleFrom, germanResourceBundleTo))
- return false;
-
- File seamInternationalPageFrom = new File(resourcePath + SEAM_INTERNATIONAL_PAGE_SUFFIX);
- File seamInternationalPageTo = new File(projectPath + WEB_CONTENT_SUFFIX
- + SEAM_INTERNATIONAL_PAGE_SUFFIX);
- if (!FileUtil.copyFile(seamInternationalPageFrom, seamInternationalPageTo))
- return false;
-
- TestUtil.validate(tckProject);
-
- caTest.setProject(tckProject);
- return true;
+ HyperlinkTestUtil.checkRegions(getTestProject(), PAGE_NAME, regionList, new ELHyperlinkDetector());
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java 2011-08-10 00:42:25 UTC (rev 33745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java 2011-08-10 01:01:41 UTC (rev 33746)
@@ -10,39 +10,16 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.core.test.servlet;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.TestCase;
-
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
-import org.jboss.tools.cdi.seam.core.test.SeamCoreTestSetup;
-import org.jboss.tools.jst.jsp.test.TestUtil;
-import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.cdi.seam.core.test.international.SeamCoreTest;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
*/
-public class SeamServletValidationTest extends TestCase {
+public class SeamServletValidationTest extends SeamCoreTest {
- protected IProject project;
-
- public IProject getTestProject() throws IOException, CoreException, InvocationTargetException, InterruptedException {
- if(project==null) {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamCoreTestSetup.PROJECT_NAME);
- if(!project.exists()) {
- project = ResourcesUtils.importProject(SeamCoreTestSetup.PLUGIN_ID, SeamCoreTestSetup.PROJECT_PATH);
- TestUtil.waitForValidation();
- }
- }
- return project;
- }
-
/**
* CDI validator should ignore injection points annotated @RequestParam/@HeaderParam/@CookieParam
* See https://issues.jboss.org/browse/JBIDE-9389
14 years, 8 months