Author: vrubezhny
Date: 2008-02-12 12:49:59 -0500 (Tue, 12 Feb 2008)
New Revision: 6276
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/.classpath
trunk/trunk/org.jboss.tools.struts.text.ext.test/.project
trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/
trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/MANIFEST.MF
trunk/trunk/org.jboss.tools.struts.text.ext.test/build.properties
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.classpath
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.project
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jdt.core.prefs
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.component
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.jboss.tools.jst.web.xml
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/web.xml
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/StrutsTextExtAllTests.java
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/StrutsJbide1762Test.java
Log:
Share project 'org.jboss.tools.struts.text.ext.test' into
'https://svn.jboss.org/repos/jbosstools/trunk'
JUnit TestCase for JBIDE-1762
Added: trunk/trunk/org.jboss.tools.struts.text.ext.test/.classpath
===================================================================
--- trunk/trunk/org.jboss.tools.struts.text.ext.test/.classpath
(rev 0)
+++ trunk/trunk/org.jboss.tools.struts.text.ext.test/.classpath 2008-02-12 17:49:59 UTC
(rev 6276)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/trunk/org.jboss.tools.struts.text.ext.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/trunk/org.jboss.tools.struts.text.ext.test/.project
===================================================================
--- trunk/trunk/org.jboss.tools.struts.text.ext.test/.project (rev
0)
+++ trunk/trunk/org.jboss.tools.struts.text.ext.test/.project 2008-02-12 17:49:59 UTC (rev
6276)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.struts.text.ext.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/trunk/org.jboss.tools.struts.text.ext.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/MANIFEST.MF 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test
+Bundle-SymbolicName: org.jboss.tools.struts.text.ext.test
+Bundle-Version: 1.0.0
+Require-Bundle: org.junit,
+ org.jboss.tools.common.test,
+ org.jboss.tools.common.model.ui,
+ org.jboss.tools.tests,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.jface.text,
+ org.eclipse.wst.sse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.wst.sse.core,
+ org.jboss.tools.common.text.ext,
+ org.jboss.tools.jst.jsp,
+ org.jboss.tools.jst.jsp.test,
+ org.jboss.tools.jst.web
+Export-Package: org.jboss.tools.struts.text.tests
+
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/trunk/org.jboss.tools.struts.text.ext.test/build.properties
===================================================================
--- trunk/trunk/org.jboss.tools.struts.text.ext.test/build.properties
(rev 0)
+++ trunk/trunk/org.jboss.tools.struts.text.ext.test/build.properties 2008-02-12 17:49:59
UTC (rev 6276)
@@ -0,0 +1,3 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/trunk/org.jboss.tools.struts.text.ext.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.classpath
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.classpath
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.classpath 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_07"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
4.2 Runtime"/>
+ <classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.project
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.project
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.project 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>StrutsJbide1762Test</name>
+ <comment></comment>
+ <projects>
+ </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>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.struts.strutsnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jdt.core.prefs 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,7 @@
+#Tue Feb 12 15:59:42 MSK 2008
+eclipse.preferences.version=1
+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.source=1.5
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,4 @@
+#Tue Feb 12 15:59:44 MSK 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.5.0_07/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget\:\:JBoss\
4.2\ Runtime/owners=jst.web\:2.3
+eclipse.preferences.version=1
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.component 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="StrutsJbide1762Test">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+<property name="context-root" value="StrutsJbide1762Test"/>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.jboss.tools.jst.web.xml
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.jboss.tools.jst.web.xml
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.jboss.tools.jst.web.xml 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems VERSION="2.0.0"
application-name="StrutsJbide1762Test"
+ model-entity="FileSystems"
workspace-home="./WebContent/WEB-INF">
+ <file-system NAME="WEB-INF" location="%workspace.home%"
model-entity="FileSystemFolder"/>
+ <file-system NAME="WEB-ROOT" info="Content-Type=Web"
+ location="%workspace.home%/.."
model-entity="FileSystemFolder"/>
+ <file-system NAME="src"
location="%workspace.home%/../../JavaSource"
model-entity="FileSystemFolder"/>
+ <file-system NAME="classes" location="%workspace.home%/classes"
model-entity="FileSystemFolder"/>
+ <file-system NAME="build" location="%workspace.home%/../../ant"
model-entity="FileSystemFolder"/>
+ <file-system NAME="lib-common-annotations.jar" info="hidden=yes"
+ location="%workspace.home%/lib/common-annotations.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-beanutils.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-beanutils.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-collections.jar"
info="hidden=yes"
+ location="%workspace.home%/lib/commons-collections.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-digester.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-digester.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-fileupload.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-fileupload.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-lang.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-lang.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-logging.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-logging.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-validator.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-validator.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jakarta-oro.jar" info="hidden=yes"
+ location="%workspace.home%/lib/jakarta-oro.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jstl.jar" info="hidden=yes"
+ location="%workspace.home%/lib/jstl.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-standard.jar" info="hidden=yes"
+ location="%workspace.home%/lib/standard.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-struts-legacy.jar" info="hidden=yes"
+ location="%workspace.home%/lib/struts-legacy.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-struts.jar" info="hidden=yes"
+ location="%workspace.home%/lib/struts.jar"
model-entity="FileSystemJar"/>
+ <web SERVLET_VERSION="2.3" model-entity="JstWeb"
model-path="/web.xml">
+ <module URI="/WEB-INF/struts-config.xml"
model-entity="JstWebModule"
+ model-path="/struts-config.xml" src="src"
web-root="WEB-ROOT"/>
+ </web>
+</file-systems>
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/web.xml
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/web.xml
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/web.xml 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <display-name>StrutsJbide1762Test</display-name>
+ <!-- Action Servlet Configuration -->
+ <servlet>
+ <servlet-name>action</servlet-name>
+ <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
+ <init-param>
+ <param-name>config</param-name>
+ <param-value>/WEB-INF/struts-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Action Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>action</servlet-name>
+ <url-pattern>*.do</url-pattern>
+ </servlet-mapping>
+ <!-- The Usual Welcome File List -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <taglib>
+ <taglib-uri>/WEB-INF/struts-bean</taglib-uri>
+ <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
+ </taglib>
+ <taglib>
+ <taglib-uri>/WEB-INF/struts-logic</taglib-uri>
+ <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
+ </taglib>
+ <taglib>
+ <taglib-uri>/WEB-INF/struts-html</taglib-uri>
+ <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
+ </taglib>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/projects/StrutsJbide1762Test/WebContent/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/StrutsTextExtAllTests.java
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/StrutsTextExtAllTests.java
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/StrutsTextExtAllTests.java 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,16 @@
+package org.jboss.tools.struts.text.tests;
+
+import org.jboss.tools.struts.text.tests.hyperlink.StrutsJbide1762Test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class StrutsTextExtAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(StrutsTextExtAllTests.class.getName());
+ suite.addTest(StrutsJbide1762Test.suite());
+ return suite;
+ }
+
+}
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/StrutsTextExtAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/StrutsJbide1762Test.java
===================================================================
---
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/StrutsJbide1762Test.java
(rev 0)
+++
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/StrutsJbide1762Test.java 2008-02-12
17:49:59 UTC (rev 6276)
@@ -0,0 +1,208 @@
+package org.jboss.tools.struts.text.tests.hyperlink;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.hyperlink.HyperlinkManager;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetectorExtension2;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
+import org.jboss.tools.common.model.ui.texteditors.XMLTextEditorComponent;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.jst.jsp.contentassist.RedHatCustomCompletionProposal;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class StrutsJbide1762Test extends TestCase {
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "StrutsJbide1762Test";
+ private static final String WEB_XML_NAME = "/WebContent/WEB-INF/web.xml";
+ private static final String NODE_TO_FIND = "taglib-location";
+
+ public static Test suite() {
+ return new TestSuite(StrutsJbide1762Test.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.struts.text.ext.test",
null, PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ Throwable exception = null;
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null?
exception.getMessage() : ""), exception);
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testStrutsJbide1762 () {
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
+
+ IFile webXmlFile = project.getFile(WEB_XML_NAME);
+
+
+ assertTrue("The file \"" + WEB_XML_NAME + "\" is not
found", (webXmlFile != null));
+ assertTrue("The file \"" + WEB_XML_NAME + "\" is not
found", (webXmlFile.exists()));
+
+ FileEditorInput editorInput = new FileEditorInput(webXmlFile);
+ Throwable exception = null;
+ IEditorPart editorPart = null;
+ try {
+ editorPart =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput,
"org.jboss.tools.common.model.ui.editor.EditorPartWrapper");
+ } catch (PartInitException ex) {
+ exception = ex;
+ ex.printStackTrace();
+ assertTrue("The XML Editor couldn't be initialized.", false);
+ }
+
+ EditorPartWrapper wrapperEditor = null;
+
+ if (editorPart instanceof EditorPartWrapper)
+ wrapperEditor = (EditorPartWrapper)editorPart;
+
+ // Delay for 3 seconds so that
+ // the Favorites view can be seen.
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.", false);
+ }
+ TestUtil.delay(3000);
+
+// ITextEditor textEditor = TestUtil.getActiveTextEditor(wrapperEditor);
+ ITextEditor textEditor = getTextEditor(wrapperEditor);
+
+ XMLTextEditorComponent xmlTextEditor = null;
+
+ if (textEditor instanceof XMLTextEditorComponent) {
+ xmlTextEditor = (XMLTextEditorComponent)textEditor;
+ }
+
+// wrapperEditor.getJspEditor();
+ StructuredTextViewer viewer = xmlTextEditor.getTextViewer();
+ IDocument document = viewer.getDocument();
+ SourceViewerConfiguration config =
TestUtil.getSourceViewerConfiguration(xmlTextEditor);
+ IHyperlinkDetector[] hyperlinkDetectors = (config == null ? null :
config.getHyperlinkDetectors(viewer));
+
+ assertTrue("Cannot get the Hyperlink Detectors for the editor for page
\"" + WEB_XML_NAME + "\"", (hyperlinkDetectors != null));
+
+ List<Region> regions = findTextRegions(document, NODE_TO_FIND);
+
+ assertTrue("Cannot get the regions to test for the editor for page \"" +
WEB_XML_NAME + "\"", (regions != null && regions.size() > 0));
+
+ for (Region region : regions) {
+ IHyperlink hyperlink = null;
+ for (int i= 0; hyperlinkDetectors != null && i < hyperlinkDetectors.length;
i++) {
+ IHyperlinkDetector detector= hyperlinkDetectors[i];
+ if (detector == null)
+ continue;
+
+ IHyperlink[] hyperlinks= detector.detectHyperlinks(viewer, region, false);
+ if (hyperlinks == null)
+ continue;
+
+ Assert.isLegal(hyperlinks.length > 0);
+
+ hyperlink = hyperlinks[0];
+ }
+
+ assertTrue("No Hyperlink found for the text region starting at offset" +
region.getOffset() + ".", (hyperlink != null));
+ }
+
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.", false);
+ }
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeEditor(editorPart, false);
+ }
+
+ protected ITextEditor getTextEditor(IEditorPart editor) {
+ ITextEditor textEditor = null;
+ if (editor instanceof ITextEditor)
+ textEditor = (ITextEditor) editor;
+ if (textEditor == null && editor != null)
+ textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+ return textEditor;
+ }
+
+ List<Region> findTextRegions(IDocument document, String nodeName) {
+ List<Region> regions = new ArrayList<Region>();
+
+ String documentContent = document.get();
+
+ int index = 0;
+ while ((index = documentContent.indexOf("<" + nodeName, index)) != -1) {
+ int startNodeIndex = documentContent.indexOf(">", index);
+ if (startNodeIndex == -1) {
+ index = startNodeIndex;
+ continue;
+ }
+ startNodeIndex++;
+
+ int endNodeIndex = documentContent.indexOf("</" + nodeName,
startNodeIndex);
+ if (endNodeIndex == -1) {
+ index = startNodeIndex;
+ continue;
+ }
+
+// System.out.println("Posting the Test Regions: " +
documentContent.substring(startNodeIndex, endNodeIndex));
+ for (int j = startNodeIndex; j < endNodeIndex; j++) {
+ regions.add(new Region(j, 0));
+ }
+ index = documentContent.indexOf(">", endNodeIndex);
+ }
+
+ return regions;
+ }
+
+
+}
Property changes on:
trunk/trunk/org.jboss.tools.struts.text.ext.test/src/org/jboss/tools/struts/text/tests/hyperlink/StrutsJbide1762Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain