JBoss Tools SVN: r37040 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test: example and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:35:56 -0500 (Wed, 07 Dec 2011)
New Revision: 37040
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleTest.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/ExamplesSuite.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/JavaPortletExample.java
Log:
created java portlet example test
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleTest.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleTest.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleTest.java 2011-12-07 08:35:56 UTC (rev 37040)
@@ -0,0 +1,40 @@
+package org.jboss.tools.portlet.ui.bot.test.example;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.not;
+import static org.jboss.tools.portlet.ui.bot.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
+
+import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
+import org.jboss.tools.portlet.ui.bot.task.console.ConsoleClearingTask;
+import org.jboss.tools.portlet.ui.bot.task.server.RunninngProjectOnServerTask;
+import org.jboss.tools.ui.bot.ext.ExampleTest;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+/**
+ * Common ancestor for example projects tests.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+@Require(server=@Server(required=true, state=ServerState.Running, type=ServerType.EPP))
+public abstract class AbstractPortletExampleTest extends ExampleTest {
+
+ protected void doPerform(AbstractSWTTask task){
+ task.setBot(bot);
+ task.perform();
+ }
+
+ @Override
+ protected void executeExample() {
+ doPerform(new ConsoleClearingTask());
+
+ for (String project : getProjectNames()){
+ doPerform(new RunninngProjectOnServerTask(project));
+ }
+
+ assertThat("Exception", not(inConsoleOutput()));
+ }
+}
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/ExamplesSuite.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/ExamplesSuite.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/ExamplesSuite.java 2011-12-07 08:35:56 UTC (rev 37040)
@@ -0,0 +1,13 @@
+package org.jboss.tools.portlet.ui.bot.test.example;
+
+import org.jboss.tools.portlet.ui.bot.test.RequirementAwareUsageWindowClosingSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+(a)RunWith(RequirementAwareUsageWindowClosingSuite.class)
+(a)Suite.SuiteClasses({
+ JavaPortletExample.class
+ })
+public class ExamplesSuite {
+
+}
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/JavaPortletExample.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/JavaPortletExample.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/JavaPortletExample.java 2011-12-07 08:35:56 UTC (rev 37040)
@@ -0,0 +1,28 @@
+package org.jboss.tools.portlet.ui.bot.test.example;
+
+
+/**
+ * Tests the Java portlet example.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class JavaPortletExample extends AbstractPortletExampleTest {
+
+ private static final String PROJECT_NAME = "testjavaportlet";
+
+ @Override
+ public String getExampleCategory() {
+ return "Portlet";
+ }
+
+ @Override
+ public String getExampleName() {
+ return "JBoss Java Portlet Example";
+ }
+
+ @Override
+ public String[] getProjectNames() {
+ return new String[]{PROJECT_NAME};
+ }
+}
14 years
JBoss Tools SVN: r37039 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:34:55 -0500 (Wed, 07 Dec 2011)
New Revision: 37039
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/AllTestsSuite_singleConfig.launch
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JSFPortletTestSuite.launch
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JavaPortletTestSuite.launch
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/SeamPortletTestSuite.launch
Log:
changed resources dir
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/AllTestsSuite_singleConfig.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/AllTestsSuite_singleConfig.launch 2011-12-07 08:34:36 UTC (rev 37038)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/AllTestsSuite_singleConfig.launch 2011-12-07 08:34:55 UTC (rev 37039)
@@ -20,7 +20,7 @@
<listEntry value="1"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
-<mapEntry key="DISPLAY" value=":1"/>
+<mapEntry key="aDISPLAY" value=":1"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
@@ -30,7 +30,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.portlet.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test} -Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test/resources/generated_config_files} -Xmx1024m -XX:MaxPermSize=256m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JSFPortletTestSuite.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JSFPortletTestSuite.launch 2011-12-07 08:34:36 UTC (rev 37038)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JSFPortletTestSuite.launch 2011-12-07 08:34:55 UTC (rev 37039)
@@ -30,7 +30,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.portlet.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test} -Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test/resources/generated_config_files} -Xmx1024m -XX:MaxPermSize=256m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JavaPortletTestSuite.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JavaPortletTestSuite.launch 2011-12-07 08:34:36 UTC (rev 37038)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/JavaPortletTestSuite.launch 2011-12-07 08:34:55 UTC (rev 37039)
@@ -30,7 +30,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.portlet.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test} -Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test/resources/generated_config_files} -Xmx1024m -XX:MaxPermSize=256m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/SeamPortletTestSuite.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/SeamPortletTestSuite.launch 2011-12-07 08:34:36 UTC (rev 37038)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/SeamPortletTestSuite.launch 2011-12-07 08:34:55 UTC (rev 37039)
@@ -30,7 +30,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.portlet.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test} -Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test/resources/generated_config_files} -Xmx1024m -XX:MaxPermSize=256m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
14 years
JBoss Tools SVN: r37038 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:34:36 -0500 (Wed, 07 Dec 2011)
New Revision: 37038
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/ExampleTestSuite.launch
Log:
created
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/ExampleTestSuite.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/ExampleTestSuite.launch (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/ExampleTestSuite.launch 2011-12-07 08:34:36 UTC (rev 37038)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/ExamplesSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="aDISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.portlet.ui.bot.test.example.ExamplesSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.portlet.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dswtbot.test.properties.file=${file_prompt:"Please choose a SWTBot configuration file":${workspace_loc}/org.jboss.tools.portlet.ui.bot.test/resources/generated_config_files} -Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
14 years
JBoss Tools SVN: r37037 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/prepare_workspace.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:33:36 -0500 (Wed, 07 Dec 2011)
New Revision: 37037
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/prepare_workspace/prepare_workspace.launch
Log:
use embedded maven to run the script
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/prepare_workspace/prepare_workspace.launch
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/prepare_workspace/prepare_workspace.launch 2011-12-07 08:33:01 UTC (rev 37036)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/launchers/prepare_workspace/prepare_workspace.launch 2011-12-07 08:33:36 UTC (rev 37037)
@@ -9,7 +9,7 @@
<listEntry value="JBOSS_EPP_4_3=${folder_prompt:EPP 4.3 installation directory}"/>
<listEntry value="JBOSS_EPP_5_1=${folder_prompt:EPP 5.1 installation directory}"/>
</listAttribute>
-<stringAttribute key="M2_RUNTIME" value="/home/ljelinko/programs/apache-maven-3.0.3"/>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
14 years
JBoss Tools SVN: r37036 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:33:01 -0500 (Wed, 07 Dec 2011)
New Revision: 37036
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java
Log:
throw exception if there is no console output
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java 2011-12-07 08:32:40 UTC (rev 37035)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java 2011-12-07 08:33:01 UTC (rev 37036)
@@ -18,7 +18,7 @@
public boolean matchesSafely(String item) {
consoleText = SWTBotFactory.getConsole().getConsoleText();
if (consoleText == null){
- consoleText = "";
+ throw new IllegalStateException("No console output present");
}
return consoleText.contains(item);
}
14 years
JBoss Tools SVN: r37035 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/console.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-07 03:32:40 -0500 (Wed, 07 Dec 2011)
New Revision: 37035
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/console/ConsoleClearingTask.java
Log:
removed sysouts
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/console/ConsoleClearingTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/console/ConsoleClearingTask.java 2011-12-07 07:28:57 UTC (rev 37034)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/console/ConsoleClearingTask.java 2011-12-07 08:32:40 UTC (rev 37035)
@@ -20,11 +20,8 @@
SWTBotView view = SWTBotFactory.getConsole().show();
for (SWTBotToolbarButton button : view.getToolbarButtons()){
- System.out.println(button.getToolTipText());
if (IDELabel.ConsoleView.BUTTON_CLEAR_CONSOLE_TOOLTIP.equals(button.getToolTipText())){
- System.out.println("Before click");
button.click();
- System.out.println("After click");
}
}
}
14 years
JBoss Tools SVN: r37034 - in trunk: tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-12-07 02:28:57 -0500 (Wed, 07 Dec 2011)
New Revision: 37034
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Added Code Completion test of attribute of tags <link href=""/> and, <h:link value="">, <a:loadStyle src=""/>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07 01:22:33 UTC (rev 37033)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -20,11 +20,13 @@
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.BuildPathHelper;
import org.jboss.tools.ui.bot.ext.helper.ContentAssistHelper;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.ext.helper.OpenOnHelper;
import org.jboss.tools.ui.bot.ext.parts.ContentAssistBot;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
/** * Test Code Completion functionality of JSF components within xhtml page
* @author Vladimir Pakan
*
@@ -36,6 +38,7 @@
private String originalEditorText;
private String compositeComponentDefEditorText;
private String origCompositeComponentContainerEditorText;
+ private String addedVariableRichfacesUiLocation = null;
/**
* Test Code Completion functionality for managed bean
*/
@@ -346,6 +349,39 @@
FACELETS_TEST_PAGE);
}
/**
+ * Test Code Completion functionality of src attribute for tags <link>, <h:link> and <a:loadStyle>
+ */
+ public void testCodeCompletionOfSrcAttriubute(){
+ initJSF2PageTest();
+ addRichFacesToJSF2ProjectClassPath();
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ "xmlns:f=\"http://java.sun.com/jsf/core\"",
+ 0,
+ 0,
+ 0);
+ compositeComponentContainerEditor.insertText("xmlns:a4j=\"http://richfaces.org/a4j\" \n");
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ "<h:message ",
+ 0,
+ 0,
+ 0);
+ compositeComponentContainerEditor.insertText("\n");
+ final String a4jLoadStyleTag = "<a4j:loadStyle src=\"";
+ compositeComponentContainerEditor.insertText(a4jLoadStyleTag + "\"/>\n");
+ final String linkTag = "<link href=\"";
+ compositeComponentContainerEditor.insertText(linkTag + "\"/>\n");
+ final String hLinkTag = "<h:link value=\"";
+ compositeComponentContainerEditor.insertText(hLinkTag + "\"/>\n");
+ compositeComponentContainerEditor.save();
+ bot.sleep(Timing.time2S());
+ checkCodeCompletionOfSourceAttribute(linkTag);
+ checkCodeCompletionOfSourceAttribute(hLinkTag);
+ checkCodeCompletionOfSourceAttribute(a4jLoadStyleTag);
+ }
+
+ /**
* Initialize test which are using facelets test page
*/
private void initFaceletsPageTest() {
@@ -487,7 +523,7 @@
}
@Override
-public void tearDown() throws Exception {
+ public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
@@ -500,6 +536,9 @@
compositeComponentContainerEditor.setText(origCompositeComponentContainerEditorText);
compositeComponentContainerEditor.saveAndClose();
}
+ util.waitForNonIgnoredJobs();
+ removeRichFacesFromJSF2ProjectClassPath();
+
super.tearDown();
}
/**
@@ -599,6 +638,36 @@
result.add("\"#{cc.attrs.}\"");
return result;
}
-
-
+ /**
+ * Check Code Completion of src attribute of tagToCheck tag
+ * @param tagToCheck
+ */
+ private void checkCodeCompletionOfSourceAttribute(String tagToCheck){
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ tagToCheck,
+ tagToCheck.length(),
+ 0,
+ 0);
+ ContentAssistBot contentAssist = compositeComponentContainerEditor.contentAssist();
+ contentAssist.checkContentAssist("/pages", false);
+ contentAssist.checkContentAssist("/resources", false);
+ contentAssist.checkContentAssist("/templates", false);
+ }
+ /**
+ * Add RichFaces library to JSF2 project classpath
+ */
+ private void addRichFacesToJSF2ProjectClassPath(){
+ addedVariableRichfacesUiLocation = BuildPathHelper.addExternalJar(VPEAutoTestCase.RICH_FACES_UI_JAR_LOCATION,
+ JSF2_TEST_PROJECT_NAME);
+ }
+ /**
+ * Remove previously added RichFaces library from JSF2 project classpath
+ */
+ private void removeRichFacesFromJSF2ProjectClassPath(){
+ if (addedVariableRichfacesUiLocation != null){
+ BuildPathHelper.removeVariable(JSF2_TEST_PROJECT_NAME, addedVariableRichfacesUiLocation, true);
+ }
+ eclipse.cleanAllProjects();
+ }
}
\ No newline at end of file
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-07 01:22:33 UTC (rev 37033)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -55,12 +55,16 @@
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
import org.jboss.tools.ui.bot.ext.gen.IServer;
import org.jboss.tools.ui.bot.ext.gen.IServerRuntime;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.MenuBarHelper;
import org.jboss.tools.ui.bot.ext.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.IDELabel.PreferencesDialog;
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.jboss.tools.ui.bot.ext.view.RemoteSystems;
+import org.junit.Assert;
/**
* Provides Eclipse common operation based on SWTBot element operations
@@ -1461,4 +1465,32 @@
log.info("No Editors to close");
}
}
+ /**
+ * Opens properties dialog of project with projectName
+ * @param projectName
+ */
+ public SWTBotExt openPropertiesOfProject(String projectName){
+ PackageExplorer packageExplorer = new PackageExplorer();
+ // Open Project Properties
+ packageExplorer.show();
+ bot.sleep(Timing.time2S());
+ packageExplorer.selectProject(projectName);
+ Assert.assertTrue(isProjectInPackageExplorer(projectName));
+ bot.sleep(Timing.time2S());
+ util.waitForNonIgnoredJobs();
+ ContextMenuHelper.clickContextMenu(packageExplorer.bot().tree(),
+ IDELabel.Menu.PROPERTIES);
+ waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + projectName);
+ return bot;
+ }
+ /**
+ * Cleans All Projects
+ */
+ public void cleanAllProjects(){
+ MenuBarHelper.getMenu(IDELabel.Menu.PROJECT).menu(IDELabel.Menu.CLEAN).click();
+ bot.shell(IDELabel.Shell.CLEAN).activate();
+ bot.radio(IDELabel.CleanProjectDialog.CLEAN_ALL_PROJECTS_RADIO).click();
+ bot.button(IDELabel.Button.OK).click();
+ util.waitForNonIgnoredJobs();
+ }
}
\ No newline at end of file
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Helper for managing project build path
+ *
+ * @author Vlado Pakan
+ *
+ */
+public class BuildPathHelper {
+ /**
+ * Adds External Jar File to Project Build Path
+ * @param externalJarLocation
+ * @param projectName
+ * @return
+ */
+ public static String addExternalJar(final String externalJarLocation,
+ final String projectName) {
+
+ assertTrue("External Jar Location cannot be empty but is " + externalJarLocation,
+ externalJarLocation != null && externalJarLocation.length() > 0);
+ SWTBotExt bot = new SWTEclipseExt().openPropertiesOfProject(projectName);
+ bot.tree().expandNode(IDELabel.JavaBuildPathPropertiesEditor.JAVA_BUILD_PATH_TREE_ITEM_LABEL).select();
+ bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
+ bot.button(IDELabel.Button.ADD_VARIABLE).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ bot.button(IDELabel.Button.CONFIGURE_VARIABLES).click();
+ bot.shell(IDELabel.Shell.PREFERENCES_FILTERED).activate();
+ bot.button(IDELabel.Button.NEW).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_ENTRY).activate();
+ String jarFileName = new File(externalJarLocation).getName();
+ bot.textWithLabel(IDELabel.NewVariableEntryDialog.NAME_TEXT_LABEL)
+ .setText(jarFileName.toUpperCase() + "_LOCATION");
+ bot.textWithLabel(IDELabel.NewVariableEntryDialog.PATH_TEXT_LABEL)
+ .setText(externalJarLocation);
+ bot.clickButton(IDELabel.Button.OK).click();
+ String result = TableHelper.getSelectionText(bot.table());
+ bot.clickButton(IDELabel.Button.OK).click();
+ bot.clickButton(IDELabel.Button.OK).click();
+ bot.clickButton(IDELabel.Button.OK).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ return result;
+
+ }
+ /**
+ * Removes variable from project classpath
+ * @param variableLabel
+ * @param removeGlobaly
+ */
+ public static void removeVariable (String projectName , String variableLabel, boolean removeGlobaly){
+ SWTBotExt bot = new SWTEclipseExt().openPropertiesOfProject(projectName);
+ bot.tree().expandNode(IDELabel.JavaBuildPathPropertiesEditor.JAVA_BUILD_PATH_TREE_ITEM_LABEL).select();
+ bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
+ bot.tree(1).select(variableLabel);
+ bot.button(IDELabel.Button.REMOVE).click();
+ if (removeGlobaly){
+ bot.button(IDELabel.Button.ADD_VARIABLE).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ bot.table().select(variableLabel);
+ bot.button(IDELabel.Button.CONFIGURE_VARIABLES).click();
+ bot.shell(IDELabel.Shell.PREFERENCES_FILTERED).activate();
+ bot.button(IDELabel.Button.REMOVE).click();
+ bot.button(IDELabel.Button.OK).click();
+ bot.shell(IDELabel.Shell.CLASSPATH_VARIABLES_CHANGED).activate();
+ bot.button(IDELabel.Button.YES).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ bot.clickButton(IDELabel.Button.CANCEL).click();
+ }
+ bot.button(IDELabel.Button.OK).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -0,0 +1,62 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withMnemonic;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.hamcrest.Matcher;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Helper to find menu within menu bar
+ * @author Vladimir Pakan
+ *
+ */
+public class MenuBarHelper {
+ /**
+ * Returns active shell menu bar menu with label menuLabel
+ * @param menuLabel
+ * @return
+ */
+ public static SWTBotMenu getMenu (final String menuLabel){
+ final Shell activeShell = new SWTBot().activeShell().widget;
+ final MenuItem menuItem = UIThreadRunnable.syncExec(new Result<MenuItem>() {
+ @Override
+ public MenuItem run() {
+ Matcher<? extends Widget> matcher = withMnemonic(IDELabel.Menu.PROJECT);
+ MenuItem[] items = activeShell.getMenuBar().getItems();
+ int index = 0;
+ while (index < items.length && !matcher.matches(items[index])){
+ index++;
+ }
+ if (index < items.length){
+ return items[index];
+ }
+ else{
+ throw new WidgetNotFoundException("Unable to find menu with label " + IDELabel.Menu.PROJECT +
+ " within active shell menu bar.");
+ }
+
+ }
+ });
+
+ return new SWTBotMenu (menuItem);
+
+ }
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+
+/**
+ * Helper for Table widget
+ * @author vlado pakan
+ *
+ */
+public class TableHelper {
+
+ /**
+ * Returns table selection text on the selectionRow row and selectionColumn column of selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @param selectionRow
+ * @param selectionColumn
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table,
+ final int selectionRow, final int selectionColumn) {
+ table.setFocus();
+ return UIThreadRunnable.syncExec(new StringResult() {
+ @Override
+ public String run() {
+ return table.widget.getSelection()[selectionRow].getText(selectionColumn);
+ }
+ });
+ }
+ /**
+ * Returns table selection text on the selectionRow row and first column of selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @param selectionRow
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table, final int selectionRow) {
+ return TableHelper.getSelectionText(table, selectionRow , 0);
+ }
+ /**
+ * Returns table selection text on the first row and first column of selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table) {
+ return getSelectionText(table, 0 , 0);
+ }
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-12-07 01:22:33 UTC (rev 37033)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -86,6 +86,7 @@
public static final String SAVE_AS_TEMPLATE = "Save As Template...";
public static final String AUTO_LAYOUT = "Auto Layout";
public static final String CDI_REFACTOR = "CDI Refactor";
+ public static final String CLEAN = "Clean...";
}
public class Button {
@@ -113,6 +114,8 @@
public static final String DELETE = "Delete";
public static final String UP = "Up";
public static final String DOWN = "Down";
+ public static final String ADD_VARIABLE = "Add Variable...";
+ public static final String CONFIGURE_VARIABLES = "Configure Variables...";
}
public class Shell {
@@ -183,6 +186,11 @@
public static final String AUTO_LAYOUT = "Auto Layout";
public static final String ADD_PROPERTY = "Add Property";
public static final String EDIT = "Edit";
+ public static final String NEW_VARIABLE_CLASS_PATH_ENTRY = "New Variable Classpath Entry";
+ public static final String PREFERENCES_FILTERED = "Preferences (Filtered)";
+ public static final String NEW_VARIABLE_ENTRY = "New Variable Entry";
+ public static final String CLASSPATH_VARIABLES_CHANGED = "Classpath Variables Changed";
+ public static final String CLEAN = "Clean";
}
public class EntityGroup {
@@ -787,4 +795,23 @@
public static final String EDIT_PROPERTIES_DIALOG_VALUE_LABEL = "Value:";
}
+
+ public static class JavaBuildPathPropertiesEditor{
+
+ public static final String JAVA_BUILD_PATH_TREE_ITEM_LABEL = "Java Build Path";
+ public static final String LIBRARIES_TAB_LABEL = "Libraries";
+
+ }
+
+ public static class NewVariableEntryDialog{
+
+ public static final String NAME_TEXT_LABEL = "Name:";
+ public static final String PATH_TEXT_LABEL = "Path:";
+
+ }
+ public static class CleanProjectDialog{
+
+ public static final String CLEAN_ALL_PROJECTS_RADIO = "Clean all projects";
+
+ }
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties 2011-12-07 01:22:33 UTC (rev 37033)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties 2011-12-07 07:28:57 UTC (rev 37034)
@@ -1,7 +1,8 @@
JSFProjectName=JBIDETestProject
+RichFacesUiJarLocation=/opt/jboss-eap-5.1/seam/lib/richfaces-ui.jar
FaceletsProjectName=FaceletsTestProject
Apachev6.0=D\:/Java/apache-tomcat-6.0.18
-JBossEap5.x=/opt/jbdevstudio4.1.0.GA/jboss-eap/jboss-as
+JBossEap5.x=/opt/jbdevstudio4.1.1.GA/jboss-eap/jboss-as
JSF2ProjectName=JSF2TestProject
JBossASForJSF2=/opt/jboss-6.0.0.Final
JBossASForJSF2Version=6.0
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-12-07 01:22:33 UTC (rev 37033)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-12-07 07:28:57 UTC (rev 37034)
@@ -70,6 +70,7 @@
protected final static String JBOSS_AS_FOR_JSF2_SERVER_GROUP;
protected final static String JBOSS_AS_FOR_JSF2_SERVER_TYPE;
protected final static String JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE;
+ protected final static String RICH_FACES_UI_JAR_LOCATION;
static {
try {
@@ -108,6 +109,16 @@
else{
throw new RuntimeException("Runtime for JSF2 is not specified");
}
+ // Get richfaces-ui.jar location
+ // System property has priority
+ String richFacesUiLocation = System.getProperty("org.jboss.tools.vpe.ui.bot.test.richafaces.ui.jar.location","");
+ // Read property from Properties File
+ if (richFacesUiLocation.length() == 0){
+ if (projectProperties.containsKey("RichFacesUiJarLocation")){
+ richFacesUiLocation = projectProperties.getProperty("RichFacesUiJarLocation");
+ }
+ }
+ RICH_FACES_UI_JAR_LOCATION = richFacesUiLocation;
}
/**
14 years
JBoss Tools SVN: r37033 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-06 20:22:33 -0500 (Tue, 06 Dec 2011)
New Revision: 37033
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/FaceletSourceTagHyperlink.java
Log:
JBIDE-10302
https://issues.jboss.org/browse/JBIDE-10302
Minor fix in cycle.
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/FaceletSourceTagHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/FaceletSourceTagHyperlink.java 2011-12-07 01:20:34 UTC (rev 37032)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/FaceletSourceTagHyperlink.java 2011-12-07 01:22:33 UTC (rev 37033)
@@ -74,7 +74,7 @@
if(folder.length() > 0) {
if(folder.startsWith("META-INF")) {
JarEntryResource r = null;
- while (folder.length() >= 0) {
+ while (folder.length() > 0) {
int iii = folder.indexOf('/');
String name = iii < 0 ? folder : folder.substring(
0, iii);
14 years
JBoss Tools SVN: r37032 - in trunk/jst/tests/org.jboss.tools.jst.text.ext.test: projects/stopka-ui-test and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-06 20:20:34 -0500 (Tue, 06 Dec 2011)
New Revision: 37032
Added:
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.classpath
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.project
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/.jsdtscope
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.jdt.core.prefs
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.component
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.maven.ide.eclipse.prefs
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/install-ui.sh
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/pom.xml
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/run-tomcat.cmd
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/java/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/resources/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/faces-config.xml
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-taglib-0.9.jar
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-ui-base-1.0.1.jar
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/web.xml
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/component.css
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/filemanager.css
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/stopka.css
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/subitem.css
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/test.jspx
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/TaglibOpenOnTest.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/JstTextExtAllTests.java
Log:
JBIDE-10302
https://issues.jboss.org/browse/JBIDE-10302
Test is added.
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.classpath
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.classpath (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.classpath 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/>
+ <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="target/classes"/>
+</classpath>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.project (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.project 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>stopka-ui-test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/.jsdtscope
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/.jsdtscope (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/.jsdtscope 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/webapp"/>
+ <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/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.jdt.core.prefs 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,9 @@
+#Fri Nov 11 13:07:17 VET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.component 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="stopka-ui-test">
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <property name="context-root" value="stopka-ui-test"/>
+ <property name="java-output-path" value="/stopka-ui-test/target/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml 2011-12-07 01:20:34 UTC (rev 37032)
@@ -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/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="jst.jsf" version="2.0"/>
+</faceted-project>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.container 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.eclipse.wst.jsdt.ui.superType.name 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.maven.ide.eclipse.prefs 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,8 @@
+#Fri Nov 11 14:16:39 VET 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/.settings/org.maven.ide.eclipse.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/install-ui.sh
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/install-ui.sh (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/install-ui.sh 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,2 @@
+mvn install:install-file -Dfile=stopka-taglib-0.9.jar -DgroupId=stopka.us -DartifactId=ui-components -Dversion=0.9 -Dpackaging=jar
+mvn install:install-file -Dfile=stopka-ui-base-1.0.1.jar -DgroupId=stopka.us -DartifactId=stopka-ui-base -Dversion=1.0.1 -Dpackaging=jar
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/pom.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/pom.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/pom.xml 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,120 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>stopka.us.studio</groupId>
+ <artifactId>stopka-ui-test</artifactId>
+ <packaging>war</packaging>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>stopka-ui-test Maven Webapp</name>
+ <url>http://maven.apache.org</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>stopka.us</groupId>
+ <artifactId>stopka-ui-base</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>stopka.us</groupId>
+ <artifactId>ui-components</artifactId>
+ <version>0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.5.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.2.0.RC0</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <inputEncoding>UTF-8</inputEncoding>
+ <outputEncoding>UTF-8</outputEncoding>
+ <generateReports>false</generateReports>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>src/main/webapp/dynamics</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <version>1.5</version>
+ <configuration>
+ <startDate>2011-08-01</startDate>
+ <endDate>2011-08-09</endDate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/run-tomcat.cmd
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/run-tomcat.cmd (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/run-tomcat.cmd 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,3 @@
+@echo off
+
+call mvn -f pom.xml clean tomcat:run
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/MANIFEST.MF 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/faces-config.xml 2011-12-07 01:20:34 UTC (rev 37032)
@@ -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/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-taglib-0.9.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-taglib-0.9.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-ui-base-1.0.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/lib/stopka-ui-base-1.0.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/web.xml 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,22 @@
+<?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:jsp="http://java.sun.com/xml/ns/javaee/jsp" 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_2_5.xsd" version="2.5">
+ <display-name>Archetype Created Web Application</display-name>
+ <welcome-file-list>
+ <welcome-file>test.jspx</welcome-file>
+ </welcome-file-list>
+ <jsp-config>
+ <jsp-property-group>
+ <url-pattern>*.jspx</url-pattern>
+ <trim-directive-whitespaces>true</trim-directive-whitespaces>
+ </jsp-property-group>
+ </jsp-config>
+ <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>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/component.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/component.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/component.css 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+.component {display: inline-block;display: block\9;width: 100%;}
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/filemanager.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/filemanager.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/filemanager.css 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+.in_filemanager {display: inline-block;display: block\9;width: 100%;}
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/stopka.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/stopka.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/stopka.css 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+.in_stopka {display: inline-block;display: block\9;width: 100%;}
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/subitem.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/subitem.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/system/styles/subitem.css 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1 @@
+.subitem {display: inline-block;display: block\9;width: 100%;}
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/test.jspx
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/test.jspx (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/stopka-ui-test/src/main/webapp/test.jspx 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,29 @@
+<stopka:page xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:stopka="http://stopka.us"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:utils="http://stopka.us/ui/utils">
+ <jsp:output xmlns:jsp="http://java.sun.com/JSP/Page" omit-xml-declaration="yes"/>
+ <c:set var="bannerType" scope="page" value="simple"/>
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
+ <head>
+ <title>StopKa filemanager</title>
+ <stopka:css file="system/styles/stopka.css" />
+ <utils:common-head-data/>
+ <stopka:css file="system/styles/filemanager.css" />
+ </head>
+ <body>
+ 12345678
+ qwertyui
+ <div class="component">
+ <div class="subitem">
+ </div>
+ </div>
+ <div class="article"/>
+ <div class="in_stopka">
+ </div>
+ <div class="in_filemanager">
+ </div>
+ </body>
+ </html>
+</stopka:page>
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/JstTextExtAllTests.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/JstTextExtAllTests.java 2011-12-07 00:16:02 UTC (rev 37031)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/JstTextExtAllTests.java 2011-12-07 01:20:34 UTC (rev 37032)
@@ -25,6 +25,11 @@
new String[]{"projects/OpenOnTest"},
new String[]{"OpenOnTest"}));
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(TaglibOpenOnTest.class),
+ "org.jboss.tools.jst.text.ext.test",
+ new String[]{"projects/stopka-ui-test"},
+ new String[]{"stopka-ui-test"}));
+
//$JUnit-END$
return suite;
}
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/TaglibOpenOnTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/TaglibOpenOnTest.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/TaglibOpenOnTest.java 2011-12-07 01:20:34 UTC (rev 37032)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.jst.text.ext.test;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.tld.ITaglibMapping;
+import org.jboss.tools.jst.web.tld.IWebProject;
+import org.jboss.tools.jst.web.tld.TaglibMapping;
+import org.jboss.tools.jst.web.tld.WebProjectFactory;
+import org.jboss.tools.jst.web.ui.editors.TLDCompoundEditor;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+public class TaglibOpenOnTest extends TestCase {
+ private static final String PROJECT_NAME = "stopka-ui-test";
+ private static final String PAGE_NAME = PROJECT_NAME+"/src/main/webapp/test.jspx";
+
+
+ public IProject project = null;
+
+ protected void setUp() {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ PROJECT_NAME);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+
+ XModelObject o = EclipseResourceUtil.createObjectForResource(project);
+ XModel model = o.getModel();
+ IWebProject wp = WebProjectFactory.instance.getWebProject(model);
+ TaglibMapping m = (TaglibMapping)wp.getTaglibMapping();
+ m.revalidate(WebAppHelper.getWebApp(model));
+ }
+
+ protected void tearDown() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+ }
+
+ public TaglibOpenOnTest() {
+ super("Taglib OpenOn test");
+ }
+
+ /**
+ * This method tests the case described in JBIDE-10302:
+ *
+ * EXECUTE: Open file stopka-ui-test\src\main\webapp\test.jspx
+ * EXECUTE: Invoke open-on at <utils:common-head-data/>
+ * where prefix is mapped to tag library uri "http://stopka.us/ui/utils"
+ * ASSERT: Resource 'utils.tld' is opened in TLD editor.
+ * EXECUTE: In opened TLD editor, invoke open-on at '/META-INF/tags/utils/common-head-data.tagx'
+ * located at xpath=taglib/tag-file/path/#text
+ * ASSERT: Resource 'common-head-data.tagx' is opened in VPE.
+ *
+ * @throws PartInitException
+ * @throws BadLocationException
+ */
+ public void testTaglibOpenOn() throws PartInitException, BadLocationException {
+ String editorName = "utils.tld";
+ HashSet<IEditorPart> openedEditors = new HashSet<IEditorPart>();
+
+ IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ if (editor != null) openedEditors.add(editor);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ try {
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IHyperlink[] links = findLinks(viewer, "utils:common-head-data", "utils:common-head-data");
+ IEditorPart resultEditor = findEditor(links, editorName, openedEditors);
+ assertNotNull("OpenOn have not opened "+editorName+" editor", resultEditor);
+
+ //Second openon.
+ TLDCompoundEditor tldEditor = (TLDCompoundEditor)((EditorPartWrapper)resultEditor).getEditor();
+ tldEditor.selectPageByName("Source");
+ viewer = tldEditor.getSourceEditor().getTextViewer();
+ links = findLinks(viewer, "path", "/META-INF/tags/utils/common-head-data.tagx");
+ editorName = "common-head-data.tagx";
+ resultEditor = findEditor(links, editorName, openedEditors);
+ assertNotNull("OpenOn have not opened "+editorName+" editor", resultEditor);
+ } finally {
+ closeEditors(openedEditors);
+ }
+ }
+
+ private IEditorPart findEditor(IHyperlink[] links, String editorName, Set<IEditorPart> openedEditors) {
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (resultEditor != null) openedEditors.add(resultEditor);
+ if(editorName.equals(resultEditor.getTitle())){
+ return resultEditor;
+ }
+ }
+ return null;
+ }
+
+ private IHyperlink[] findLinks(ISourceViewer viewer, String tagName, String valueToFind) throws BadLocationException {
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ tagName, true, true, false, false);
+ assertNotNull("Tag:"+tagName+" not found",reg);
+
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset(),
+ valueToFind, true, true, false, false);
+ assertNotNull("Value to find:"+valueToFind+" not found",reg);
+
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, true); // new Region(reg.getOffset() + reg.getLength(), 0)
+
+ assertTrue("Hyperlinks for value '"+valueToFind+"' are not found",(links != null && links.length > 0));
+
+ return links;
+ }
+
+ protected void closeEditors (HashSet<IEditorPart> editors) {
+ if (editors == null || editors.isEmpty())
+ return;
+ for (IEditorPart editor : editors) {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().closeEditor(editor, false);
+ }
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/TaglibOpenOnTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r37031 - trunk/jst/plugins/org.jboss.tools.jst.text.ext.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-06 19:16:02 -0500 (Tue, 06 Dec 2011)
New Revision: 37031
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/plugin.xml
Log:
JBIDE-10302
https://issues.jboss.org/browse/JBIDE-10302
TaglibDefinitionFilesHyperlinkPartitioner is registered for /taglib/tag-file/path.
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/plugin.xml 2011-12-07 00:14:24 UTC (rev 37030)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/plugin.xml 2011-12-07 00:16:02 UTC (rev 37031)
@@ -48,8 +48,16 @@
</axis>
<axis path="/facelet-taglib/attribute/type" >
</axis>
+ <axis path="/taglib/tag-file/path" >
+ </axis>
</partitionType>
</contentType>
+ <contentType id="org.eclipse.jst.jsp.core.tldsource">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/taglib/tag-file/path" >
+ </axis>
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<!--End of partiotioner for *.taglib.xml files -->
14 years