This commit was manufactured by cvs2svn to create tag 'v201111021744'.
diff --git a/tests/org.eclipse.wst.xsl.core.tests/.classpath b/tests/org.eclipse.wst.xsl.core.tests/.classpath
deleted file mode 100644
index bf37251..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.core.tests/.project b/tests/org.eclipse.wst.xsl.core.tests/.project
deleted file mode 100644
index cd1a756..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.core.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.core.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3e6ccbe..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Apr 11 09:57:20 BST 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
diff --git a/tests/org.eclipse.wst.xsl.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 5d9c911..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.core.tests
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.core.tests.XSLCoreTestsPlugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.0,2.0.0)",
- org.apache.xalan;bundle-version="[2.7.1,2.8.0)",
- org.junit;bundle-version="3.8.2"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.wst.xml.core.internal.validation.core
-Export-Package: org.eclipse.wst.xsl.core.tests;uses:="org.osgi.framework,junit.framework,org.eclipse.core.runtime",
- org.eclipse.wst.xsl.internal.core.tests;x-internal:=true
-Bundle-Localization: plugin
-Bundle-Vendor: %provider
diff --git a/tests/org.eclipse.wst.xsl.core.tests/about.html b/tests/org.eclipse.wst.xsl.core.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.core.tests/build.properties b/tests/org.eclipse.wst.xsl.core.tests/build.properties
deleted file mode 100644
index cc9a00a..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- projectfiles/,\
- bin/,\
- about.html,\
- plugin.properties
diff --git a/tests/org.eclipse.wst.xsl.core.tests/plugin.properties b/tests/org.eclipse.wst.xsl.core.tests/plugin.properties
deleted file mode 100644
index 6d0b51b..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.core.tests
-pluginName = XSL Core Tests Plug-in
-provider=Eclipse Web Tools Platform
diff --git a/tests/org.eclipse.wst.xsl.core.tests/pom.xml b/tests/org.eclipse.wst.xsl.core.tests/pom.xml
deleted file mode 100644
index fd04b6c..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.core.tests</artifactId>
- <version>1.0.300-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>XSLT Core Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <!-- <configuration> -->
- <!-- <testSuite>org.eclipse.wst.xml.xpath2.processor.tests</testSuite> -->
- <!-- <testClass>org.eclipse.wst.xml.xpath2.processor.test.AllPsychoPathTests</testClass> -->
- <!-- </configuration> -->
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20FunctionTest.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20FunctionTest.xsl
deleted file mode 100644
index 7493a0a..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20FunctionTest.xsl
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-
- <xsl:function name="func1">
-
- </xsl:function>
-
- <xsl:function name="func2">
-
- </xsl:function>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20Test.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20Test.xsl
deleted file mode 100644
index 0661940..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/XSLT20Test.xsl
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/circularref.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/circularref.xsl
deleted file mode 100644
index af5305f..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/circularref.xsl
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:include href="ref1.xsl"/>
-
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/exsltfunctionparm.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/exsltfunctionparm.xsl
deleted file mode 100644
index 37cfd88..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/exsltfunctionparm.xsl
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <func:function name="my:count-elements">
- <xsl:param name="param"/>
- <xsl:for-each select="(//*)[1]">
- <func:result select="count(//*)" />
- </xsl:for-each>
- </func:function>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/globalVariablesTest.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/globalVariablesTest.xsl
deleted file mode 100644
index 3ca1ee2..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/globalVariablesTest.xsl
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 243578 - initial API and implementation
- ******************************************************************************* -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xhtml="http://www.w3c.org/1999/xhtml"
- exclude-result-prefixes="xhtml">
-
- <xsl:variable name="globalVariable">
- This is a global variable
- </xsl:variable>
- When xsl:i
- <xsl:param name="selectParam" select="'1'"/>
- <xsl:param name="contentParam">Test</xsl:param>
-
- <xsl:template name="func1">
- <xsl:param name="p1" select="1"/>
- <xsl:param name="p2"/>
- <literal>Hello World</literal>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib1.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib1.xsl
deleted file mode 100644
index f393e6d..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib1.xsl
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- ******************************************************************************* -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:template name="existsInlib1Only">
- <xsl:param name="p1"></xsl:param>
- <literal>Hello World</literal>
- </xsl:template>
-
- <xsl:template name="existsInStyle1AndLib1">
- <xsl:param name="p1"></xsl:param>
- <literal>Hello World</literal>
- </xsl:template>
-
- <xsl:template name="existsInLib2">
- <xsl:param name="p1"></xsl:param>
- <literal>Hello World</literal>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib2.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib2.xsl
deleted file mode 100644
index b391214..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/lib2.xsl
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- ******************************************************************************* -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:template name="func1">
- <xsl:param name="p1" select="1"/>
- <xsl:param name="p2"/>
- <literal>Hello World</literal>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest.xsl
deleted file mode 100644
index 30930f0..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest.xsl
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:include href="modeTest2.xsl"/>
- <xsl:template match="/">
-
- </xsl:template>
- <xsl:template match="something" mode="mode1">
-
- </xsl:template>
- <xsl:template match="something" mode="mode2">
-
-
- </xsl:template>
- <xsl:template name="something" mode="mode1">
-
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest2.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest2.xsl
deleted file mode 100644
index 3458e49..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/modeTest2.xsl
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/" mode="mode3">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/npeparam.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/npeparam.xsl
deleted file mode 100644
index 3c515f7..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/npeparam.xsl
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 335273 - initial API and implementation
- ******************************************************************************* -->
-<xsl:stylesheet
- version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
- xmlns:redirect='http://xml.apache.org/xalan/redirect'
- extension-element-prefixes='redirect'
- exclude-result-prefixes='redirect'
->
- <xsl:output method="text" />
-
- <xsl:strip-space elements="*" />
-
- <xsl:template match="*" />
-
- <xsl:param name="outputDirectory" />
- <xsl:param name="parameterPackage"/>
-
- <xsl:template name="toConstant">
- <xsl:param name="camelCase" />
- <xsl:value-of select="translate(substring($camelCase, 1, 1),'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /><xsl:call-template name="toConstantInternal"><xsl:with-param name="camelCase" select="substring($camelCase,2)" /></xsl:call-template>
- </xsl:template>
-
- <xsl:template name="toConstantChar">
- <xsl:param name="character" />
- <xsl:choose>
- <xsl:when test="contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', $character)">_<xsl:value-of select="$character" /></xsl:when>
- <xsl:otherwise><xsl:value-of select="translate($character, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="toConstantInternal">
- <xsl:param name="camelCase" />
-
- <xsl:choose>
- <xsl:when test="$camelCase=''"></xsl:when>
- <xsl:otherwise><xsl:call-template name="toConstantChar"><xsl:with-param name="character" select="substring($camelCase, 1, 1)" /></xsl:call-template><xsl:call-template name="toConstantInternal"><xsl:with-param name="camelCase" select="substring($camelCase, 2)" /></xsl:call-template></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="/">/*
- * (C) Copyright 2007-2008 Redwood Technology B.V., Houten, The Netherlands
- *
- * This file is generated from redwood/scheduler/model/src/xml/ps-parameters.xml
- * Using $Id: npeparam.xsl,v 1.1 2011/01/28 15:06:19 dacarver Exp $
- */
-package <xsl:value-of select="$parameterPackage" />;
-
-public class ParameterConstants
-{<xsl:text />
- /* Parameter names */
- <xsl:for-each select="ProcessServerParameters/ProcessServerParameter"><xsl:text />
- <xsl:variable name="constantName">
- <xsl:call-template name="toConstant">
- <xsl:with-param name="camelCase" select="@name" />
- </xsl:call-template>
- </xsl:variable>
- /** <xsl:value-of select="description" /> */
- public static final String <xsl:value-of select="$constantName" /> = "<xsl:value-of select="@name" />";<xsl:text/>
- </xsl:for-each>
-
- /* Variable names for Java */
- <xsl:for-each select="ProcessServerParameters/Variables/variable"><xsl:text />
- <xsl:variable name="constantName">
- <xsl:call-template name="toConstant">
- <xsl:with-param name="camelCase" select="substring-after(@name, 'var')" />
- </xsl:call-template>
- </xsl:variable>
- /** <xsl:value-of select="description" /> */
- public static final String VAR_<xsl:value-of select="$constantName" /> = "<xsl:value-of select="substring-after(@name, 'var')" />";
- </xsl:for-each>
-
- /* Platform specific default constants for Java */
- <xsl:for-each select="ProcessServerParameters/ProcessServerParameter/platform[@language='java']"><xsl:text />
- /** <xsl:value-of select="description" /> */
- public static final String PAR_DEF_<xsl:value-of select="@constant" /> = "<xsl:value-of select="@value" />";
- </xsl:for-each>
-}<xsl:text />
- </xsl:template>
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/ref1.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/ref1.xsl
deleted file mode 100644
index d6f2be1..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/ref1.xsl
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:include href="circularref.xsl"/>
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/style1.xsl b/tests/org.eclipse.wst.xsl.core.tests/projectfiles/style1.xsl
deleted file mode 100644
index d9522dd..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/projectfiles/style1.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- ******************************************************************************* -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:import href="lib2.xsl" />
- <xsl:include href="lib1.xsl" />
-
- <xsl:template name="existsInStyle1Only">
- <xsl:param name="p1"></xsl:param>
- <literal>Hello World</literal>
- </xsl:template>
-
- <xsl:template name="existsInStyle1AndLib1"> <!-- ERROR: template existsInStyle1AndLib1 is included from lib1.xsl-->
- <xsl:param name="p1"></xsl:param>
- <literal>Hello World</literal>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/internal/utils/tests/TestXMLContentType.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/internal/utils/tests/TestXMLContentType.java
deleted file mode 100644
index d63405a..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/internal/utils/tests/TestXMLContentType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009,2010 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - bug 264788 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.utils.tests;
-
-import org.eclipse.wst.xsl.core.internal.util.XMLContentType;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-
-public class TestXMLContentType {
-
-
- @Test
- public void testGetFileExtensions() {
- XMLContentType xmlContentType = new XMLContentType();
- String[] exts = xmlContentType.getFileExtensions();
- assertTrue("Missing xslt extension.", findExtension("xslt", exts));
- assertTrue("Missing xml extension.", findExtension("xml", exts));
- assertTrue("Missing xsl extension.", findExtension("xsl", exts));
- assertTrue("Missing xmi extension.", findExtension("xmi", exts));
-
- }
-
- private boolean findExtension(String extension, String[] exts) {
- boolean foundsw = false;
- for (int i = 0; i < exts.length; i++) {
- if (extension.equalsIgnoreCase(exts[i])) {
- foundsw = true;
- }
- }
- return foundsw;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestSuite.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestSuite.java
deleted file mode 100644
index 79637b6..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestSuite.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.tests;
-
-
-import org.eclipse.wst.xsl.core.internal.utils.tests.TestXMLContentType;
-import org.eclipse.wst.xsl.internal.core.tests.TestIncludedTemplates;
-import org.eclipse.wst.xsl.internal.core.tests.TestStructuredTextPartitionerForXSL;
-import org.eclipse.wst.xsl.internal.core.tests.TestXSLCore;
-import org.eclipse.wst.xsl.internal.model.tests.TestStylesheet;
-import org.eclipse.wst.xsl.internal.model.tests.TestStylesheetModel;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({TestIncludedTemplates.class, TestXSLCore.class, TestStylesheet.class, TestStylesheetModel.class, TestXMLContentType.class,
- TestStructuredTextPartitionerForXSL.class})
-public class XSLCoreTestSuite {
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestsPlugin.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestsPlugin.java
deleted file mode 100644
index 0e14f35..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/core/tests/XSLCoreTestsPlugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class XSLCoreTestsPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.core.tests";
-
- // The shared instance
- private static XSLCoreTestsPlugin plugin;
-
- /**
- * The constructor
- */
- public XSLCoreTestsPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static XSLCoreTestsPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/AbstractValidationTest.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/AbstractValidationTest.java
deleted file mode 100644
index 4f81b4e..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/AbstractValidationTest.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.internal.core.tests;
-
-import java.io.IOException;
-import static org.junit.Assert.*;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.xpath.jaxp.XPathFactoryImpl;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationMessage;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidator;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.eclipse.wst.xsl.core.tests.XSLCoreTestsPlugin;
-import org.junit.Before;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * An abstract class to help with the testing. It reads an XSL file, runs the
- * validation on it, and then parses the document looking for comment nodes
- * where the comment starts with ERROR or WARN. For each comment node found, it
- * determines whether the validation found a corresponding error or warning at
- * the given comment node parent's line number. It also checks to make sure that
- * no unexpected errors/warnings are found (ones that don't have comment nodes).
- *
- * @author Doug Satchwell
- */
-public abstract class AbstractValidationTest {
- protected static IProject fTestProject;
- private static boolean fTestProjectInitialized;
- private static final String TEST_PROJECT_NAME = "testproject";
-
- @Before
- public void setUp() throws Exception {
- if (!fTestProjectInitialized) {
- getAndCreateProject();
-
- Bundle coreBundle = Platform
- .getBundle(XSLCoreTestsPlugin.PLUGIN_ID);
- Enumeration<String> e = coreBundle.getEntryPaths("/projectfiles");
- while (e.hasMoreElements()) {
- String path = e.nextElement();
- URL url = coreBundle.getEntry(path);
- if (!url.getFile().endsWith("/")) {
- String relativePath = path;
- url = FileLocator.resolve(url);
- path = path.substring("projectfiles".length());
- IFile destFile = fTestProject.getFile(path);
- if (url.toExternalForm().startsWith("jar:file")) {
- InputStream source = FileLocator.openStream(coreBundle,
- new Path(relativePath), false);
- if (destFile.exists()) {
- destFile.delete(true, new NullProgressMonitor());
- }
- destFile.create(source, true, new NullProgressMonitor());
- } else {
- // if resource is not compressed, link
- destFile.createLink(url.toURI(), IResource.REPLACE,
- new NullProgressMonitor());
- }
- }
- }
- }
-
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- fTestProjectInitialized = true;
- }
-
- protected IFile getFile(String path) {
- return fTestProject.getFile(new Path(path));
- }
-
- /**
- * Validate the file
- *
- * @param file
- * @return
- * @throws CoreException
- * @throws XPathExpressionException
- * @throws IOException
- */
- protected XSLValidationReport validate(IFile file) throws CoreException,
- XPathExpressionException, IOException {
- XSLValidationReport report = new XSLValidationReport(file
- .getLocationURI().toString());
- XSLValidator.getInstance().validate(file, report, true);
- StylesheetModel model = XSLCore.getInstance().getStylesheet(file);
- assertFalse("Stylesheet model is null", model == null);
- Map<Integer, String> expectedErrors = calculateErrorsAndWarnings(file);
- validateErrors(model, report, expectedErrors);
- return report;
- }
-
- private void validateErrors(StylesheetModel model,
- XSLValidationReport report, Map<Integer, String> expectedErrors) {
- expectedErrors = new HashMap<Integer, String>(expectedErrors);
- for (ValidationMessage msg : report.getValidationMessages()) {
- XSLValidationMessage error = (XSLValidationMessage) msg;
- assertTrue("Error report must be for the current stylesheet only",
- error.getNode().getStylesheet() == model.getStylesheet());
- String comment = expectedErrors.remove(error.getLineNumber());
- assertNotNull("Unxpected error at line " + error.getLineNumber()
- + ": " + error, comment);
- assertFalse(
- "Incorrect error level for error at line "
- + error.getLineNumber() + ": " + error,
- comment.startsWith("ERROR")
- && msg.getSeverity() != ValidationMessage.SEV_HIGH);
- assertFalse(
- "Incorrect error level for error at line "
- + error.getLineNumber() + ": " + error,
- comment.startsWith("WARN")
- && msg.getSeverity() == ValidationMessage.SEV_HIGH);
- }
- for (Map.Entry<Integer, String> entry : expectedErrors.entrySet()) {
- assertTrue("Expected error " + entry.getValue() + " at line "
- + entry.getKey(), false);
- }
- }
-
- private Map<Integer, String> calculateErrorsAndWarnings(IFile file)
- throws XPathExpressionException, IOException, CoreException {
- Map<Integer, String> expectedErrors = new HashMap<Integer, String>();
- IStructuredModel smodel = null;
- try {
- smodel = StructuredModelManager.getModelManager().getModelForRead(
- file);
- if (smodel != null && smodel instanceof IDOMModel) {
- IDOMModel model = (IDOMModel) smodel;
- XPathExpression xp = XPathFactory.newInstance().newXPath()
- .compile("//comment()");
- NodeList nodeSet = (NodeList) xp.evaluate(model.getDocument(),
- XPathConstants.NODESET);
- for (int i = 0; i < nodeSet.getLength(); i++) {
- Node commentNode = nodeSet.item(i);
- String comment = commentNode.getNodeValue().trim();
- if (comment.startsWith("ERROR")
- || comment.startsWith("WARN")) {
- IDOMNode parent = (IDOMNode) commentNode
- .getParentNode();
- int line = model.getStructuredDocument()
- .getLineOfOffset(parent.getStartOffset()) + 1;
- expectedErrors.put(line, comment);
- }
- }
- }
- } finally {
- if (smodel != null)
- smodel.releaseFromRead();
- }
- return expectedErrors;
- }
-
- private static void getAndCreateProject() throws CoreException {
- IWorkspace workspace = getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- fTestProject = root.getProject(TEST_PROJECT_NAME);
-
- createProject(fTestProject, null, null);
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- assertTrue(fTestProject.exists());
- }
-
- private static void createProject(IProject project, IPath locationPath,
- IProgressMonitor monitor) throws CoreException {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- monitor.beginTask("creating test project", 10);
- // create the project
- try {
- if (!project.exists()) {
- IProjectDescription desc = project.getWorkspace()
- .newProjectDescription(project.getName());
- if (Platform.getLocation().equals(locationPath)) {
- locationPath = null;
- }
- desc.setLocation(locationPath);
- project.create(desc, monitor);
- monitor = null;
- }
- if (!project.isOpen()) {
- project.open(monitor);
- monitor = null;
- }
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestIncludedTemplates.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestIncludedTemplates.java
deleted file mode 100644
index 8a08ced..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestIncludedTemplates.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.core.tests;
-
-import org.junit.Test;
-
-public class TestIncludedTemplates extends AbstractValidationTest {
-
- @Test
- public void test1() throws Exception {
- validate(getFile("style1.xsl"));
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestStructuredTextPartitionerForXSL.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestStructuredTextPartitionerForXSL.java
deleted file mode 100644
index 688129e..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestStructuredTextPartitionerForXSL.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.core.tests;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import static org.junit.Assert.*;
-import org.eclipse.wst.xsl.core.internal.text.rules.StructuredTextPartitionerForXSL;
-import org.junit.Test;
-
-public class TestStructuredTextPartitionerForXSL {
-
- @Test
- public void testXSLNewInstance() {
- StructuredTextPartitionerForXSL textPartioner = new StructuredTextPartitionerForXSL();
- IDocumentPartitioner documentPartitioner = textPartioner.newInstance();
- assertTrue("Did not retrieve StructuredTextPartitionerForXSL", documentPartitioner instanceof StructuredTextPartitionerForXSL);
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestXSLCore.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestXSLCore.java
deleted file mode 100644
index d7400b3..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/core/tests/TestXSLCore.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.wst.xsl.internal.core.tests;
-
-
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestXSLCore {
-
- @Test
- public void testisXSLNamespaceNullFalse() {
- assertFalse(XSLCore.isXSLNamespace(null));
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/AbstractModelTest.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/AbstractModelTest.java
deleted file mode 100644
index 21a8a22..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/AbstractModelTest.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (Intalio) - convert to Junit 4 - bug 313510
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.internal.model.tests;
-
-import java.io.IOException;
-import static org.junit.Assert.*;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-
-import org.apache.xpath.jaxp.XPathFactoryImpl;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationMessage;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidator;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.eclipse.wst.xsl.core.tests.XSLCoreTestsPlugin;
-import org.junit.After;
-import org.junit.Before;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * An abstract class to help with the testing.
- * It reads an XSL file, runs the validation on it, and then parses the document looking for comment nodes where the comment starts with ERROR or WARN.
- * For each comment node found, it determines whether the validation found a corresponding error or warning at the given comment node parent's line number.
- * It also checks to make sure that no unexpected errors/warnings are found (ones that don't have comment nodes).
- *
- * @author Doug Satchwell
- */
-public abstract class AbstractModelTest
-{
- protected static IProject fTestProject;
- private static boolean fTestProjectInitialized;
- private static final String TEST_PROJECT_NAME = "testproject";
-
- @Before
- public void setUp() throws Exception {
- if (!fTestProjectInitialized) {
- getAndCreateProject();
-
- Bundle coreBundle = Platform
- .getBundle(XSLCoreTestsPlugin.PLUGIN_ID);
- Enumeration<String> e = coreBundle.getEntryPaths("/projectfiles");
- while (e.hasMoreElements()) {
- String path = e.nextElement();
- URL url = coreBundle.getEntry(path);
- if (!url.getFile().endsWith("/")) {
- String relativePath = path;
- url = FileLocator.resolve(url);
- path = path.substring("projectfiles".length());
- IFile destFile = fTestProject.getFile(path);
- if (url.toExternalForm().startsWith("jar:file")) {
- InputStream source = FileLocator.openStream(coreBundle,
- new Path(relativePath), false);
- if (destFile.exists()) {
- destFile.delete(true, new NullProgressMonitor());
- }
- destFile.create(source, true, new NullProgressMonitor());
- } else {
- // if resource is not compressed, link
- destFile.createLink(url.toURI(), IResource.REPLACE,
- new NullProgressMonitor());
- }
- }
- }
- }
-
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- fTestProjectInitialized = true;
- }
-
-
- @After
- public void tearDown() throws Exception {
- StylesheetBuilder builder = StylesheetBuilder.getInstance();
- builder.release();
- }
-
-
- protected IFile getFile(String path)
- {
- return fTestProject.getFile(new Path(path));
- }
-
- /**
- * Validate the file
- *
- * @param file
- * @return
- * @throws CoreException
- * @throws XPathExpressionException
- * @throws IOException
- */
- protected XSLValidationReport validate(IFile file) throws CoreException, XPathExpressionException, IOException
- {
- XSLValidationReport report = new XSLValidationReport(file.getLocationURI().toString());
- XSLValidator.getInstance().validate(file,report,true);
- StylesheetModel model = XSLCore.getInstance().getStylesheet(file);
- assertFalse("Stylesheet model is null",model == null);
- Map<Integer,String> expectedErrors = calculateErrorsAndWarnings(file);
- validateErrors(model,report,expectedErrors);
- return report;
- }
-
- private void validateErrors(StylesheetModel model, XSLValidationReport report, Map<Integer,String> expectedErrors)
- {
- expectedErrors = new HashMap<Integer, String>(expectedErrors);
- for (ValidationMessage msg : report.getValidationMessages())
- {
- XSLValidationMessage error = (XSLValidationMessage)msg;
- assertTrue("Error report must be for the current stylesheet only", error.getNode().getStylesheet() == model.getStylesheet());
- String comment = expectedErrors.remove(error.getLineNumber());
- assertNotNull("Unxpected error at line "+error.getLineNumber()+": "+error,comment);
- assertFalse("Incorrect error level for error at line "+error.getLineNumber()+": "+error,comment.startsWith("ERROR") && msg.getSeverity() != ValidationMessage.SEV_HIGH);
- assertFalse("Incorrect error level for error at line "+error.getLineNumber()+": "+error,comment.startsWith("WARN") && msg.getSeverity() == ValidationMessage.SEV_HIGH);
- }
- for (Map.Entry<Integer, String> entry : expectedErrors.entrySet())
- {
- assertTrue("Expected error "+entry.getValue()+" at line "+entry.getKey(), false);
- }
- }
-
- private Map<Integer,String> calculateErrorsAndWarnings(IFile file) throws XPathExpressionException, IOException, CoreException
- {
- Map<Integer,String> expectedErrors = new HashMap<Integer,String>();
- IStructuredModel smodel = null;
- try
- {
- smodel = StructuredModelManager.getModelManager().getModelForRead(file);
- if (smodel != null && smodel instanceof IDOMModel)
- {
- IDOMModel model = (IDOMModel) smodel;
- XPathExpression xp = XPathFactory.newInstance().newXPath().compile("//comment()");
- NodeList nodeSet = (NodeList)xp.evaluate(model.getDocument(), XPathConstants.NODESET);
- for (int i=0; i<nodeSet.getLength(); i++)
- {
- Node commentNode = nodeSet.item(i);
- String comment = commentNode.getNodeValue().trim();
- if (comment.startsWith("ERROR") || comment.startsWith("WARN"))
- {
- IDOMNode parent = (IDOMNode)commentNode.getParentNode();
- int line = model.getStructuredDocument().getLineOfOffset(parent.getStartOffset()) + 1;
- expectedErrors.put(line,comment);
- }
- }
- }
- }
- finally
- {
- if (smodel != null)
- smodel.releaseFromRead();
- }
- return expectedErrors;
- }
-
- private static void getAndCreateProject() throws CoreException
- {
- IWorkspace workspace = getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- fTestProject = root.getProject(TEST_PROJECT_NAME);
-
- createProject(fTestProject, null, null);
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- assertTrue(fTestProject.exists());
- }
-
- private static void createProject(IProject project, IPath locationPath, IProgressMonitor monitor) throws CoreException
- {
- if (monitor == null)
- {
- monitor = new NullProgressMonitor();
- }
- monitor.beginTask("creating test project", 10);
- // create the project
- try
- {
- if (!project.exists())
- {
- IProjectDescription desc = project.getWorkspace().newProjectDescription(project.getName());
- if (Platform.getLocation().equals(locationPath))
- {
- locationPath = null;
- }
- desc.setLocation(locationPath);
- project.create(desc, monitor);
- monitor = null;
- }
- if (!project.isOpen())
- {
- project.open(monitor);
- monitor = null;
- }
- }
- finally
- {
- if (monitor != null)
- {
- monitor.done();
- }
- }
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace()
- {
- return ResourcesPlugin.getWorkspace();
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheet.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheet.java
deleted file mode 100644
index 188e91f..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheet.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package org.eclipse.wst.xsl.internal.model.tests;
-
-import java.util.List;
-import static org.junit.Assert.*;
-
-import java.util.Map;
-
-import org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder;
-import org.eclipse.wst.xsl.core.model.Function;
-import org.eclipse.wst.xsl.core.model.Import;
-import org.eclipse.wst.xsl.core.model.Include;
-import org.eclipse.wst.xsl.core.model.Stylesheet;
-import org.eclipse.wst.xsl.core.model.Template;
-import org.eclipse.wst.xsl.core.model.Variable;
-import org.eclipse.wst.xsl.core.model.XSLAttribute;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestStylesheet extends AbstractModelTest {
- StylesheetBuilder builder = null;
-
- public TestStylesheet() {
- // TODO Auto-generated constructor stub
- }
-
- @Before
- @Override
- public void setUp() throws Exception {
- super.setUp();
- builder = StylesheetBuilder.getInstance();
- }
-
- @After
- @Override
- public void tearDown() throws Exception {
- super.tearDown();
- builder.release();
- }
-
- @Test
- public void testLoadModel() {
- Stylesheet model = builder.getStylesheet(getFile("style1.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", model);
- }
-
- @Test
- public void testgetLocalTemplatesTemplates() {
- Stylesheet model = builder.getStylesheet(getFile("style1.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", model);
-
- List<Template> templatesList = model.getTemplates();
- assertEquals("Wrong number of templates returned.", 2, templatesList
- .size());
- }
-
- @Test
- public void testGetIncludes() {
- Stylesheet stylesheet = builder.getStylesheet(getFile("style1.xsl"),
- false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- List<Include> includeList = stylesheet.getIncludes();
- assertEquals("Wrong number of includes returned.", 1, includeList
- .size());
- }
-
- @Test
- public void testGetImports() {
- Stylesheet stylesheet = builder.getStylesheet(getFile("style1.xsl"),
- false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- List<Import> includeList = stylesheet.getImports();
- assertEquals("Wrong number of includes returned.", 1, includeList
- .size());
-
- }
-
- @Test
- public void testGetGlobalVariables() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("globalVariablesTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- List<Variable> globalVariablesList = stylesheet.getGlobalVariables();
- assertEquals("Wrong number of global variables returned.", 3,
- globalVariablesList.size());
- }
-
- @Test
- public void testGetLineNumber() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("globalVariablesTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
- // Line Number is off by 1 from what is displayed in the Editor
- assertEquals("Incorrect line number.", 12, stylesheet.getLineNumber());
- }
-
- @Test
- public void testGetColumnNumber() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("globalVariablesTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
- // Line Number is off by 1 from what is displayed in the Editor
- assertEquals("Incorrect column number.", 0, stylesheet
- .getColumnNumber());
- }
-
- @Test
- public void testGetVersion() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("globalVariablesTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- // Line Number is off by 1 from what is displayed in the Editor
- assertEquals("Wrong version number returned.", "1.0", stylesheet
- .getVersion());
- }
-
- @Test
- public void testXSLT2GetVersion() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("XSLT20Test.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
- // Line Number is off by 1 from what is displayed in the Editor
- assertEquals("Wrong version number returned.", "2.0", stylesheet
- .getVersion());
- }
-
- @Test
- public void testGetAttributes() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("globalVariablesTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- Map<String, XSLAttribute> attributeList = stylesheet.getAttributes();
- assertEquals("Incorrect number of attributes", 4, attributeList.size());
- XSLAttribute attribute = stylesheet
- .getAttribute("exclude-result-prefixes");
- assertEquals("Wrong attribute returned:", "exclude-result-prefixes",
- attribute.getName());
-
- }
-
- @Test
- public void testGetFunction() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("XSLT20FunctionTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- List<Function> functionList = stylesheet.getFunctions();
- assertEquals("Wrong number of global variables returned.", 2,
- functionList.size());
- }
-
- @Test
- public void testGetFunctionFunc1() {
- Stylesheet stylesheet = builder.getStylesheet(
- getFile("XSLT20FunctionTest.xsl"), false);
- assertNotNull("Model failed to load, returned NULL", stylesheet);
-
- List<Function> functionList = stylesheet.getFunctions();
- for (Function function : functionList) {
- if (function.getName().equals("func1")) {
- return;
- }
- }
- fail("Did not find XSL func func1");
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheetModel.java b/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheetModel.java
deleted file mode 100644
index 47eace6..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/src/org/eclipse/wst/xsl/internal/model/tests/TestStylesheetModel.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.wst.xsl.internal.model.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.eclipse.wst.xsl.core.model.Template;
-import org.eclipse.wst.xsl.core.model.XSLAttribute;
-import org.junit.After;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestStylesheetModel extends AbstractModelTest {
- private StylesheetModel model = null;
- public TestStylesheetModel() {
-
- }
-
- @After
- @Override
- public void tearDown() throws Exception {
- super.tearDown();
- StylesheetBuilder builder = StylesheetBuilder.getInstance();
- builder.release();
- model = null;
- }
-
- @Test
- public void testStyleSheetModel() {
-
- model = XSLCore.getInstance().getStylesheet(getFile("globalVariablesTest.xsl"));
- assertNotNull("Failed to load stylesheet 'globalVariablesTest.xsl'.", model);
- model = XSLCore.getInstance().getStylesheet(getFile("style1.xsl"));
- assertNotNull("Failed to load stylesheet 'style1.xsl'.", model);
- model = XSLCore.getInstance().getStylesheet(getFile("XSLT20Test.xsl"));
- assertNotNull("Failed to load stylesheet 'XSLT20Test.xsl'.", model);
- model = XSLCore.getInstance().getStylesheet(getFile("circularref.xsl"));
- assertNotNull("Failed to load stylesheet 'circularref.xsl'.", model);
- model = XSLCore.getInstance().getStylesheet(getFile("modeTest.xsl"));
- assertNotNull("Failed to load stylesheet 'modeTest.xsl'.", model);
-
- }
-
- @Test
- public void testFindAvailableTemplateModes() {
- ArrayList<String> modes = new ArrayList();
- model = XSLCore.getInstance().getStylesheet(getFile("modeTest.xsl"));
- List<Template> templates = model.getTemplates();
- assertTrue("No templates returned.", templates.size() > 0);
-
- for (Template template : templates) {
- XSLAttribute attribute = template.getAttribute("mode");
- if (attribute != null) {
- if (modes.indexOf(attribute.getValue()) == -1 ) {
- modes.add(attribute.getValue());
- }
- }
- }
- assertEquals("Wrong number of mode templates returned.", 3, modes.size());
- }
-
- @Test
- public void testCircularReference() {
- model = XSLCore.getInstance().getStylesheet(getFile("circularref.xsl"));
- assertTrue("Undettected circular reference", model.hasCircularReference());
- }
-
- @Test
- public void testNoCircularReference() {
- model = XSLCore.getInstance().getStylesheet(getFile("modeTest.xsl"));
- assertFalse("Undettected circular reference", model.hasCircularReference());
- }
-
- @Test
- public void testLoadStylesheetWithEXSLTFuncs() throws Exception {
- model = XSLCore.getInstance().getStylesheet(getFile("exsltfunctionparm.xsl"));
- }
-
- @Test
- public void testNPEOnParmParsing() throws Exception {
- model = XSLCore.getInstance().getStylesheet(getFile("exsltfunctionparm.xsl"));
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.core.tests/test.xml b/tests/org.eclipse.wst.xsl.core.tests/test.xml
deleted file mode 100644
index f4cd65d..0000000
--- a/tests/org.eclipse.wst.xsl.core.tests/test.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
-
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.wst.xsl.core.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xsl.core.tests.XSLCoreTestSuite" />
- <property
- name="testType"
- value="core-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
-
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/.classpath b/tests/org.eclipse.wst.xsl.exslt.core.tests/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/.project b/tests/org.eclipse.wst.xsl.exslt.core.tests/.project
deleted file mode 100644
index e5fcacf..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.exslt.core.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.exslt.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 68a0109..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Fri Sep 25 22:47:34 GMT 2009
-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.source=1.5
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.exslt.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index f0222fb..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.exslt.core.tests
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.exslt.core.tests.EXSLTCoreTestsPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.junit;bundle-version="3.8.2",
- org.eclipse.wst.xsl.exslt.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.wst.xsl.exslt.core.internal.resolver.tests;x-internal:=true,
- org.eclipse.wst.xsl.exslt.core.tests
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/about.html b/tests/org.eclipse.wst.xsl.exslt.core.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/build.properties b/tests/org.eclipse.wst.xsl.exslt.core.tests/build.properties
deleted file mode 100644
index b295972..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = plugin.properties,\
- src/,\
- build.properties,\
- about.html
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/plugin.properties b/tests/org.eclipse.wst.xsl.exslt.core.tests/plugin.properties
deleted file mode 100644
index e19afdf..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.core.tests
-pluginName = EXSLT Core Plugin Tests
-providerName = Eclipse.org
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/pom.xml b/tests/org.eclipse.wst.xsl.exslt.core.tests/pom.xml
deleted file mode 100644
index fe8b73b..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/pom.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.exslt.core.tests</artifactId>
- <version>1.0.100-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>EXSLT Core Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/internal/resolver/tests/EXSLTResolverTest.java b/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/internal/resolver/tests/EXSLTResolverTest.java
deleted file mode 100644
index 34b7367..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/internal/resolver/tests/EXSLTResolverTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.wst.xsl.exslt.core.internal.resolver.tests;
-
-import org.eclipse.wst.xsl.exslt.core.internal.EXSLTCore;
-import org.eclipse.wst.xsl.exslt.core.internal.resolver.EXSLTResolverExtension;
-
-import org.junit.*;
-import static org.junit.Assert.*;
-
-public class EXSLTResolverTest {
-
- private EXSLTResolverExtension resolver = null;
-
- @Before
- public void setUp() throws Exception {
- resolver = new EXSLTResolverExtension();
- }
-
- @After
- public void tearDown() throws Exception {
- resolver = null;
- }
-
-
- @Test
- public void testCommonNamespace() {
- String namespace = EXSLTCore.EXSLT_COMMON_NAMESPACE;
- String uri = resolver.resolve(null, null, namespace, null);
- assertTrue("Did not find http://exslt.org/common", uri.contains("/schemas/common.xsd"));
- }
-
- @Test
- public void testURINotResolved() {
- String namespace = "http://www.example.org/";
- String uri = resolver.resolve(null, null, namespace, null);
- assertNull("Found http://www.example.org/", uri);
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestSuite.java b/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestSuite.java
deleted file mode 100644
index 8b4c823..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.exslt.core.tests;
-
-import org.eclipse.wst.xsl.exslt.core.internal.resolver.tests.EXSLTResolverTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( {EXSLTResolverTest.class })
-public class EXSLTCoreTestSuite{
-
-}
diff --git a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestsPlugin.java b/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestsPlugin.java
deleted file mode 100644
index 24ca31d..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.core.tests/src/org/eclipse/wst/xsl/exslt/core/tests/EXSLTCoreTestsPlugin.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.wst.xsl.exslt.core.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class EXSLTCoreTestsPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.exslt.core.tests";
-
- // The shared instance
- private static EXSLTCoreTestsPlugin plugin;
-
- /**
- * The constructor
- */
- public EXSLTCoreTestsPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static EXSLTCoreTestsPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.classpath b/tests/org.eclipse.wst.xsl.exslt.ui.tests/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.project b/tests/org.eclipse.wst.xsl.exslt.ui.tests/.project
deleted file mode 100644
index 764cf04..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.exslt.ui.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.exslt.ui.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0e4db94..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Sep 29 21:42:00 GMT 2009
-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.source=1.5
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.exslt.ui.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index a92469a..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.exslt.ui.tests
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.exslt.ui.tests.EXSLTUITestsPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.wst.xsl.ui.tests;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xsl.exslt.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.junit;bundle-version="4.8.1",
- org.eclipse.wst.xsd.core;bundle-version="1.1.0",
- org.eclipse.wst.standard.schemas;bundle-version="1.0.0",
- org.eclipse.wst.xsd.ui;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.wst.xsl.exslt.ui.internal.contentassist.test;x-internal:=true,
- org.eclipse.wst.xsl.exslt.ui.tests
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/about.html b/tests/org.eclipse.wst.xsl.exslt.ui.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/build.properties b/tests/org.eclipse.wst.xsl.exslt.ui.tests/build.properties
deleted file mode 100644
index 791c326..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- projectfiles/,\
- bin/,\
- plugin.properties,\
- about.html
-src.includes = projectfiles/,\
- about.html
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/plugin.properties b/tests/org.eclipse.wst.xsl.exslt.ui.tests/plugin.properties
deleted file mode 100644
index 327883b..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.core.tests
-pluginName = EXSLT UI Plugin Tests
-providerName = Eclipse.org
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/pom.xml b/tests/org.eclipse.wst.xsl.exslt.ui.tests/pom.xml
deleted file mode 100644
index 3409c19..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.exslt.ui.tests</artifactId>
- <version>1.0.100-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>EXSLT UI Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <useUIHarness>true</useUIHarness>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonElements.xsl b/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonElements.xsl
deleted file mode 100644
index 6e1421c..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonElements.xsl
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:common="http://exslt.org/common"
- extension-element-prefixes="common">
- <xsl:template match="/">
-
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonXpathFunctions.xsl b/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonXpathFunctions.xsl
deleted file mode 100644
index 9d8dbae..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/projectfiles/commonXpathFunctions.xsl
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:common="http://exslt.org/common"
- extension-element-prefixes="common">
- <xsl:template match="/">
- <xsl:if test="">
-
- </xsl:if>
- <xsl:value-of select=""/>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/internal/contentassist/test/EXSLTCommonContentAssistTest.java b/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/internal/contentassist/test/EXSLTCommonContentAssistTest.java
deleted file mode 100644
index 12f7784..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/internal/contentassist/test/EXSLTCommonContentAssistTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.exslt.ui.internal.contentassist.test;
-
-import java.io.File;
-import static org.junit.Assert.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.xsl.exslt.ui.internal.contentassist.EXSLTCommonContentAssistProcessor;
-import org.eclipse.wst.xsl.exslt.ui.tests.EXSLTUITestsPlugin;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class EXSLTCommonContentAssistTest extends AbstractSourceViewerTest {
-
- @Override
- @Before
- public void setUp() throws Exception {
- if (!fTestProjectInitialized) {
- setupTestProjectFiles(EXSLTUITestsPlugin.PLUGIN_ID);
-
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- fTestProjectInitialized = true;
- }
- }
-
- @After
- @Override
- public void tearDown() {
-
- }
-
- @Test
- public void testDocumentElementPropsoalAvailable() throws Exception {
- fileName = "commonElements.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- try {
- ICompletionProposal[] proposals = getXMLProposals(5, 9);
- assertNotNull("Did not find proposals.", proposals);
-
- for (ICompletionProposal proposal : proposals) {
- if (proposal.getDisplayString().equals("common:document")) {
- return;
- }
- }
- } finally {
- model.releaseFromEdit();
- }
-
- fail("Did not find EXSLT Commond document element in proposal list.");
- }
-
- @Test
- public void testNodeSetFunctionExists() throws Exception {
- fileName = "commonXpathFunctions.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- try {
- ICompletionProposal[] proposals = getProposals(5, 23);
- assertNotNull("Did not find proposals.", proposals);
-
- for (ICompletionProposal proposal : proposals) {
- if (proposal.getDisplayString().equals("common:node-set( )")) {
- return;
- }
- }
- } finally {
- model.releaseFromEdit();
- }
-
- fail("Did not find EXSLT Common node-set function in test attribute proposal list.");
-
- }
-
- @Test
- public void testNodeSetFunctionExistsSelect() throws Exception {
- fileName = "commonXpathFunctions.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- try {
- ICompletionProposal[] proposals = getProposals(8, 31);
- assertNotNull("Did not find proposals.", proposals);
-
- for (ICompletionProposal proposal : proposals) {
- if (proposal.getDisplayString().equals("common:node-set( )")) {
- return;
- }
- }
- } finally {
- model.releaseFromEdit();
- }
-
- fail("Did not find EXSLT Common node-set function in select attribute proposal list.");
-
- }
-
- @Test
- public void testObjectTypeFunctionExistsSelect() throws Exception {
- fileName = "commonXpathFunctions.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- try {
- ICompletionProposal[] proposals = getProposals(8, 31);
- assertNotNull("Did not find proposals.", proposals);
-
- for (ICompletionProposal proposal : proposals) {
- if (proposal.getDisplayString().equals("common:object-type( )")) {
- return;
- }
- }
- } finally {
- model.releaseFromEdit();
- }
-
- fail("Did not find EXSLT Common node-set function in select attribute proposal list.");
-
- }
-
- @Override
- protected ICompletionProposal[] getProposals(int lineNumber,
- int numberOfCharacters) throws BadLocationException {
- int offset = calculateOffset(lineNumber, numberOfCharacters);
- return new EXSLTCommonContentAssistProcessor()
- .computeCompletionProposals(sourceViewer, offset);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestSuite.java b/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestSuite.java
deleted file mode 100644
index b7070cc..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestSuite.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.exslt.ui.tests;
-
-import org.eclipse.wst.xsl.exslt.ui.internal.contentassist.test.EXSLTCommonContentAssistTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( {EXSLTCommonContentAssistTest.class })
-public class EXSLTUITestSuite{
-
-}
diff --git a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestsPlugin.java b/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestsPlugin.java
deleted file mode 100644
index 0800a3a..0000000
--- a/tests/org.eclipse.wst.xsl.exslt.ui.tests/src/org/eclipse/wst/xsl/exslt/ui/tests/EXSLTUITestsPlugin.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.exslt.ui.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class EXSLTUITestsPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.exslt.ui.tests";
-
- // The shared instance
- private static EXSLTUITestsPlugin plugin;
-
- /**
- * The constructor
- */
- public EXSLTUITestsPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static EXSLTUITestsPlugin getDefault() {
- return plugin;
- }
-
- public static URL getInstallLocation() {
- URL installLocation = Platform.getBundle(PLUGIN_ID).getEntry("/");
- URL resolvedLocation = null;
- try {
- resolvedLocation = FileLocator.resolve(installLocation);
- }
- catch (IOException e) {
- // impossibl
- throw new Error(e);
- }
- return resolvedLocation;
- }
-
- public static File getTestFile(String filepath) {
- URL installURL = getInstallLocation();
- //String scheme = installURL.getProtocol();
- String path = installURL.getPath();
- String location = path + filepath;
- File result = new File(location);
- return result;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.classpath b/tests/org.eclipse.wst.xsl.jaxp.debug.test/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.project b/tests/org.eclipse.wst.xsl.jaxp.debug.test/.project
deleted file mode 100644
index 55b9784..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.jaxp.debug.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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.jaxp.debug.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bcfcf13..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sat Jan 02 15:05:07 GMT-05:00 2010
-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.source=1.5
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.jaxp.debug.test/META-INF/MANIFEST.MF
deleted file mode 100644
index b43f83a..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.wst.xsl.jaxp.debug.test
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.jaxp.debug.test.JAXPDebugTestPlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.xml.resolver;bundle-version="1.1.0",
- org.apache.xerces;bundle-version="2.9.0",
- org.apache.xalan;bundle-version="2.7.1",
- org.eclipse.wst.xsl.jaxp.debug;bundle-version="1.0.100",
- org.junit;bundle-version="4.8.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.wst.xsl.jaxp.debug.invoker.test,
- org.eclipse.wst.xsl.jaxp.debug.test
-Bundle-Vendor: %Bundle-Vendor
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/OSGI-INF/l10n/bundle.properties b/tests/org.eclipse.wst.xsl.jaxp.debug.test/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index ef1e7f7..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.jaxp.debug.test
-Bundle-Vendor = Eclipse Web Tools Platform
-Bundle-Name = JAXP Debug Tests
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/about.html b/tests/org.eclipse.wst.xsl.jaxp.debug.test/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/build.properties b/tests/org.eclipse.wst.xsl.jaxp.debug.test/build.properties
deleted file mode 100644
index 0565497..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- OSGI-INF/
-src.includes = about.html
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/pom.xml b/tests/org.eclipse.wst.xsl.jaxp.debug.test/pom.xml
deleted file mode 100644
index ce893b9..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.jaxp.debug.tests</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>JAXP Debug Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <useUIHarness>true</useUIHarness>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-input.xml b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-input.xml
deleted file mode 100644
index 5757dde..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-input.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root>
- <element attribute="yes"/>
-</root>
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-transform.xsl b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-transform.xsl
deleted file mode 100644
index 36af48c..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/1-transform.xsl
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="//root">
- <root-out/>
- </xsl:template>
-</xsl:stylesheet>
-
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/PipelineDefintionTest.java b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/PipelineDefintionTest.java
deleted file mode 100644
index 559da6c..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/PipelineDefintionTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Intalio Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (Intalio) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.test;
-
-import java.util.List;
-
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TypedValue;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-
-public class PipelineDefintionTest {
- PipelineDefinition pldef = null;
-
- @Before
- public void setUp() throws Exception {
- pldef = new PipelineDefinition();
- }
-
- @After
- public void tearDown() throws Exception {
- pldef = null;
- }
-
- @Test
- public void testAddTransformDefinition() throws Exception {
- setupTransformDefinition();
- List<TransformDefinition> tdefs = pldef.getTransformDefs();
- assertNotNull(tdefs);
- assertEquals("Did not find expected transformation defs", 1, tdefs.size());
- }
-
- private TransformDefinition setupTransformDefinition() {
- TransformDefinition tdef = new TransformDefinition();
- pldef.addTransformDef(tdef);
- return tdef;
- }
-
- @Test
- public void testRemoveTransformDefintion() throws Exception {
- TransformDefinition tdef = setupTransformDefinition();
- assertEquals(1, pldef.getTransformDefs().size());
- pldef.removeTransformDef(tdef);
- assertEquals(0, pldef.getTransformDefs().size());
- }
-
- @Test
- public void testAddAttribute() throws Exception {
- setupAttribute();
- assertEquals(1, pldef.getAttributes().size());
- }
-
- private TypedValue setupAttribute() {
- TypedValue attr = new TypedValue("attr", TypedValue.TYPE_STRING, "1");
- pldef.addAttribute(attr);
- return attr;
- }
-
- @Test
- public void testRemoveAttribute() throws Exception {
- TypedValue attr = setupAttribute();
- pldef.addAttribute(attr);
- assertEquals(1, pldef.getAttributes().size());
- pldef.removeAttribute(attr);
- assertEquals(0, pldef.getAttributes().size());
- }
-
- @Test
- public void testConfigureInvoker() throws Exception {
- JAXPSAXProcessorInvoker invoker = new JAXPSAXProcessorInvoker();
- pldef.configure(invoker);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TestJAXPProcessorInvoker.java b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TestJAXPProcessorInvoker.java
deleted file mode 100644
index dbc8aef..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TestJAXPProcessorInvoker.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.invoker.test;
-
-import java.net.URL;
-
-import javax.xml.transform.dom.DOMResult;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker;
-import org.junit.Before;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-import static org.junit.Assert.*;
-
-
-public class TestJAXPProcessorInvoker {
- JAXPSAXProcessorInvoker invoker = null;
-
- @Before
- public void setUp() throws Exception {
- invoker = new JAXPSAXProcessorInvoker();
- }
-
- @Test
- public void testSimpleTransform() throws Exception {
- URL surl = TestJAXPProcessorInvoker.class.getResource("1-input.xml");
- URL xslt = TestJAXPProcessorInvoker.class.getResource("1-transform.xsl");
-
- PipelineDefinition pipe = new PipelineDefinition();
- TransformDefinition tdef = new TransformDefinition();
- tdef.setStylesheetURL(xslt.toExternalForm());
- pipe.addTransformDef(tdef);
- pipe.configure(invoker);
- InputSource source = new InputSource(surl.openStream());
- DOMResult result = new DOMResult();
- invoker.transform(source, result);
- Document node = (Document)result.getNode();
- assertNotNull("Did not get a result document.", node);
- assertEquals("Missing root-out node name.", "root-out", node.getDocumentElement().getLocalName());
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TransformDefinitonTest.java b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TransformDefinitonTest.java
deleted file mode 100644
index db2fb86..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/invoker/test/TransformDefinitonTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Intalio Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (Intalio) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.test;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TypedValue;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-
-public class TransformDefinitonTest {
- TransformDefinition tdef = null;
-
- @Before
- public void setUp() throws Exception {
- tdef = new TransformDefinition();
- }
-
- @After
- public void tearDown() throws Exception {
- tdef = null;
- }
-
- private TypedValue setupParameters() {
- TypedValue param = new TypedValue("param", TypedValue.TYPE_STRING, "test");
- tdef.addParameter(param);
- return param;
- }
-
- @Test
- public void testDefaultResolver() throws Exception {
- String resolver = tdef.getResolverClass();
- assertEquals("Did not find default resolver", TransformDefinition.DEFAULT_CATALOG_RESOLVER, resolver);
- }
-
- @Test
- public void testChangeResolverFromDefault() throws Exception {
- String resolver = "org.eclipse.wst.xml.catalog.URIResolver";
- tdef.setResolverClass(resolver);
- assertEquals("Problem setting a new resolver", resolver, tdef.getResolverClass());
- }
-
- @Test
- public void testAddParameters() throws Exception {
- setupParameters();
- assertNotNull("Missing paramerters", tdef.getParameters());
- }
-
- @Test
- public void testGetParameters() throws Exception {
- setupParameters();
- Set<TypedValue> parmSet = tdef.getParameters();
- assertEquals("Incorrect size returned.", 1, parmSet.size());
- }
-
- @Test
- public void testGetParametersAsMap() throws Exception {
- setupParameters();
- Map<String, Object> parmMap = tdef.getParametersAsMap();
- assertNotNull("Missing parmater MAP.", parmMap);
- }
-
- @Test
- public void testStyleSheetSource() throws Exception {
- String stylesheet = "http://www.example.org/stylesheet.xsl";
- tdef.setStylesheetURL(stylesheet);
- assertNotNull("Missing stylesheet.", tdef.getStylesheetURL());
- assertEquals("Incorrect stylesheet.", stylesheet, tdef.getStylesheetURL());
- }
-
- @Test
- public void testRemoveParameter() throws Exception {
- TypedValue param = setupParameters();
- assertTrue(tdef.getParameters().size() > 0);
- tdef.removeParameter(param);
- assertTrue("Found parameters when there should be zero.", tdef.getParameters().size() == 0);
- }
-
- @Test
- public void testSetOutputProperty() throws Exception {
- tdef.setOutputProperty("output", "test");
- String value = tdef.getOutputProperties().getProperty("output");
- assertEquals("Incorrect value", "test", value);
- }
-
- @Test
- public void testNoOutputProperties() throws Exception {
- assertEquals("Found output properties when there should be none.", 0, tdef.getOutputProperties().size());
- }
-
- @Test
- public void testRemoveOutputProperty() throws Exception {
- tdef.setOutputProperty("output", "test");
- Properties properties = tdef.getOutputProperties();
- assertEquals(1,properties.size());
- tdef.removeOutputProperty("output");
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/AllJAXPDebugTests.java b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/AllJAXPDebugTests.java
deleted file mode 100644
index a7ba47c..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/AllJAXPDebugTests.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.test;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.test.PipelineDefintionTest;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.test.TestJAXPProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.test.TransformDefinitonTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( { TransformDefinitonTest.class, PipelineDefintionTest.class, TestJAXPProcessorInvoker.class})
-public class AllJAXPDebugTests {
-
-
-}
diff --git a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/JAXPDebugTestPlugin.java b/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/JAXPDebugTestPlugin.java
deleted file mode 100644
index 4e63aa5..0000000
--- a/tests/org.eclipse.wst.xsl.jaxp.debug.test/src/org/eclipse/wst/xsl/jaxp/debug/test/JAXPDebugTestPlugin.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.test;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class JAXPDebugTestPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.jaxp.debug.test"; //$NON-NLS-1$
-
- // The shared instance
- private static JAXPDebugTestPlugin plugin;
-
- /**
- * The constructor
- */
- public JAXPDebugTestPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static JAXPDebugTestPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/.classpath b/tests/org.eclipse.wst.xsl.launching.tests/.classpath
deleted file mode 100644
index 3100a6b..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="test-launching-src"/>
- <classpathentry kind="src" path="xsl-test-resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/.project b/tests/org.eclipse.wst.xsl.launching.tests/.project
deleted file mode 100644
index 2b08b8e..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.launching.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index df7824f..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Jan 03 22:24:37 EST 2008
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6fb9c3a..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jan 04 09:08:42 EST 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
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.pde.prefs b/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fdd8568..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,16 +0,0 @@
-#Fri Jan 04 09:04:43 EST 2008
-compilers.incompatible-environment=1
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.missing-bundle-classpath-entries=0
-compilers.p.missing-packages=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.launching.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 91d555f..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.wst.xsl.launching.tests
-Bundle-Version: 1.2.0.qualifier
-Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.junit;bundle-version="4.8.1",
- org.eclipse.wst.xsl.xalan;bundle-version="1.0.0",
- org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.launching;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.xsl.debug.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.swt;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.jaxp.launching;bundle-version="1.0.0",
- org.eclipse.wst.xsl.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",
- org.eclipse.wst.xsl.jaxp.debug.ui;bundle-version="[1.0,2.0.0)",
- org.eclipse.jdt.launching;bundle-version="3.5.0",
- org.eclipse.jdt.debug;bundle-version="3.5.0",
- org.eclipse.jdt.debug.ui;bundle-version="3.5.0",
- org.apache.xalan;bundle-version="2.7.1",
- org.apache.xml.serializer;bundle-version="2.7.1"
-Bundle-Activator: org.eclipse.wst.xsl.launching.tests.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %Bundle-Vendor.0
-Export-Package: org.eclipse.wst.xsl.launching.tests,
- org.eclipse.wst.xsl.launching.tests.testcase
-
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/about.html b/tests/org.eclipse.wst.xsl.launching.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/build.properties b/tests/org.eclipse.wst.xsl.launching.tests/build.properties
deleted file mode 100644
index 7d5d2d5..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = test-launching-src/,\
- xsl-test-resources/
-output.. = bin/
-src.includes = testFiles/
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html,\
- xsl-test-resources/,\
- bin/,\
- testFiles/
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/plugin.properties b/tests/org.eclipse.wst.xsl.launching.tests/plugin.properties
deleted file mode 100644
index cde345d..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.launching.tests
-Bundle-Name.0 = XST Core Test Plug-in
-Bundle-Vendor.0 = Eclipse Web Tools Platform
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/pom.xml b/tests/org.eclipse.wst.xsl.launching.tests/pom.xml
deleted file mode 100644
index 719c357..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/pom.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.launching.tests</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>XSL Launching Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <useUIHarness>true</useUIHarness>
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.sdk.ide</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.apache.xalan</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.core</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.xalan</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/AbstractLaunchingTest.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/AbstractLaunchingTest.java
deleted file mode 100644
index ee33691..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/AbstractLaunchingTest.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009,2010 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - bug 262046 - initial API and implementation
- * David Carver (Intalio)- upgraded to junit 4 during maven3/tycho migration
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests;
-
-import java.io.*;
-import static org.junit.Assert.*;
-import java.net.URL;
-import java.util.List;
-
-import javax.xml.parsers.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-import org.junit.After;
-import org.junit.Before;
-import org.w3c.dom.Document;
-
-import junit.framework.TestCase;
-
-public abstract class AbstractLaunchingTest {
- private static final String XSL_TEST_PROJECT = "XSLTestProject";
- protected static final String XSL_LAUNCH_SHORTCUT_ID = "org.eclipse.wst.xsl.debug.ui.launchshortcut";
- protected static final String LAUNCHCONFIGS = "launchConfigs";
- protected EnvironmentTestSetup env;
- protected IProject testProject;
- protected IFolder folder;
-
- public AbstractLaunchingTest() {
- super();
- }
-
- @Before
- public void setUp() throws Exception {
- createProject();
- createEmptyLaunchConfigsFolder();
- deleteExistingLaunchConfigs();
- }
-
- private void createProject() throws CoreException {
- env = new EnvironmentTestSetup();
- testProject = env.createProject(XSL_TEST_PROJECT);
- }
-
- private void createEmptyLaunchConfigsFolder() throws CoreException {
- IPath path = testProject.getFullPath();
- folder = testProject.getFolder(LAUNCHCONFIGS);
- if (folder.exists()) {
- folder.delete(true, null);
- }
- folder.create(true, true, null);
- }
-
- private void deleteExistingLaunchConfigs() throws CoreException {
- ILaunchConfiguration[] configs = getLaunchManager()
- .getLaunchConfigurations();
- for (int i = 0; i < configs.length; i++) {
- configs[i].delete();
- }
- }
-
- @After
- public void tearDown() throws Exception {
- testProject.delete(true, new NullProgressMonitor());
- }
-
- protected void copyConfigurationToWorkspace(IPath folder, String filename)
- throws Exception {
- URL url = Activator.getDefault().getBundle().getEntry(
- "testFiles" + File.separator + filename);
-
- String workspacePath = getWorkspacePath();
-
- File target = new File(workspacePath + folder.toPortableString()
- + File.separator + filename);
- copyFile(url, target);
- }
-
- private String getWorkspacePath() {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IPath rootPath = root.getLocation();
- String workspacePath = rootPath.toPortableString();
- return workspacePath;
- }
-
- private void copyFile(URL src, File target) throws Exception {
- BufferedOutputStream bos = new BufferedOutputStream(
- new FileOutputStream(target));
- BufferedInputStream bis = new BufferedInputStream(src.openStream());
- try {
- while (bis.available() > 0) {
- int size = bis.available();
- if (size > 1024)
- size = 1024;
- byte[] b = new byte[size];
- bis.read(b, 0, b.length);
- bos.write(b);
- }
- } finally {
- if (bis != null) {
- bis.close();
- }
- if (bos != null) {
- bos.close();
- }
- }
- }
-
- /**
- * Returns the launch shortcut with the given id
- *
- * @param id
- * @return the <code>LaunchShortcutExtension</code> with the given id, or
- * <code>null</code> if none
- *
- * @since 1.0
- */
- protected LaunchShortcutExtension getLaunchShortcutExtension(String id) {
- List exts = getLaunchConfigurationManager().getLaunchShortcuts();
- LaunchShortcutExtension ext = null;
- for (int i = 0; i < exts.size(); i++) {
- ext = (LaunchShortcutExtension) exts.get(i);
- if (ext.getId().equals(id)) {
- return ext;
- }
- }
- return null;
- }
-
- /**
- * Returns the singleton instance of the
- * <code>LaunchConfigurationManager</code>
- *
- * @return the singleton instance of the
- * <code>LaunchConfigurationManager</code>
- * @since 1.0
- */
- protected LaunchConfigurationManager getLaunchConfigurationManager() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- }
-
- private ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- protected ILaunch launch(String name) throws Exception {
- ILaunchConfiguration configuration = getLaunchConfiguration(name);
- ILaunch launch = configuration.launch(ILaunchManager.RUN_MODE,
- new NullProgressMonitor());
- return launch;
- }
-
- /**
- * Returns the launch configuration for the given main type
- *
- * @param mainTypeName
- * program to launch
- * @see ProjectCreationDecorator
- */
- protected ILaunchConfiguration getLaunchConfiguration(String mainTypeName) throws Exception {
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
- IFile file = testProject.getProject().getFolder("launchConfigs")
- .getFile(mainTypeName + ".launch");
- ILaunchConfiguration mine = mgr.getLaunchConfiguration(file);
- assertEquals("Wrong type found: ",
- XSLLaunchConfigurationConstants.ID_LAUNCH_CONFIG_TYPE, mine
- .getType().getIdentifier());
-
- return mine;
- }
-
- protected void refreshProject() throws CoreException,
- InterruptedException {
- testProject.refreshLocal(IResource.DEPTH_INFINITE,
- new NullProgressMonitor());
- while (testProject.isSynchronized(IResource.DEPTH_INFINITE) == false) {
- Thread.sleep(1000);
- }
- }
-
- protected void launchConfiguration(String launchConfigName) throws Exception {
- ILaunch launch = launch(launchConfigName);
- // Wait until the launch configuration terminates.
- while (launch.isTerminated() == false) {
- Thread.sleep(1000);
- }
- refreshProject();
- }
-
- protected String readFile(InputStream input) {
- String str;
- String finalString = "";
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(input));
- while ((str = in.readLine()) != null) {
- finalString = finalString + str + "\n";
- }
- in.close();
- } catch (IOException e) {
- }
- return finalString;
- }
-
- protected Document parseXml(InputStream contents) throws Exception {
- DocumentBuilderFactory builderFactory = DocumentBuilderFactory
- .newInstance();
- DocumentBuilder builder = builderFactory.newDocumentBuilder();
-
- return builder.parse(contents);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Activator.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Activator.java
deleted file mode 100644
index 4e2aa07..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Gary Karasiuk (IBM Corporation) - initial implementation
- * Jesper Steen Møller - adapted for XSL
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- /** org.eclipse.wst.xsl.launching.tests - plug-in id */
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.launching.tests";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public void handleException(Exception e){
- Status status = new Status(IStatus.ERROR, PLUGIN_ID, e.getLocalizedMessage(), e);
- getLog().log(status);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/EnvironmentTestSetup.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/EnvironmentTestSetup.java
deleted file mode 100644
index 73f1e42..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/EnvironmentTestSetup.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Gary Karasiuk (IBM Corporation) - initial implementation
- * Jesper Steen Møller - adapted for XSL
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-
-public class EnvironmentTestSetup {
-
- public static final boolean DEBUG = true;
-
- private IWorkspace _workspace;
- private HashMap<String, IProject> _projects = new HashMap<String, IProject>(20);
-
- public EnvironmentTestSetup() throws CoreException {
- _workspace = ResourcesPlugin.getWorkspace();
- if (DEBUG){
- _workspace.getRoot().delete(true, true, null);
- }
- }
-
- public IPath addFolder(IPath root, String folderName) throws CoreException {
- IPath path = root.append(folderName);
- createFolder(path);
- return path;
- }
-
- public void incrementalBuild() throws CoreException{
- getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
- }
-
- public void fullBuild() throws CoreException{
- getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
- }
-
- public void waitForBuild(){
- boolean wasInterrupted = false;
- do {
- try {
- Job.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, null);
- wasInterrupted = false;
- }
- catch (InterruptedException e){
- wasInterrupted = true;
- }
- } while(wasInterrupted);
- }
-
- private IFolder createFolder(IPath path) throws CoreException {
- if (path.segmentCount() <= 1)return null;
-
- IFolder folder = _workspace.getRoot().getFolder(path);
- if (!folder.exists()){
- folder.create(true, true, null);
- }
- return folder;
- }
-
- public IProject createProject(String name) throws CoreException {
- final IProject project = _workspace.getRoot().getProject(name);
- IWorkspaceRunnable create = new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- project.create(monitor);
- project.open(monitor);
- }
- };
-
- _workspace.run(create, null);
- _projects.put(name, project);
-
- return project;
- }
-
- public void dispose() throws CoreException {
- if (DEBUG)return;
- for (Iterator<IProject> it=_projects.values().iterator(); it.hasNext();){
- IProject project = it.next();
- project.delete(true, null);
- }
- }
-
- public IPath addFile(IPath folder, String fileName, String contents) throws CoreException, UnsupportedEncodingException {
- IPath filePath = folder.append(fileName);
- createFile(filePath, contents.getBytes("UTF8"));
- return filePath;
- }
-
- public IPath addFileFromResource(IPath folder, String fileName, String path) throws CoreException {
- IPath filePath = folder.append(fileName);
- createFileFromResource(filePath, path);
- return filePath;
- }
-
- private IFile createFile(IPath filePath, byte[] contents) throws CoreException {
- IFile file = _workspace.getRoot().getFile(filePath);
- ByteArrayInputStream in = new ByteArrayInputStream(contents);
- if (file.exists())file.setContents(in, true, false, null);
- else file.create(in, true, null);
- return file;
- }
-
- private IFile createFileFromResource(IPath filePath, String path) throws CoreException {
- IFile file = _workspace.getRoot().getFile(filePath);
- InputStream in = EnvironmentTestSetup.class.getResourceAsStream(path);
- if (file.exists())file.setContents(in, true, false, null);
- else file.create(in, true, null);
- return file;
- }
- public IWorkspace getWorkspace(){
- return _workspace;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/LaunchingSuite.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/LaunchingSuite.java
deleted file mode 100644
index 949a63e..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/LaunchingSuite.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * David Carver (STAR) - bug 262046 - refactored launching suite.
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests;
-
-import org.eclipse.wst.xsl.launching.tests.testcase.LaunchShortcutTest;
-import org.eclipse.wst.xsl.launching.tests.testcase.ResultRunnableTest;
-import org.eclipse.wst.xsl.launching.tests.testcase.InputFileBlockTest;
-import org.eclipse.wst.xsl.launching.tests.testcase.XSLLaunchingTest;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * This class does specifies all the classes in this bundle that provide tests.
- * It is primarily for the convenience of the AllTestsSuite.
- *
- * @since 1.2
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ XSLLaunchingTest.class, InputFileBlockTest.class,
- LaunchShortcutTest.class, ResultRunnableTest.class })
-public class LaunchingSuite {
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Misc.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Misc.java
deleted file mode 100644
index 3478c4a..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/Misc.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Gary Karasiuk (IBM Corporation) - initial implementation
- * Jesper Steen Møller - adapted for XSL
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * Some miscellaneous helper methods.
- * @author karasiuk
- *
- */
-public class Misc {
-
- private static DateFormat _df = new SimpleDateFormat("HH:mm:ss.SSSS"); //$NON-NLS-1$
-
- public static void close(InputStream in){
- if (in == null)return;
- try {
- in.close();
- }
- catch (IOException e){
- // eat it
- }
- }
-
- public static void close(OutputStream out) {
- if (out == null)return;
- try {
- out.close();
- }
- catch (IOException e){
- // eat it
- }
- }
-
- /**
- * Write a line to the console for debugging.
- * @param line
- */
- public static void log(String line){
- System.err.println(timestampIt(line));
- }
-
- public static String timestampIt(String line){
- Date date = new Date();
- long thread = Thread.currentThread().getId();
- return _df.format(date) + " " + thread + " " + line;//$NON-NLS-1$//$NON-NLS-2$
- }
-
- public static void log(StringBuffer b){
- log(b.toString());
- b.setLength(0);
- }
-
- public static void niy(String msg){
- if (msg == null)msg = "Sorry, this function is not implemented yet"; //$NON-NLS-1$
- throw new RuntimeException(msg);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/MockXSLLaunchShortCut.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/MockXSLLaunchShortCut.java
deleted file mode 100644
index 4700634..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/MockXSLLaunchShortCut.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - bug 262046 - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLLaunchShortcut;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-
-public class MockXSLLaunchShortCut extends XSLLaunchShortcut {
-
- public ILaunchManager testGetLaunchManager()
- {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- public ILaunchConfigurationType testGetConfigurationType()
- {
- return getLaunchManager().getLaunchConfigurationType(XSLLaunchConfigurationConstants.ID_LAUNCH_CONFIG_TYPE);
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/InputFileBlockTest.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/InputFileBlockTest.java
deleted file mode 100644
index 0d918e0..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/InputFileBlockTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver - bug 214228 - Verify that File Extensions available for input block
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-
-public class InputFileBlockTest {
-
- @Test
- public void testXMLFileExtensions() throws Exception {
- MockInputFileBlock fileBlock = new MockInputFileBlock(null);
- String[] fileExtensions = fileBlock.getAvailableFileExtensions();
- assertNotNull("No file extensions returned.", fileExtensions);
- assertTrue("Did not find 'xml'", findExtension("xml", fileExtensions));
- assertTrue("Did not find 'xsl'", findExtension("xsl", fileExtensions));
- assertTrue("Did not find 'xslt'", findExtension("xslt", fileExtensions));
- assertTrue("Did not find 'xmi'", findExtension("xmi", fileExtensions));
- }
-
- private boolean findExtension(String extension, String[] exts) {
- boolean foundsw = false;
- for (int i = 0; i < exts.length; i++) {
- if (extension.equalsIgnoreCase(exts[i])) {
- foundsw = true;
- }
- }
- return foundsw;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/LaunchShortcutTest.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/LaunchShortcutTest.java
deleted file mode 100755
index 1a6bcf5..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/LaunchShortcutTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - bug 262046 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import java.util.ArrayList;
-
-import java.util.List;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.launching.tests.AbstractLaunchingTest;
-import org.eclipse.wst.xsl.launching.tests.MockXSLLaunchShortCut;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-/**
- * Tests the capabilities of launch shortcuts from the <code>LaunchShortcuts</code> extension point
- *
- * @since 1.2
- */
-public class LaunchShortcutTest extends AbstractLaunchingTest {
-
-
- @Before
- @Override
- public void setUp() throws Exception {
- // TODO Auto-generated method stub
- super.setUp();
- IPath path = folder.getFullPath();
- copyConfigurationToWorkspace(path, "SimpleTransform.launch");
- }
-
- @After
- @Override
- public void tearDown() throws Exception {
- env.dispose();
- super.tearDown();
- }
-
- /**
- * Tests that the short cut is defined via the extension point.
- */
- @Test
- public void testShortcutExtensionPointConfigured() {
- LaunchShortcutExtension ext = getLaunchShortcutExtension(XSL_LAUNCH_SHORTCUT_ID);
- assertNotNull("XSLT stylesheet shortcut not found", ext); //$NON-NLS-1$
- }
-
- @Test
- public void testXSLLaunchConfigTypeDefined() {
- MockXSLLaunchShortCut shortCut = new MockXSLLaunchShortCut();
-
- String typeid = XSLLaunchConfigurationConstants.ID_LAUNCH_CONFIG_TYPE;
- assertEquals("Unexpected shortcut Type", typeid, shortCut.testGetConfigurationType().getIdentifier());
- }
-
- /**
- * Tests that the local java app shortcut does not support some fake type id 'foo'
- */
- @Test
- public void testAssociatedConfigurationTypeNotSupported() {
- LaunchShortcutExtension ext = getLaunchShortcutExtension(XSL_LAUNCH_SHORTCUT_ID);
- assertNotNull("XSLT shortcut not found", ext); //$NON-NLS-1$
- String typeid = "org.eclipse.jdt.launching.foo"; //$NON-NLS-1$
- assertTrue("local xslt app shortcut should not support foo", !ext.getAssociatedConfigurationTypes().contains(typeid)); //$NON-NLS-1$
- }
-
-
- /**
- * Returns a listing of all applicable <code>LaunchShortcutExtension</code>s for the given
- * launch configuration type id.
- * @param typeid the id of the launch configuration
- * @return a listing of <code>LaunchShortcutExtension</code>s that are associated with the specified launch configuration
- * type id or an empty list, never <code>null</code>
- *
- * @since 1.0
- */
- public List getApplicableLaunchShortcuts(String typeid) {
- List list = new ArrayList();
- LaunchShortcutExtension ext = null;
- List shortcuts = getLaunchConfigurationManager().getLaunchShortcuts();
- for(int i = 0; i < shortcuts.size(); i++) {
- ext = (LaunchShortcutExtension) shortcuts.get(i);
- if(ext.getAssociatedConfigurationTypes().contains(typeid) && !WorkbenchActivityHelper.filterItem(ext)) {
- list.add(ext);
- }
- }
- return list;
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockInputFileBlock.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockInputFileBlock.java
deleted file mode 100644
index 93d47b2..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockInputFileBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver - bug 214228 - Verify that File Extensions available for input block
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.InputFileBlock;
-
-public class MockInputFileBlock extends InputFileBlock {
-
- public MockInputFileBlock(IFile defaultFile) {
- super(defaultFile);
- // TODO Auto-generated constructor stub
- }
-
- public String[] getAvailableFileExtensions() {
- // Since this is private we need to expose it for testing.
- return getFileExtensions();
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockResultRunnable.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockResultRunnable.java
deleted file mode 100644
index 548560e..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/MockResultRunnable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (STAR) - bug 259053 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.views.ResultRunnable;
-
-public class MockResultRunnable extends ResultRunnable {
-
- public MockResultRunnable(SourceViewer viewer, String results,
- IWorkbenchPartSite site) {
- super(viewer, results, site);
- // TODO Auto-generated constructor stub
- }
-
- public IDocument testCreateDocument() {
- return createDocument();
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/ResultRunnableTest.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/ResultRunnableTest.java
deleted file mode 100644
index 2d195f5..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/ResultRunnableTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2009, 2010 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - initial API and implementation
- * David Carver (Intalio) - migrate to junit 4 with maven migration
- *******************************************************************************/
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.xsl.ui.internal.StructuredTextViewerConfigurationXSL;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * This class is an abstract class for Content Completion Tests. It provides all
- * of the common methods that are used by the completion tests so that they
- * aren't duplicated across the various classes. Overrides can be done where
- * appropriate.
- *
- * @author David Carver
- *
- * @since 1.2
- */
-public class ResultRunnableTest {
-
- protected StructuredTextViewer sourceViewer = null;
- protected Shell shell = null;
- protected Composite parent = null;
-
-
- public ResultRunnableTest() {
- }
-
- protected void initializeSourceViewer() {
- // some test environments might not have a "real" display
- if (Display.getCurrent() != null) {
-
-
- if (PlatformUI.isWorkbenchRunning()) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell();
- } else {
- shell = new Shell(Display.getCurrent());
- }
- parent = new Composite(shell, SWT.NONE);
-
- // dummy viewer
- sourceViewer = new StructuredTextViewer(parent, null, null, false,
- SWT.NONE);
- } else {
- fail("Unable to run the test as a display must be available.");
- }
-
- configureSourceViewer();
- }
-
- protected void configureSourceViewer() {
- sourceViewer.configure(new StructuredTextViewerConfigurationXSL());
-
- }
-
- /**
- * Setup the necessary projects, files, and source viewer for the tests.
- */
- @Before
- public void setUp() throws Exception {
- initializeSourceViewer();
- }
-
- @After
- public void tearDown() throws Exception {
- parent.dispose();
- }
-
-
- @Test
- public void testNoProcessingInstruction() throws Exception {
- String results = "This is some sample text.";
- MockResultRunnable runnable = new MockResultRunnable(sourceViewer, results, null);
- IDocument document = runnable.testCreateDocument();
- assertNotNull("Structured Document wasn not created successfully.", document);
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/XSLLaunchingTest.java b/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/XSLLaunchingTest.java
deleted file mode 100644
index 77a41ed..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test-launching-src/org/eclipse/wst/xsl/launching/tests/testcase/XSLLaunchingTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jesper Steen Møller
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Jesper Steen Møller - initial XSL launching test
- * David Carver (STAR) - bug 262046 - refactored for better reliability.
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.launching.tests.testcase;
-
-import java.io.*;
-import static org.junit.Assert.*;
-import javax.xml.parsers.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-import org.eclipse.wst.xsl.launching.tests.AbstractLaunchingTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class XSLLaunchingTest extends AbstractLaunchingTest {
-
- private static final String TRANSFORM_COMMENTS = "TransformComments";
- private static final String SIMPLE_TRANSFORM = "SimpleTransform";
-
- @Before
- @Override
- public void setUp() throws Exception {
- super.setUp();
-
- IPath path = folder.getFullPath();
- copyConfigurationToWorkspace(path, "SimpleTransform.launch");
- copyConfigurationToWorkspace(path, "TransformComments.launch");
- testProject.refreshLocal(IResource.DEPTH_INFINITE,
- new NullProgressMonitor());
- while (testProject.isSynchronized(IResource.DEPTH_INFINITE) == false) {
- Thread.sleep(100);
- }
- }
-
- @After
- @Override
- public void tearDown() throws Exception {
- env.dispose();
- super.tearDown();
- }
-
- @Ignore @Test
- public void testSimpleTransformation() throws Exception {
- IPath folder = testProject.getFullPath();
- env.addFileFromResource(folder, "1-input.xml", "1-input.xml");
- env.addFileFromResource(folder, "1-transform.xsl", "1-transform.xsl");
- refreshProject();
-
- launchConfiguration(SIMPLE_TRANSFORM);
- IFile output = testProject.getFile("1-input.out.xml");
- Document doc = parseXml(output.getContents(true));
- assertEquals("root-out", doc.getDocumentElement().getNodeName());
- }
-
- /**
- * Test to make sure comments are being copied out to the output file. bug
- * 253703
- *
- * @throws CoreException
- * @throws InterruptedException
- * @throws ParserConfigurationException
- * @throws SAXException
- * @throws IOException
- */
- @Ignore @Test
- public void testTransformComments() throws Exception {
- IPath folder = testProject.getFullPath();
- env.addFileFromResource(folder, "testCommentInput.xml",
- "testCommentInput.xml");
- env.addFileFromResource(folder, "testComments.xsl", "testComments.xsl");
- env.addFileFromResource(folder, "expected.xml",
- "testCommentsExpected.xml");
- refreshProject();
-
- launchConfiguration(TRANSFORM_COMMENTS);
- IFile output = testProject.getFile("testCommentInput.out.xml");
- IFile expected = testProject.getFile("expected.xml");
-
- String result = readFile(output.getContents());
- String wanted = readFile(expected.getContents());
-
- assertEquals("Unexpected results:", wanted, result);
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/test.xml b/tests/org.eclipse.wst.xsl.launching.tests/test.xml
deleted file mode 100644
index 0d0e48d..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/test.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
-
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.wst.xsl.launching.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xsl.launching.tests.LaunchingSuite" />
- <property
- name="testType"
- value="core-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
-
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/testFiles/SimpleTransform.launch b/tests/org.eclipse.wst.xsl.launching.tests/testFiles/SimpleTransform.launch
deleted file mode 100644
index b2151fd..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/testFiles/SimpleTransform.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.wst.xsl.launching.launchConfigurationType">
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_ATTRIBUTES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Attributes/> "/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_OUTPUT_PROPERTIES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Properties/> "/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_PROCESSOR" value="org.eclipse.wst.xsl.launching.xalan.processor"/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_TRANSFORMER_FACTORY" value="org.apache.xalan.processor.TransformerFactoryImpl"/>
-<booleanAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_USE_DEFAULT_PROCESSOR" value="false"/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.INVOKER_DESCRIPTOR" value="org.eclipse.wst.xsl.launching.jaxp.invoke"/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_FORMAT_FILE" value="false"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_INPUT_FILE" value="${workspace_loc:/XSLTestProject/1-input.xml}"/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_OPEN_FILE" value="true"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FILENAME" value=""/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FOLDER" value=""/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_PIPELINE" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Pipeline> <OutputProperties/> <Transform path="/XSLTestProject/1-transform.xsl" pathType="resource" uriResolver=""> <Parameters/> </Transform> </Pipeline> "/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_USE_DEFAULT_OUTPUT_FILE" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/testFiles/TransformComments.launch b/tests/org.eclipse.wst.xsl.launching.tests/testFiles/TransformComments.launch
deleted file mode 100644
index 2790de7..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/testFiles/TransformComments.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.wst.xsl.launching.launchConfigurationType">
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_ATTRIBUTES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Attributes/> "/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_OUTPUT_PROPERTIES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Properties/> "/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_PROCESSOR" value="org.eclipse.wst.xsl.launching.xalan.processor"/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_TRANSFORMER_FACTORY" value="org.apache.xalan.processor.TransformerFactoryImpl"/>
-<booleanAttribute key="org.eclipse.wst.xsl.jaxp.launching.ATTR_USE_DEFAULT_PROCESSOR" value="false"/>
-<stringAttribute key="org.eclipse.wst.xsl.jaxp.launching.INVOKER_DESCRIPTOR" value="org.eclipse.wst.xsl.launching.jaxp.invoke"/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_FORMAT_FILE" value="false"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_INPUT_FILE" value="${workspace_loc:/XSLTestProject/testCommentInput.xml}"/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_OPEN_FILE" value="true"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FILENAME" value="testCommentInput.out.xml"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_OUTPUT_FOLDER" value="${workspace_loc:/XSLTestProject}"/>
-<stringAttribute key="org.eclipse.wst.xsl.launching.ATTR_PIPELINE" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Pipeline> <OutputProperties/> <Transform path="/XSLTestProject/testComments.xsl" pathType="resource" uriResolver=""> <Parameters/> </Transform> </Pipeline> "/>
-<booleanAttribute key="org.eclipse.wst.xsl.launching.ATTR_USE_DEFAULT_OUTPUT_FILE" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-input.xml b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-input.xml
deleted file mode 100644
index 5757dde..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-input.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root>
- <element attribute="yes"/>
-</root>
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-transform.xsl b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-transform.xsl
deleted file mode 100644
index 36af48c..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/1-transform.xsl
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="//root">
- <root-out/>
- </xsl:template>
-</xsl:stylesheet>
-
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.out.xml b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.out.xml
deleted file mode 100644
index 6351287..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.out.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><root><element>
- </element><element>
-
- </element><element>
-
-</element></root>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.xml b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.xml
deleted file mode 100644
index 11abc90..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentInput.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<doc>
- <test>
- <!--first comment-->
- </test>
- <!--second comment-->
-</doc>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testComments.xsl b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testComments.xsl
deleted file mode 100644
index 91ee3d1..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testComments.xsl
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:template match="comment()">
- <xsl:copy />
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentsExpected.xml b/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentsExpected.xml
deleted file mode 100644
index 038aaad..0000000
--- a/tests/org.eclipse.wst.xsl.launching.tests/xsl-test-resources/org/eclipse/wst/xsl/launching/tests/testCommentsExpected.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
- <!--first comment-->
-
- <!--second comment-->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.tests/.classpath b/tests/org.eclipse.wst.xsl.tests/.classpath
deleted file mode 100644
index 472ee29..0000000
--- a/tests/org.eclipse.wst.xsl.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.tests/.project b/tests/org.eclipse.wst.xsl.tests/.project
deleted file mode 100644
index 4293a3d..0000000
--- a/tests/org.eclipse.wst.xsl.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 96d70ed..0000000
--- a/tests/org.eclipse.wst.xsl.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Apr 07 07:00:01 PDT 2010
-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.source=1.5
diff --git a/tests/org.eclipse.wst.xsl.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 5eeb2e2..0000000
--- a/tests/org.eclipse.wst.xsl.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.wst.xsl.tests;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.wst.xsl.launching.tests;bundle-version="1.0.0",
- org.eclipse.wst.xsl.ui.tests;bundle-version="1.0.0",
- org.eclipse.wst.xsl.core.tests;bundle-version="1.0.0",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.exslt.core.tests;bundle-version="1.0.0",
- org.eclipse.wst.xsl.exslt.ui.tests;bundle-version="1.0.0",
- org.eclipse.wst.xml.xpath.ui.tests;bundle-version="1.0.0",
- org.eclipse.wst.xsl.jaxp.debug.test;bundle-version="1.0.0",
- org.junit;bundle-version="4.8.1"
-Export-Package: org.eclipse.wst.xsl.tests
-Bundle-ClassPath: .
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.wst.xsl.tests.XSLTestPlugin
diff --git a/tests/org.eclipse.wst.xsl.tests/about.html b/tests/org.eclipse.wst.xsl.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.tests/build.properties b/tests/org.eclipse.wst.xsl.tests/build.properties
deleted file mode 100644
index 8d3b787..0000000
--- a/tests/org.eclipse.wst.xsl.tests/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- test.xml,\
- about.html,\
- bin/
-source.. = src/
diff --git a/tests/org.eclipse.wst.xsl.tests/plugin.properties b/tests/org.eclipse.wst.xsl.tests/plugin.properties
deleted file mode 100644
index eb6bdd7..0000000
--- a/tests/org.eclipse.wst.xsl.tests/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#Properties file for org.eclipse.wst.xsl.tests
-Bundle-Name.0 = XSL Tests Plug-in
-Bundle-Vendor.0 = Eclipse Web Tools Platform
diff --git a/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/AllTestsSuite.java b/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/AllTestsSuite.java
deleted file mode 100644
index 60e679f..0000000
--- a/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/AllTestsSuite.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * David Carver (Intalio) - bug 323510 - convert to junit 4
- *******************************************************************************/
-package org.eclipse.wst.xsl.tests;
-
-
-import org.eclipse.wst.xsl.core.tests.XSLCoreTestSuite;
-import org.eclipse.wst.xsl.exslt.core.tests.EXSLTCoreTestSuite;
-import org.eclipse.wst.xsl.exslt.ui.tests.EXSLTUITestSuite;
-import org.eclipse.wst.xsl.jaxp.debug.test.AllJAXPDebugTests;
-import org.eclipse.wst.xsl.launching.tests.LaunchingSuite;
-import org.eclipse.wst.xsl.ui.tests.XSLUITestSuite;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-
-/**
- * This class specifies all the bundles of this component that provide a test
- * suite to run during automated testing.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses( { XSLUITestSuite.class, XSLCoreTestSuite.class, LaunchingSuite.class,
- AllJAXPDebugTests.class, EXSLTCoreTestSuite.class, EXSLTUITestSuite.class})
-
-public class AllTestsSuite {
-}
diff --git a/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/XSLTestPlugin.java b/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/XSLTestPlugin.java
deleted file mode 100644
index a2979fb..0000000
--- a/tests/org.eclipse.wst.xsl.tests/src/org/eclipse/wst/xsl/tests/XSLTestPlugin.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.wst.xsl.tests;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-
-public class XSLTestPlugin extends Plugin {
-
- // The plug-in ID
- /**
- * TODO: Add JavaDoc
- */
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.core"; //$NON-NLS-1$
-
- private BundleContext bundleContext;
-
- // The shared instance
- private static XSLTestPlugin plugin;
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- bundleContext = context;
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static XSLTestPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.tests/test.xml b/tests/org.eclipse.wst.xsl.tests/test.xml
deleted file mode 100644
index 4912cb6..0000000
--- a/tests/org.eclipse.wst.xsl.tests/test.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
-
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.wst.xsl.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xsl.tests.AllTestsSuite" />
- <property
- name="testType"
- value="ui-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
-
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/.classpath b/tests/org.eclipse.wst.xsl.ui.tests/.classpath
deleted file mode 100644
index c5eb0e9..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/.project b/tests/org.eclipse.wst.xsl.ui.tests/.project
deleted file mode 100644
index 71775bb..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.ui.tests</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.xsl.ui.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 99789f3..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Apr 04 14:45:13 GMT-05:00 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
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsl.ui.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index f0fbc8c..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.ui.tests;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.ui.tests.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.wst.xsl.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="1.1.300",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",
- org.eclipse.wst.xsl.core;bundle-version="[1.0.0,2.0.0)",
- org.junit;bundle-version="4.8.1",
- org.eclipse.wst.xsd.ui;bundle-version="1.1.0",
- org.eclipse.wst.standard.schemas;bundle-version="1.0.0",
- org.eclipse.wst.xsd.core;bundle-version="1.1.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.wst.xsl.ui.internal.validation;x-internal:=true,
- org.eclipse.wst.xsl.ui.tests;
- uses:="org.eclipse.ui.dialogs,
- org.osgi.framework,
- org.eclipse.ui.plugin,
- junit.framework,
- org.eclipse.core.resources,
- org.eclipse.core.runtime",
- org.eclipse.wst.xsl.ui.tests.contentassist,
- org.eclipse.wst.xsl.ui.tests.extensions,
- org.eclipse.wst.xsl.ui.tests.hyperlinkdetector,
- org.eclipse.wst.xsl.ui.tests.style,
- org.eclipse.wst.xsl.ui.tests.templates
-Bundle-Localization: plugin
-Bundle-Vendor: %provider
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/about.html b/tests/org.eclipse.wst.xsl.ui.tests/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/build.properties b/tests/org.eclipse.wst.xsl.ui.tests/build.properties
deleted file mode 100644
index 252372b..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- projectfiles/,\
- bin/,\
- about.html,\
- plugin.properties,\
- plugin.xml
-src.includes = src/,\
- projectfiles/,\
- META-INF/,\
- build.properties
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/plugin.properties b/tests/org.eclipse.wst.xsl.ui.tests/plugin.properties
deleted file mode 100644
index 47498aa..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.ui.tests
-pluginName = Tests Plug-in
-provider=Eclipse Web Tools Platform
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/plugin.xml b/tests/org.eclipse.wst.xsl.ui.tests/plugin.xml
deleted file mode 100644
index 97d576a..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="org.eclipse.wst.xsl.test.xhtml"
- name="XHTML Grammar Testing"
- point="org.eclipse.wst.xml.core.catalogContributions">
- <catalogContribution>
- <uri
- name="http://www.w3.org/1999/xhtml"
- uri="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd">
- </uri>
- </catalogContribution>
- </extension>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/pom.xml b/tests/org.eclipse.wst.xsl.ui.tests/pom.xml
deleted file mode 100644
index 94b7f5f..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <parent>
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../development/athena/org.eclipse.wst.xsl.releng</relativePath>
- </parent>
-
- <groupId>org.eclipse.wst.xsl</groupId>
- <artifactId>org.eclipse.wst.xsl.ui.tests</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
- <name>XSLT UI Tests</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <useUIHarness>true</useUIHarness>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByResponsibility.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByResponsibility.xsl
deleted file mode 100644
index 9e97525..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByResponsibility.xsl
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
-
- <xsl:param name="date"></xsl:param>
-
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>Change Request by Responsibility</title>
- </head>
- <body>
- <p>
- <xsl:for-each-group select="ChangeRequest"
- group-by="AssignedTo">
- <table border="1">
- <caption>
- <b>
- Change Requests Assigned To
- <xsl:value-of select="current-grouping-key()" />
- </b>
- </caption>
-
- <xsl:call-template name="tableHeader"></xsl:call-template>
-
- <xsl:for-each select="current-group()">
- <xsl:sort select="Status" order="descending" />
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
-
- </xsl:for-each-group>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="tableHeader">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByStatus.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByStatus.xsl
deleted file mode 100644
index e07c063..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ChangeRequestsByStatus.xsl
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
-
- <xsl:param name="date"></xsl:param>
-
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>Change Request by Status</title>
- </head>
- <body>
- <p>
- <xsl:for-each-group select="ChangeRequest"
- group-by="Status">
- <table border="1">
- <caption>
- <b>
- Change Request Status
- <xsl:value-of select="current-grouping-key()" />
- </b>
- </caption>
-
- <xsl:call-template name="tableHeader"></xsl:call-template>
-
- <xsl:for-each select="current-group()">
- <xsl:sort select="Category" order="descending" />
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
-
- </xsl:for-each-group>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="tableHeader">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/DraftReleaseCRs.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/DraftReleaseCRs.xsl
deleted file mode 100644
index bf9988a..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/DraftReleaseCRs.xsl
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:param name="date" />
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>Change Request by Responsibility</title>
- </head>
- <body>
- <p>
- <table border="1">
- <caption>
- <b>Draft/Milestone Completed Change Requests</b>
- </caption>
- <xsl:call-template name="tableHeader" />
- <xsl:for-each
- select="ChangeRequest[(Status = 'Fixed' or Status = 'In Progress') and (Category = 'XML' or Category = 'DTS')]">
- <xsl:sort select="ModifiedDate" order="descending" />
- <xsl:sort select="AssignedTo" order="descending" />
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
- </p>
- </body>
- </html>
- </xsl:template>
- <xsl:template name="tableHeader">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Modified Date</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="ModifiedDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/EmptyXSLFile.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/EmptyXSLFile.xsl
deleted file mode 100644
index e69de29..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/EmptyXSLFile.xsl
+++ /dev/null
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ListAllChangeRequests.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ListAllChangeRequests.xsl
deleted file mode 100644
index 475d29f..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/ListAllChangeRequests.xsl
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:param name="date"></xsl:param>
-
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>List All Change Requests</title>
- </head>
- <body>
- <p>
- <table border="1">
- <caption>
- <b>All Change Requests in XML/DTS</b>
- </caption>
- <xsl:call-template name="tableHeader"></xsl:call-template>
- <xsl:for-each select="ChangeRequest">
- <xsl:sort select="Status" />
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="tableHeader">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/OutstandingCRs.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/OutstandingCRs.xsl
deleted file mode 100644
index 3f214a8..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/OutstandingCRs.xsl
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
- <xsl:param name="date" />
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>Outstanding/Unassigned Change Requests</title>
- </head>
- <body>
- <p>
- <table border="1">
- <caption>
- <b>Outstanding/Unassigned Change Requests</b>
- </caption>
- <xsl:call-template name="tableHeader" />
- <xsl:for-each select="ChangeRequest[Status = 'New']">
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="tableHeader">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestNamedTemplatesAssist.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestNamedTemplatesAssist.xsl
deleted file mode 100644
index 9e46d2a..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestNamedTemplatesAssist.xsl
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
-
- <xsl:param name="date"></xsl:param>
-
- <xsl:include href="utils.xsl" />
- <xsl:template match="StarTeam">
- <html>
- <head>
- <title>Change Request by Status</title>
- </head>
- <body>
- <p>
- <xsl:for-each-group select="ChangeRequest"
- group-by="Status">
- <table border="1">
- <caption>
- <b>
- Change Request Status
- <xsl:value-of select="current-grouping-key()" />
- </b>
- </caption>
-
- <xsl:call-template name="tableHeader"></xsl:call-template>
-
- <xsl:for-each select="current-group()">
- <xsl:sort select="Category" order="descending" />
- <xsl:call-template name="ChangeRequest" />
- </xsl:for-each>
- </table>
-
- </xsl:for-each-group>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="">
- <tr bgcolor="silver">
- <td>
- <strong>Number</strong>
- </td>
- <td>
- <strong>Creation Date</strong>
- </td>
- <td>
- <strong>Assigned To</strong>
- </td>
- <td>
- <strong>Category</strong>
- </td>
- <td>
- <strong>Component</strong>
- </td>
- <td>
- <strong>Synopsis</strong>
- </td>
- <td>
- <strong>Status</strong>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template name="ChangeRequest">
- <tr>
- <td>
- <xsl:value-of select="CRNumber" />
- </td>
- <td>
- <xsl:call-template name="long_date">
- <xsl:with-param name="date" select="CreatedOnDate" />
- </xsl:call-template>
- </td>
- <td>
- <xsl:value-of select="AssignedTo" />
- </td>
- <td>
- <xsl:value-of select="Category" />
- </td>
- <td>
- <xsl:value-of select="Component" />
- </td>
- <td>
- <xsl:value-of select="Synopsis" />
- </td>
- <td>
- <xsl:value-of select="Status" />
- </td>
- </tr>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixes.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixes.xsl
deleted file mode 100644
index 5b8fa9c..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixes.xsl
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="#all" xmlns:xhtml="http://www.w3.org/1999/xhtml">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesEmpty.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesEmpty.xsl
deleted file mode 100644
index 8af0050..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesEmpty.xsl
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="" xmlns:xhtml="http://www.w3.org/1999/xhtml">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesWithXhtml.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesWithXhtml.xsl
deleted file mode 100644
index beeaa17..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestResultPrefixesWithXhtml.xsl
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="xhtml " xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:test="http://www.examples.org/">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestTestAttributeProposals.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestTestAttributeProposals.xsl
deleted file mode 100644
index b35d27d..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestTestAttributeProposals.xsl
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test=""></xsl:when>
- </xsl:choose>
- </xsl:template>
-</xsl:stylesheet>
-<!-- Unit test to make sure we get proposals for test attributes -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestXPathXMLProposals.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestXPathXMLProposals.xsl
deleted file mode 100644
index f8a3376..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/TestXPathXMLProposals.xsl
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="#all" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsl:template match="/">
- <xsl:for-each select="">
-
- </xsl:for-each>
- <xsl:for-each select="/xsd:complexType/">
-
- </xsl:for-each>
- <xsl:for-each select="xsd:complexType/xsd:">
-
- </xsl:for-each>
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/XSLT20Transform.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/XSLT20Transform.xsl
deleted file mode 100644
index fbfa7ef..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/XSLT20Transform.xsl
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
- <xsl:variable name="var" as="xs:string" select="''" />
-</xsl:transform>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug272760.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug272760.xsl
deleted file mode 100644
index 91d82b9..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug272760.xsl
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-\n" +
-<!-- Copyright (c) IBM Corporation and others 2009. This page is made available
- under license. For full details see the LEGAL in the documentation book that
- contains this page. All Platform Debug contexts, those for org.eclipse.debug.ui,
- are located in this file All contexts are grouped by their relation, with
- all relations grouped alphabetically. -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" encoding="iso-8859-1"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
- n" +
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Compare Details</title>
- </head>
- <body>
- <div align="left" class="main">
- <xsl:apply-templates select="deltas" />
- </div>
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="http://www.w3.org/Icons/valid-xhtml10-blue"
- alt="Valid XHTML 1.0 Strict" height="31" width="88" />
- </a>
- </p>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="deltas">
- <table border="1" width="90%">
- <tr bgcolor="#CC9933">
- <td>
- <h3>
- <a href="javascript:void(0)" class="typeslnk"
- onclick="expand(this)">
- // faulty source line follows
- <b>
- List of
- <xsl:value-of select=>
- Details
- </b>
- </a>
- </h3>
- </td>
- </tr>
- <xsl:for-each select="deltas/delta[@compatible='true']">
- <xsl:sort select="@compatible" />
- <tr>
- <td>
- <xsl:value-of disable-output-escaping="yes"
- select="@message" />
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug281420.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug281420.xsl
deleted file mode 100644
index ec7cc56..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug281420.xsl
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:variable name="test">
- 0
- </xsl:variable>
- <xsl:template match="/">
- <xsl:value-of select="$" />
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- *Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials *are 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: * David Carver (STAR) - bug 281420 - initial API and implementation
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug290286.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug290286.xsl
deleted file mode 100644
index 1159c00..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug290286.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="2.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:abc="http://test.com/abc">
-
- <xsl:template name="abc:test">
- <xsl:value-of select="." />
- </xsl:template>
-
- <xsl:function name="abc:test2">
- <xsl:param name="value" />
- <xsl:value-of select="$value" />
- </xsl:function>
-
- <xsl:function name="abc:test3">
- <xsl:param name="value" />
- <xsl:value-of select="$value" />
- </xsl:function>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug294079.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug294079.xsl
deleted file mode 100644
index 36be1a7..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/bug294079.xsl
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <!-- TODO: Auto-generated template -->
- <div id="{}" />
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/build.xml b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/build.xml
deleted file mode 100644
index b1e9a40..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/build.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ======================================================================
- Sep 6, 2008 5:28:40 PM ProjectZipFile ============================ -->
-<project name="ProjectZipFile" default="default">
-
- <target name="default" description="description">
- <zip destfile="projectfiles.zip" compress="true" update="true">
- <zipfileset dir=".">
- <include name="*.xsl" />
- </zipfileset>
- </zip>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/calltemplateTest.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/calltemplateTest.xsl
deleted file mode 100644
index c72a5b1..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/calltemplateTest.xsl
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:import href="utils.xsl" />
- <xsl:template match="/">
- <xsl:call-template name="">
- <xsl:with-param name="date">
- 20080930
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/mainFile.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/mainFile.xsl
deleted file mode 100644
index fdcf46b..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/mainFile.xsl
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials * are
- 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: * Doug Satchwell (Chase Technology Ltd) - initial API and
- implementation *******************************************************************************/ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:include href="olib.xsl" />
- <xsl:include href="../olib.xsl" />
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/olib.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/olib.xsl
deleted file mode 100644
index 301d7dc..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/olib.xsl
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials * are
- 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: * Doug Satchwell (Chase Technology Ltd) - initial API and
- implementation *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/oneLevelUp/olib.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/oneLevelUp/olib.xsl
deleted file mode 100644
index 301d7dc..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/hrefs/oneLevelUp/olib.xsl
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials * are
- 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: * Doug Satchwell (Chase Technology Ltd) - initial API and
- implementation *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest.xsl
deleted file mode 100644
index 5297b4b..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:include href="modeTest2.xsl" />
- <xsl:template match="/">
-
- </xsl:template>
- <xsl:template match="something" mode="mode1">
-
- </xsl:template>
- <xsl:template match="something" mode="mode2">
-
-
- </xsl:template>
- <xsl:template name="something" mode="mode1">
-
- </xsl:template>
- <xsl:template name="test" mode="">
-
- </xsl:template>
-
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest2.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest2.xsl
deleted file mode 100644
index 84a60eb..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/modeTest2.xsl
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/" mode="mode3">
- <!-- TODO: Auto-generated template -->
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/olib.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/olib.xsl
deleted file mode 100644
index 301d7dc..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/olib.xsl
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials * are
- 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: * Doug Satchwell (Chase Technology Ltd) - initial API and
- implementation *******************************************************************************/ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/simple.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/simple.xsl
deleted file mode 100644
index 6120ab5..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/simple.xsl
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <xsl:value-of select="" />
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/testElementProposals.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/testElementProposals.xsl
deleted file mode 100644
index d9cfa07..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/testElementProposals.xsl
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
- <body>
- < </body>
- </html>
- </xsl:template>
-</xsl:stylesheet>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/utils.xsl b/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/utils.xsl
deleted file mode 100644
index 5fc0044..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/projectfiles/utils.xsl
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- /*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials * are
- 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: * David Carver - STAR - Stylesheet for testing purposes.
- *******************************************************************************/ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:template name="long_date">
- <xsl:param name="date" />
- <!-- Month -->
- <xsl:variable name="month" select="number(substring($date, 6, 2))" />
- <xsl:choose>
- <xsl:when test="$month=1">
- January
- </xsl:when>
- <xsl:when test="$month=2">
- February
- </xsl:when>
- <xsl:when test="$month=3">
- March
- </xsl:when>
- <xsl:when test="$month=4">
- April
- </xsl:when>
- <xsl:when test="$month=5">
- May
- </xsl:when>
- <xsl:when test="$month=6">
- June
- </xsl:when>
- <xsl:when test="$month=7">
- July
- </xsl:when>
- <xsl:when test="$month=8">
- August
- </xsl:when>
- <xsl:when test="$month=9">
- September
- </xsl:when>
- <xsl:when test="$month=10">
- October
- </xsl:when>
- <xsl:when test="$month=11">
- November
- </xsl:when>
- <xsl:when test="$month=12">
- December
- </xsl:when>
- <xsl:otherwise>
- INVALID MONTH
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text />
- <!-- Day -->
- <xsl:value-of select="number(substring($date, 9, 2))" />
- <xsl:text>, </xsl:text>
- <!-- Year -->
- <xsl:value-of select="substring($date, 1, 4)" />
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/internal/validation/TestDelegatingSourceValidatorForXSL.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/internal/validation/TestDelegatingSourceValidatorForXSL.java
deleted file mode 100755
index 22cd866..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/internal/validation/TestDelegatingSourceValidatorForXSL.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - initial API and implementation, based off of
- * XML Source Delgating Validator tests.
- * IBM Corporation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.internal.validation;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.IncrementalHelper;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.operations.WorkbenchContext;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xsl.ui.tests.AbstractXSLUITest;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Test the XML delegating source validator.
- *
- */
-public class TestDelegatingSourceValidatorForXSL extends AbstractXSLUITest {
- DelegatingSourceValidatorForXSL sourceValidator = new DelegatingSourceValidatorForXSL();
-
- public TestDelegatingSourceValidatorForXSL() {
-
- }
-
- private String getxslTestFilesProjectName() {
- return "xsltestfiles";
- }
-
- @Test
- public void testXSLT2XPathPasses() throws Exception {
- String fileName1 = "ChangeRequestsByResponsibility.xsl";
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), fileName1);
-
- TestReporter reporter = new TestReporter();
- sourceValidator.validate(context, reporter);
-
- assertFalse("Messages were reported on file with valid XPath 2.0",
- reporter.isMessageReported());
- }
-
- @Test
- public void testXSLT2_2Passes() throws Exception {
- String fileName1 = "ChangeRequestsByStatus.xsl";
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), fileName1);
-
- TestReporter reporter = new TestReporter();
- sourceValidator.validate(context, reporter);
-
- assertFalse("Messages were reported on file with valid XSLT 2.0",
- reporter.isMessageReported());
- }
-
-
- @Test
- public void testValidXSLT() throws Exception {
- String fileName1 = "ListAllChangeRequests.xsl";
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), fileName1);
- TestReporter reporter = new TestReporter();
- sourceValidator.validate(context, reporter);
-
- assertFalse("Messages were reported on " + fileName1 + ".", reporter
- .isMessageReported());
- }
-
- @Test
- public void testXSLFunctionsWithParms() throws Exception {
- String fileName = "bug290286.xsl";
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), fileName);
- TestReporter reporter = new TestReporter();
- sourceValidator.validate(context, reporter);
- assertFalse("Errors reported with XSLT 2.0 with Functions: " + fileName + ".", reporter.isMessageReported());
- }
-
- @Test
- public void testXSL20Transform() throws Exception {
- String fileName = "XSLT20Transform.xsl";
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), fileName);
- TestReporter reporter = new TestReporter();
- sourceValidator.validate(context, reporter);
- assertFalse("Errors reported with XSLT 2.0 with Transform statement: " + fileName + ".", reporter.isMessageReported());
- }
-
-
- private class TestReporter implements IReporter {
- protected boolean messageReported = false;
-
- public TestReporter() {
-
- }
-
- public void addMessage(IValidator origin, IMessage message) {
- if (message.getSeverity() == IMessage.HIGH_SEVERITY) {
- messageReported = true;
- }
- }
-
- public boolean isMessageReported() {
- return messageReported;
- }
-
- public void displaySubtask(IValidator validator, IMessage message) {
- // TODO Auto-generated method stub
-
- }
-
- public List getMessages() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isCancelled() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void removeAllMessages(IValidator origin, Object object) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeAllMessages(IValidator origin) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeMessageSubset(IValidator validator, Object obj,
- String groupName) {
- // TODO Auto-generated method stub
-
- }
-
- }
-
- @Test
- public void testDelegatingSourceValidatorNPEwithNoAttributeValue() throws Exception {
- WorkbenchContext context = setupFile(getxslTestFilesProjectName(), "bug272760.xsl");
- TestReporter reporter = new TestReporter();
- try {
- sourceValidator.validate(context, reporter);
- } catch (ValidationException e) {
-
- } catch (NullPointerException e) {
- StringWriter out = new StringWriter();
- e.printStackTrace(new PrintWriter(out));
- fail(out.toString());
- }
- }
-
- protected WorkbenchContext setupFile(String projName, String fileName1) {
- String validateFilePath = projName + File.separator + fileName1;
-
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(
- new Path(validateFilePath));
- if (file != null && !file.exists()) {
- fail("Unable to locate " + fileName1 + " stylesheet.");
- }
- WorkbenchContext context = new WorkbenchContext();
- List fileList = new ArrayList();
- fileList.add(File.separator + validateFilePath);
- context.setValidationFileURIs(fileList);
- return context;
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractSourceViewerTest.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractSourceViewerTest.java
deleted file mode 100644
index 2867aff..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractSourceViewerTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests;
-
-import java.io.IOException;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistProcessor;
-import org.eclipse.wst.xsl.ui.internal.StructuredTextViewerConfigurationXSL;
-import org.eclipse.wst.xsl.ui.internal.contentassist.XSLContentAssistProcessor;
-import org.junit.After;
-
-/**
- * This class is an abstract class for Content Completion Tests. It provides all
- * of the common methods that are used by the completion tests so that they
- * aren't duplicated across the various classes. Overrides can be done where
- * appropriate.
- *
- * @author David Carver
- *
- */
-public class AbstractSourceViewerTest extends AbstractXSLUITest {
-
- protected String projectName = TEST_PROJECT_NAME;
- protected String fileName = null;
- protected IFile file = null;
- protected IEditorPart textEditorPart = null;
- protected ITextEditor editor = null;
- protected XMLDocumentLoader xmlDocumentLoader = null;
- protected IStructuredDocument document = null;
- protected StructuredTextViewer sourceViewer = null;
- protected IStructuredModel model;
- protected Shell shell = null;
- protected Composite parent = null;
-
-
- public AbstractSourceViewerTest() {
- }
-
- protected void initializeSourceViewer() {
- // some test environments might not have a "real" display
- if (Display.getCurrent() != null) {
-
- if (PlatformUI.isWorkbenchRunning()) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell();
- } else {
- shell = new Shell(Display.getCurrent());
- }
- parent = new Composite(shell, SWT.NONE);
-
- // dummy viewer
- sourceViewer = new StructuredTextViewer(parent, null, null, false,
- SWT.NONE);
- } else {
- Assert
- .fail("Unable to run the test as a display must be available.");
- }
-
- configureSourceViewer();
- }
-
- protected void configureSourceViewer() {
- sourceViewer.configure(new StructuredTextViewerConfigurationXSL());
-
- sourceViewer.setDocument(document);
- }
-
- protected void loadFileForTesting(String xslFilePath)
- throws ResourceAlreadyExists, ResourceInUse, IOException,
- CoreException {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(
- new Path(xslFilePath));
- if (file != null && !file.exists()) {
- Assert.fail("Unable to locate " + fileName + " stylesheet.");
- }
-
- loadXSLFile();
-
- initializeSourceViewer();
- }
-
- protected void loadXSLFile() throws ResourceAlreadyExists, ResourceInUse,
- IOException, CoreException {
- IModelManager modelManager = StructuredModelManager.getModelManager();
- model = modelManager.getModelForEdit(file);
- document = model.getStructuredDocument();
-
- }
-
- /**
- * Get the content completion proposals at <code>lineNumber</code>,
- * <code>columnNumber</code>.
- *
- * @param lineNumber
- * @param columnNumber
- * @return
- * @throws Exception
- * @deprecated different operating systems can have different offsets depending on the line feed. Use getProposals(int, int) instead.
- */
- protected ICompletionProposal[] getProposals(int offset) throws Exception {
- return new XSLContentAssistProcessor().computeCompletionProposals(
- sourceViewer, offset);
- }
-
- protected ICompletionProposal[] getXMLProposals(int offset) throws Exception {
- return new XMLContentAssistProcessor().computeCompletionProposals(
- sourceViewer, offset);
- }
-
- /**
- * Get the content completion proposals at <code>lineNumber</code>, <code>numberOfCharacters</code>.
- * Number of characters refers to how many total characters from the starting offset of the line. This is
- * not the same as the column number as tabs can cause the column number to be different from the number of
- * characters.
- *
- * @param lineNumber
- * @param numberOfCharacters
- * @return
- * @throws BadLocationException
- */
- protected ICompletionProposal[] getProposals(int lineNumber, int numberOfCharacters) throws BadLocationException {
- int offset = calculateOffset(lineNumber, numberOfCharacters);
- return new XSLContentAssistProcessor().computeCompletionProposals(sourceViewer, offset);
- }
-
- protected ICompletionProposal[] getXMLProposals(int lineNumber, int numberOfCharacters) throws BadLocationException {
- int offset = calculateOffset(lineNumber, numberOfCharacters);
- return new XMLContentAssistProcessor().computeCompletionProposals(sourceViewer, offset);
- }
-
-
- protected int calculateOffset(int lineNumber, int columnNumber)
- throws BadLocationException {
- IDocument document = sourceViewer.getDocument();
- int lineOffset = document.getLineOffset(lineNumber);
- int offset = lineOffset + columnNumber;
- return offset;
- }
-
-
- @After
- public void tearDown() throws Exception {
- super.tearDown();
- parent.dispose();
- if (model != null) {
- model.releaseFromEdit();
- }
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractXSLUITest.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractXSLUITest.java
deleted file mode 100644
index 914c6fe..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/AbstractXSLUITest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests;
-
-import static org.junit.Assert.*;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Enumeration;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.junit.After;
-import org.junit.Before;
-import org.osgi.framework.Bundle;
-
-/*
- * Made abstract, so won't be automatically picked up as test (since intended to be subclassed).
- */
-public abstract class AbstractXSLUITest {
- protected static IProject fTestProject;
- protected static boolean fTestProjectInitialized;
- protected static final String PROJECT_FILES = "projectfiles";
- protected static final String TEST_PROJECT_NAME = "xsltestfiles";
-
- @Before
- public void setUp() throws Exception {
- getWorkspace().getRoot().delete(true, true, new NullProgressMonitor());
- setupTestProjectFiles(XSLUITestsPlugin.PLUGIN_ID);
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- protected void setupTestProjectFiles(String bundleId) throws CoreException,
- IOException, URISyntaxException {
- getAndCreateProject();
-
- Bundle coreBundle = Platform.getBundle(bundleId);
- Enumeration<String> e = coreBundle.getEntryPaths("/projectfiles");
- while (e.hasMoreElements()) {
- String path = e.nextElement();
- URL url = coreBundle.getEntry(path);
- if (!url.getFile().endsWith("/")) {
- String relativePath = path;
- url = FileLocator.resolve(url);
- path = path.substring("projectfiles".length());
- IFile destFile = fTestProject.getFile(path);
- if (url.toExternalForm().startsWith("jar:file")) {
- InputStream source = FileLocator.openStream(coreBundle,
- new Path(relativePath), false);
- if (destFile.exists()) {
- destFile.delete(true, new NullProgressMonitor());
- }
- destFile.create(source, true, new NullProgressMonitor());
- source.close();
- } else {
- // if resource is not compressed, link
- destFile.createLink(url.toURI(), IResource.REPLACE,
- new NullProgressMonitor());
- }
- }
- }
- }
-
- protected static void getAndCreateProject() throws CoreException {
- IWorkspace workspace = getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- fTestProject = root.getProject(TEST_PROJECT_NAME);
- createProject(fTestProject, null, null);
- fTestProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- assertTrue(fTestProject.exists());
- }
-
- private static void createProject(IProject project, IPath locationPath,
- IProgressMonitor monitor) throws CoreException {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- monitor.beginTask("creating test project", 10);
- // create the project
- try {
- if (!project.exists()) {
- IProjectDescription desc = project.getWorkspace()
- .newProjectDescription(project.getName());
- if (Platform.getLocation().equals(locationPath)) {
- locationPath = null;
- }
- desc.setLocation(locationPath);
- project.create(desc, monitor);
- monitor = null;
- }
- if (!project.isOpen()) {
- project.open(monitor);
- monitor = null;
- }
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
- }
-
- @After
- public void tearDown() throws Exception {
- String projName = TEST_PROJECT_NAME;
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot()
- .getProject(projName);
- if (project.isAccessible()) {
- project.delete(true, true, new NullProgressMonitor());
- }
- getWorkspace().getRoot().refreshLocal(2, new NullProgressMonitor());
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/Activator.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/Activator.java
deleted file mode 100644
index d9a9eaf..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/Activator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.wst.xsl.ui.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.ui.tests";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLModelXMLTestsPlugin.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLModelXMLTestsPlugin.java
deleted file mode 100755
index af49ca4..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLModelXMLTestsPlugin.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class XSLModelXMLTestsPlugin extends Plugin {
- //The shared instance.
- private static XSLModelXMLTestsPlugin plugin;
-
- /**
- * The constructor.
- */
- public XSLModelXMLTestsPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static XSLModelXMLTestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- return key;
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return null;
- }
-
- public static URL getInstallLocation() {
- URL installLocation = Platform.getBundle("org.eclipse.wst.xsl.ui.tests").getEntry("/");
- URL resolvedLocation = null;
- try {
- resolvedLocation = FileLocator.resolve(installLocation);
- }
- catch (IOException e) {
- // impossible
- throw new Error(e);
- }
- return resolvedLocation;
- }
-
- public static File getTestFile(String filepath) {
- URL installURL = getInstallLocation();
- //String scheme = installURL.getProtocol();
- String path = installURL.getPath();
- String location = path + filepath;
- File result = new File(location);
- return result;
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestSuite.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestSuite.java
deleted file mode 100755
index df4762d..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestSuite.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - (STAR) - initial API and implementation
- * David Carver - (Intalio) - convert to junit 4
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-import org.eclipse.wst.xsl.ui.internal.validation.TestDelegatingSourceValidatorForXSL;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestCallTemplateCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestElementCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestEmptyFileCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestExcludeResultPrefixesCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestHrefCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestNamedTemplateCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestTemplateModeCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.TestXPathXMLCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.contentassist.XSLCompletionTest;
-import org.eclipse.wst.xsl.ui.tests.extensions.TestContentAssistProcessorFactory;
-import org.eclipse.wst.xsl.ui.tests.hyperlinkdetector.TestXSLHyperlinkDetector;
-import org.eclipse.wst.xsl.ui.tests.style.TestSemanticHighlighting;
-import org.eclipse.wst.xsl.ui.tests.style.TestXMLRegionMap;
-import org.eclipse.wst.xsl.ui.tests.style.TestXSLLineStyleProvider;
-import org.eclipse.wst.xsl.ui.tests.style.TestXSLRegionMap;
-import org.eclipse.wst.xsl.ui.tests.templates.TestTemplateContextTypeXSL;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ TestDelegatingSourceValidatorForXSL.class,
- XSLCompletionTest.class,
- TestExcludeResultPrefixesCompletionProposal.class,
- TestTemplateModeCompletionProposal.class,
- TestHrefCompletionProposal.class, TestElementCompletionProposal.class,
- TestXSLLineStyleProvider.class, TestXMLRegionMap.class,
- TestXSLRegionMap.class, TestXSLHyperlinkDetector.class,
- TestNamedTemplateCompletionProposal.class,
- TestCallTemplateCompletionProposal.class,
- TestXPathXMLCompletionProposal.class, TestTemplateContextTypeXSL.class,
- TestEmptyFileCompletionProposal.class,
- TestContentAssistProcessorFactory.class, TestSemanticHighlighting.class })
-public class XSLUITestSuite {
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestsPlugin.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestsPlugin.java
deleted file mode 100755
index 1eb0e67..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/XSLUITestsPlugin.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class XSLUITestsPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static XSLUITestsPlugin plugin;
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.ui.tests";
-
- /**
- * The constructor.
- */
- public XSLUITestsPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static XSLUITestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- return key;
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestCallTemplateCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestCallTemplateCompletionProposal.java
deleted file mode 100644
index 4132fa7..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestCallTemplateCompletionProposal.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - bug 243575 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-
-import static org.junit.Assert.*;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Test;
-
-public class TestCallTemplateCompletionProposal extends
- AbstractSourceViewerTest {
-
- @Test
- public void testXSLPropsoalAvailable() throws Exception {
- fileName = "calltemplateTest.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(12, 31);
-
- assertNotNull("Did not find proposals.", proposals);
- }
-
- @Test
- public void testUtilsProposalAvailable() throws Exception {
- fileName = "calltemplateTest.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(12, 31);
- assertNotNull("Did not find proposals.", proposals);
- assertTrue("Empty proposals returned.", proposals.length > 0);
- assertEquals("Wrong proposal found.", "long_date", proposals[0]
- .getDisplayString());
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestElementCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestElementCompletionProposal.java
deleted file mode 100644
index 8e74d79..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestElementCompletionProposal.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 244978 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-import static org.junit.Assert.*;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestElementCompletionProposal extends AbstractSourceViewerTest {
-
- @Test
- public void testXSLPropsoalAvailable() throws Exception {
- fileName = "testElementProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
- int column = 16;
- int line = 5;
-
- int offset = document.getLineOffset(line) + column;
-
- ICompletionProposal[] proposals = getProposals(offset);
- assertNotNull("Did not find proposals.", proposals);
- }
-
- @Test
- public void testXSLApplyTemplatesPropsoalAvailable() throws Exception {
- fileName = "testElementProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
- int column = 13;
- int line = 6;
-
- ICompletionProposal[] proposals = getProposals(line, column);
- assertNotNull("Did not find proposals.", proposals);
-
- String proposalName = "";
- for (int cnt = 0; cnt < proposals.length; cnt++) {
- if (proposals[cnt].getDisplayString().equals("xsl:apply-templates")) {
- proposalName = proposals[cnt].getDisplayString();
- }
- }
-
- assertEquals("Did not find expected proposal.", "xsl:apply-templates",
- proposalName);
- }
-
- @Test
- public void testXSLChoosePropsoalAvailable() throws Exception {
- fileName = "testElementProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
- int column = 13;
- int line = 6;
-
- ICompletionProposal[] proposals = getProposals(line, column);
- assertNotNull("Did not find proposals.", proposals);
-
- String proposalName = "";
- for (int cnt = 0; cnt < proposals.length; cnt++) {
- if (proposals[cnt].getDisplayString().equals("xsl:choose")) {
- proposalName = proposals[cnt].getDisplayString();
- }
- }
-
- assertEquals("Did not find expected proposal.", "xsl:choose",
- proposalName);
- }
-
- @Test
- public void testXSLWhenPropsoalNotAvailable() throws Exception {
- fileName = "testElementProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
- int column = 16;
- int line = 5;
-
- int offset = document.getLineOffset(line) + column;
-
- ICompletionProposal[] proposals = getProposals(offset);
- assertNotNull("Did not find proposals.", proposals);
-
- String proposalName = "";
- for (int cnt = 0; cnt < proposals.length; cnt++) {
- if (proposals[cnt].getDisplayString().equals("xsl:when")) {
- proposalName = proposals[cnt].getDisplayString();
- }
- }
-
- assertFalse("xsl:when proposal found when it shouldn't have been.",
- proposalName.equals("xsl:when"));
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestEmptyFileCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestEmptyFileCompletionProposal.java
deleted file mode 100644
index 32f9026..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestEmptyFileCompletionProposal.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - bug 263843 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-import static org.junit.Assert.*;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Test;
-
-public class TestEmptyFileCompletionProposal extends AbstractSourceViewerTest {
-
- @Test
- public void testXSLPropsoalAvailable() throws Exception {
- fileName = "EmptyXSLFile.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- int offset = 0;
-
- ICompletionProposal[] proposals = getProposals(offset);
- assertNotNull("Did not find proposals.", proposals);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestExcludeResultPrefixesCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestExcludeResultPrefixesCompletionProposal.java
deleted file mode 100644
index b12d0b1..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestExcludeResultPrefixesCompletionProposal.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 230136 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-import java.io.IOException;
-import static org.junit.Assert.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Test;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestExcludeResultPrefixesCompletionProposal extends
- AbstractSourceViewerTest {
-
- private ICompletionProposal[] setupProposals(int column, int line)
- throws ResourceAlreadyExists, ResourceInUse, IOException,
- CoreException, BadLocationException, Exception {
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
-
- int offset = document.getLineOffset(line) + column;
-
- ICompletionProposal[] proposals = getProposals(offset);
- return proposals;
- }
-
- @Test
- public void testAllDefaultValueNoProposals() throws Exception {
- fileName = "TestResultPrefixes.xsl";
- int column = 29;
- int line = 2;
- ICompletionProposal[] proposals = setupProposals(column, line);
- assertEquals("Found proposals when #all already in result value.", 0,
- proposals.length);
- }
-
- @Test
- public void testXHTMLNamespacePropsoalAvailable() throws Exception {
- fileName = "TestResultPrefixesEmpty.xsl";
- int column = 29;
- int line = 3;
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
-
- ICompletionProposal[] proposals = getProposals(line, column);
- assertNotNull("Did not find proposals.", proposals);
- assertEquals("Proposal length not 2.", 2, proposals.length);
- assertEquals("Proposal did not find xhtml as proposal value.", "xhtml",
- proposals[1].getDisplayString());
- }
-
- @Test
- public void testAllPropsoalAvailable() throws Exception {
- fileName = "TestResultPrefixesEmpty.xsl";
- int column = 29;
- int line = 3;
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
-
- ICompletionProposal[] proposals = getProposals(line, column);
- assertNotNull("Did not find proposals.", proposals);
- assertEquals("Proposal length not 2.", 2, proposals.length);
- assertEquals("Proposal did not find xhtml as proposal value.", "#all",
- proposals[0].getDisplayString());
- }
-
- @Test
- public void testExcludeXHTMLProposal() throws Exception {
- fileName = "TestResultPrefixesWithXhtml.xsl";
- int column = 35;
- int line = 2;
-
- ICompletionProposal[] proposals = setupProposals(column, line);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int cnt = 0; cnt < proposals.length; cnt++) {
- if (proposals[cnt].getDisplayString().equals("xhtml")) {
- fail("XHTML Proposal found, when it should not have been!");
- }
- }
- }
-
- @Test
- public void testTestProposal() throws Exception {
- fileName = "TestResultPrefixesWithXhtml.xsl";
- int column = 35;
- int line = 3;
- ICompletionProposal[] proposals = setupProposals(column, line);
- assertNotNull("Did not find proposals.", proposals);
- assertFalse("Proposals returned more than one.", proposals.length > 1);
- assertEquals("Did not find test in proposal list", "test", proposals[0]
- .getDisplayString());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestHrefCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestHrefCompletionProposal.java
deleted file mode 100644
index a529980..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestHrefCompletionProposal.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestHrefCompletionProposal extends AbstractSourceViewerTest {
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Ignore
- @Test
- public void testHrefProposalsAtStart() throws Exception {
- fileName = projectName + File.separator + "hrefs" + File.separator
- + "mainFile.xsl";
- loadFileForTesting(fileName);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Column is off by one when calculating for the offset position
- int column = 25;
- int line = 16;
-
- int offset = document.getLineOffset(line) + column;
-
- ICompletionProposal[] proposals = getProposals(offset);
- assertTrue("Incorrect number of proposals", proposals.length > 3);
- doCommonTests(proposals);
- }
-
- private void doCommonTests(ICompletionProposal[] proposals) {
- int currDepth = 1;
- for (ICompletionProposal completionProposal : proposals) {
- System.out.println(completionProposal.getDisplayString());
- IPath p = new Path(completionProposal.getDisplayString());
- assertNotSame("Stylesheet must not include itself", new Path(
- "mainFile.xsl"), p);
- assertTrue(
- "Proposals wrongly ordered - number of segments should increase down the list",
- p.segmentCount() >= currDepth);
- currDepth = p.segmentCount();
- }
- }
-
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestNamedTemplateCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestNamedTemplateCompletionProposal.java
deleted file mode 100644
index b8b1daa..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestNamedTemplateCompletionProposal.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - bug 243577 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class TestNamedTemplateCompletionProposal extends
- AbstractSourceViewerTest {
-
- private void setupTestFile(String fileName) throws ResourceAlreadyExists,
- ResourceInUse, IOException, CoreException {
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- }
-
- @Test
- public void testXSLPropsoalAvailable() throws Exception {
- setupTestFile("TestNamedTemplatesAssist.xsl");
-
- ICompletionProposal[] proposals = getProposals(30,51);
- assertEquals("Missing Proposals", 3, proposals.length);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestTemplateModeCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestTemplateModeCompletionProposal.java
deleted file mode 100644
index fe73c60..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestTemplateModeCompletionProposal.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 230136 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Ignore;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestTemplateModeCompletionProposal extends
- AbstractSourceViewerTest {
-
- public TestTemplateModeCompletionProposal() {
- }
-
- @Test
- public void testModeProposals() throws Exception {
- fileName = "modeTest.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- // Line is off by one when calculating for the offset position
- int chars = 35;
- int line = 17;
-
- int offset = document.getLineOffset(line) + chars;
- // assertEquals("Wrong offset returned", 471, offset);
-
- ICompletionProposal[] proposals = getProposals(line, chars);
- assertProposalExists("mode1", proposals);
- assertProposalExists("mode2", proposals);
- assertProposalExists("mode3", proposals);
-
- proposals = getXMLProposals(offset);
- assertProposalExists("\"#all\"", proposals);
-
- }
-
- private void assertProposalExists(String expected,
- ICompletionProposal[] proposal) throws Exception {
- assertNotNull("No proposals.", proposal);
- boolean foundsw = false;
- for (int i = 0; i < proposal.length; i++) {
- if (proposal[i].getDisplayString().equals(expected)) {
- foundsw = true;
- break;
- }
- }
-
- if (!foundsw) {
- fail("Proposal " + expected
- + " was not found in the proposal list.");
- }
- }
-
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestXPathXMLCompletionProposal.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestXPathXMLCompletionProposal.java
deleted file mode 100644
index 4204541..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/TestXPathXMLCompletionProposal.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 244978 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestXPathXMLCompletionProposal extends AbstractSourceViewerTest {
-
- @Test
- public void testProposalsIncludeXSD() throws Exception {
- fileName = "TestXPathXMLProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(5, 29);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i].getDisplayString().contains("xsd:")) {
- return;
- }
- }
- fail("Did not find XSD proposals.");
- }
-
- @Test
- public void testProposalsIncludeAfterColon() throws Exception {
- fileName = "TestXPathXMLProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(11, 44);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i].getDisplayString().contains("xsd:")) {
- return;
- }
- }
- fail("Did not find XSD proposals.");
- }
-
- @Test
- public void testProposalsIncludeXSDAfterForwardSlash() throws Exception {
- fileName = "TestXPathXMLProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(8, 41);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i].getDisplayString().contains("xsd:")) {
- return;
- }
- }
- fail("Did not find XSD proposals.");
- }
-
- @Test
- public void testTestAttributeProposal() throws Exception {
- fileName = "TestTestAttributeProposals.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(5, 25);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i].getDisplayString().contains("document")) {
- return;
- }
- }
- fail("Did not find XPath proposals for the test attribute.");
- }
-
- @Test
- public void testCurlyBraceProposal() throws Exception {
- fileName = "bug294079.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(5, 16);
- assertNotNull("Did not find proposals.", proposals);
-
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i].getDisplayString().contains("document")) {
- return;
- }
- }
- fail("Did not find XPath proposals for the test attribute.");
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/XSLCompletionTest.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/XSLCompletionTest.java
deleted file mode 100755
index 9a07e65..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/contentassist/XSLCompletionTest.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.contentassist;
-
-import java.io.File;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xsl.ui.tests.AbstractSourceViewerTest;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class XSLCompletionTest extends AbstractSourceViewerTest {
-
- @Test
- public void testGetNodeAtLine10() throws Exception {
-
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(sourceViewer,
- sourceViewer.getDocument().getLineOffset(9) + 1);
- assertEquals("Wrong node name returned:", "xsl:stylesheet", node
- .getNodeName());
- }
-
- @Test
- public void testGetNodeAtLine12() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(sourceViewer,
- sourceViewer.getDocument().getLineOffset(11) + 11);
- assertEquals("Wrong node name returned:", "xsl:template", node
- .getNodeName());
- }
-
- @Test
- public void testGetNodeAtLine13() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(sourceViewer,
- sourceViewer.getDocument().getLineOffset(12) + 14);
- assertEquals("Wrong node name returned:", "xsl:param", node
- .getNodeName());
- }
-
- @Test
- public void testAttributeNotValueAvailable() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(14, 42);
-
- assertTrue(proposals.length > 1);
- ICompletionProposal proposal = proposals[0];
- assertFalse("Found \"number(substring($date, 6, 2))\".", proposal
- .getDisplayString()
- .equals("\"number(substring($date, 6, 2))\""));
- }
-
- @Test
- public void testSelectAttributeProposalsAvailable() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- int offset = sourceViewer.getDocument().getLineOffset(14) + 42;
- String s = sourceViewer.getDocument().get(offset - 1, 6);
- assertEquals("number", s);
-
- ICompletionProposal[] proposals = getProposals(14, 41);
-
- assertTrue(proposals.length > 1);
- ICompletionProposal proposal = proposals[3];
- assertEquals("Wrong select item returned: ", "..", proposal
- .getDisplayString());
- }
-
- /**
- * Bug 240170
- *
- * @throws Exception
- */
- @Test
- public void testSelectAttributeProposalsNarrow() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- Thread.sleep(6000);
-
- int offset = sourceViewer.getDocument().getLineOffset(14) + 42;
- String s = sourceViewer.getDocument().get(offset - 9, 9);
- assertEquals("select=\"n", s);
-
- ICompletionProposal[] proposals = getProposals(offset);
- assertEquals("Wrong xpath item returned: ", "name(node-set)",
- proposals[0].getDisplayString());
- assertEquals("Wrong Number of items returned: ", 6, proposals.length);
- }
-
- @Test
- public void testTestAttributeProposalsAvailable() throws Exception {
- fileName = "simple.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getXMLProposals(4, 30);
- assertTrue(proposals.length >= 1);
- for (int i = 0; i < proposals.length; i++) {
- ICompletionProposal proposal = proposals[i];
- if (proposal.getDisplayString().contains("disable-output-escaping")) {
- return;
- }
- }
- fail("Did not find disable-output-escaping=\"no\"");
- }
-
- @Test
- public void testXSLElementProposalsAvailable() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getXMLProposals(51, 20);
- assertTrue(proposals.length >= 2);
-
- ICompletionProposal proposal = proposals[1];
- assertTrue("Can't find XSL element proposals.", proposal
- .getDisplayString().equals("xsl:otherwise"));
- }
-
- /*
- * Bug 259575
- */
- @Test
- public void testXPathProposalAvaialbleAfterComma() throws Exception {
- fileName = "utils.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(861);
- assertTrue(proposals.length > 0);
- }
-
- // Bug 281420 - Variable inserts wrong.
- @Test
- public void testVariableInsertPositionOffset() throws Exception {
- fileName = "bug281420.xsl";
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
-
- ICompletionProposal[] proposals = getProposals(7, 29);
- assertTrue("Did not find any proposals.", proposals.length > 0);
- CustomCompletionProposal testprop = null;
- for (int cnt = 0; cnt < proposals.length; cnt++) {
- if (proposals[cnt].getDisplayString().equals("$test")) {
- testprop = (CustomCompletionProposal) proposals[cnt];
- }
- }
-
- if (testprop == null) {
- fail("Didn't find the $test proposal");
- }
- int startoffset = calculateOffset(7, 28);
- if (testprop.getReplacementOffset() != startoffset) {
- fail("Replacement Offset position worng expected " + startoffset
- + "but received " + testprop.getReplacementOffset());
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/extensions/TestContentAssistProcessorFactory.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/extensions/TestContentAssistProcessorFactory.java
deleted file mode 100644
index 972e95e..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/extensions/TestContentAssistProcessorFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.wst.xsl.ui.tests.extensions;
-
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.wst.xsl.ui.internal.contentassist.ContentAssistProcessorFactory;
-
-import junit.framework.TestCase;
-
-public class TestContentAssistProcessorFactory extends TestCase {
-
- private static final String XML_CONTENT_ASSIST_PROCESSOR = "org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistProcessor";
- private static final String XSL_CONTENT_ASSIST_PROCESSOR = "org.eclipse.wst.xsl.ui.internal.contentassist.XSLContentAssistProcessor";
-
- public void testContentAssistProcessorsExist() {
- IContentAssistProcessor[] processors = ContentAssistProcessorFactory.createProcessors();
- assertNotNull(processors);
- }
-
- public void testXMLContentAssistProcessorExists() {
- IContentAssistProcessor[] processors = ContentAssistProcessorFactory.createProcessors();
- if (processors == null) {
- fail("Missing Content Assist Processors.");
- }
- assertTrue("Did not find XML Content Assist Processor", findProcessor(processors, XML_CONTENT_ASSIST_PROCESSOR));
- }
-
-
- public void testXSLContentAssistProcessorExists() {
- IContentAssistProcessor[] processors = ContentAssistProcessorFactory.createProcessors();
- if (processors == null) {
- fail("Missing Content Assist Processors.");
- }
- assertTrue("Did not find XSL Content Assist Processor", findProcessor(processors, XSL_CONTENT_ASSIST_PROCESSOR));
- }
-
- private boolean findProcessor(IContentAssistProcessor[] processors, String name) {
- boolean fndsw = false;
- for (IContentAssistProcessor processor : processors) {
- if (processor.getClass().getName().equals(name)) {
- fndsw = true;
- }
- }
- return fndsw;
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/hyperlinkdetector/TestXSLHyperlinkDetector.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/hyperlinkdetector/TestXSLHyperlinkDetector.java
deleted file mode 100644
index 4421b44..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/hyperlinkdetector/TestXSLHyperlinkDetector.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 225418 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.hyperlinkdetector;
-
-import java.io.File;
-import java.io.IOException;
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.IDocumentExtension3;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xsl.ui.internal.StructuredTextViewerConfigurationXSL;
-import org.eclipse.wst.xsl.ui.internal.editor.XSLHyperlinkDetector;
-import org.eclipse.wst.xsl.ui.tests.AbstractXSLUITest;
-import org.eclipse.wst.xsl.core.internal.text.rules.StructuredTextPartitionerForXSL;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestXSLHyperlinkDetector extends AbstractXSLUITest {
-
- protected String projectName = null;
- protected String fileName = null;
- protected IFile file = null;
- protected IEditorPart textEditorPart = null;
- protected ITextEditor editor = null;
-
- protected XMLDocumentLoader xmlDocumentLoader = null;
- protected IStructuredDocument document = null;
- protected StructuredTextViewer sourceViewer = null;
- protected StructuredTextViewerConfigurationXSL xslConfiguration = new StructuredTextViewerConfigurationXSL();
- protected String Partitioning = IDocumentExtension3.DEFAULT_PARTITIONING;
- protected StructuredTextPartitionerForXSL defaultPartitioner = new StructuredTextPartitionerForXSL();
- protected Shell shell = null;
- protected Composite parent = null;
-
- public TestXSLHyperlinkDetector() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * Setup the necessary projects, files, and source viewer for the tests.
- */
- @Override
- @Before
- public void setUp() throws Exception {
- super.setUp();
- setupProject();
-
- }
-
- protected void loadFileForTesting(String xslFilePath)
- throws ResourceAlreadyExists, ResourceInUse, IOException,
- CoreException {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(
- new Path(xslFilePath));
- if (file != null && !file.exists()) {
- Assert.fail("Unable to locate " + fileName + " stylesheet.");
- }
-
- loadXSLFile();
-
- initializeSourceViewer();
- }
-
- protected void initializeSourceViewer() {
- // some test environments might not have a "real" display
- if (Display.getCurrent() != null) {
-
-
- if (PlatformUI.isWorkbenchRunning()) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell();
- } else {
- shell = new Shell(Display.getCurrent());
- }
- parent = new Composite(shell, SWT.NONE);
-
- // dummy viewer
- sourceViewer = new StructuredTextViewer(parent, null, null, false,
- SWT.NONE);
- } else {
- Assert
- .fail("Unable to run the test as a display must be available.");
- }
-
- configureSourceViewer();
- }
-
- protected void configureSourceViewer() {
- sourceViewer.configure(xslConfiguration);
-
- sourceViewer.setDocument(document);
- }
-
- protected void setupProject() {
- projectName = "xsltestfiles";
- IProjectDescription description = ResourcesPlugin.getWorkspace()
- .newProjectDescription(projectName);
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
- projectName);
- try {
- project.create(description, new NullProgressMonitor());
- project.open(new NullProgressMonitor());
- } catch (CoreException e) {
-
- }
- }
-
- @Override
- @After
- public void tearDown() throws Exception {
- super.tearDown();
- parent.dispose();
- }
-
- private LineStyleProvider[] getLineStyleProviders() {
- LineStyleProvider[] lineStyleProviders = xslConfiguration
- .getLineStyleProviders(sourceViewer, IXMLPartitions.XML_DEFAULT);
- return lineStyleProviders;
- }
-
- private void setUpTest(String file) throws ResourceAlreadyExists,
- ResourceInUse, IOException, CoreException {
- fileName = file;
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- assertNotNull("Missing Document Partitioner", document
- .getDocumentPartitioner());
- }
-
- private IStructuredModel model = null;
-
- protected void loadXSLFile() throws ResourceAlreadyExists, ResourceInUse,
- IOException, CoreException {
- IModelManager modelManager = StructuredModelManager.getModelManager();
- model = modelManager.getNewModelForEdit(file, true);
- document = model.getStructuredDocument();
- IDocumentPartitioner partitioner = defaultPartitioner.newInstance();
- partitioner.connect(document);
- document.setDocumentPartitioner(partitioner);
- }
-
- @Test
- public void testDetectHyperlinksDocument() throws Exception {
- setUpTest("DraftReleaseCRs.xsl");
-
- try {
- XSLHyperlinkDetector linkDetector = new XSLHyperlinkDetector();
- IRegion region = new Region(sourceViewer.getDocument().getLineOffset(28) + 54, 0);
-
- boolean canShowMultipleLinks = true;
- IHyperlink[] links = linkDetector.detectHyperlinks(document,
- region, canShowMultipleLinks);
- assertNotNull("No links returned", links);
- assertEquals("Unexpected number of links", 1, links.length);
- } finally {
- model.releaseFromEdit();
- }
- }
-
- @Test
- public void testDetectHyperlinksViewer() throws Exception {
- setUpTest("DraftReleaseCRs.xsl");
-
- try {
- XSLHyperlinkDetector linkDetector = new XSLHyperlinkDetector();
- IRegion region = new Region(sourceViewer.getDocument().getLineOffset(28) + 54, 0);
-
- boolean canShowMultipleLinks = true;
- IHyperlink[] links = linkDetector.detectHyperlinks(sourceViewer,
- region, canShowMultipleLinks);
- assertNotNull("No links returned", links);
- assertEquals("Unexpected number of links", 1, links.length);
- } finally {
- model.releaseFromEdit();
- }
- }
-
- @Test
- public void testWithParmVariableLink() throws Exception {
- setUpTest("DraftReleaseCRs.xsl");
-
- try {
- XSLHyperlinkDetector linkDetector = new XSLHyperlinkDetector();
- IRegion region = new Region(sourceViewer.getDocument().getLineOffset(74) + 44, 0);
-
- boolean canShowMultipleLinks = true;
- IHyperlink[] links = linkDetector.detectHyperlinks(sourceViewer,
- region, canShowMultipleLinks);
- assertNotNull("No links returned", links);
- assertEquals("Unexpected number of links", 1, links.length);
- IHyperlink link = links[0];
- assertTrue("Wrong file returned.", link.getHyperlinkText()
- .contains("utils.xsl"));
- } finally {
- model.releaseFromEdit();
- }
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/FakeStructuredRegion.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/FakeStructuredRegion.java
deleted file mode 100644
index ca3617b..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/FakeStructuredRegion.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.eclipse.wst.xsl.ui.tests.style;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-
-public class FakeStructuredRegion extends BasicStructuredDocumentRegion {
-
- @Override
- public ITextRegion getFirstRegion() {
- return null;
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestSemanticHighlighting.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestSemanticHighlighting.java
deleted file mode 100644
index 6612528..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestSemanticHighlighting.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Intalio Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (Intalio) - bug 307924 - NPE when region is null.
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.style;
-
-import org.eclipse.jface.text.Position;
-import static org.junit.Assert.*;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.xsl.ui.internal.style.XSLTagDelimsSemanticHighlighting;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import junit.framework.TestCase;
-
-public class TestSemanticHighlighting {
-
- XSLTagDelimsSemanticHighlighting semantich = null;
-
- @Before
- public void setUp() throws Exception {
- semantich = new XSLTagDelimsSemanticHighlighting();
- }
-
- //bug 307924
- @Test
- public void testNPECheck() throws Exception{
- IStructuredDocumentRegion region = new FakeStructuredRegion();
- Position[] p = semantich.consumes(region);
- assertNotNull(p);
- assertEquals("Expected zero positions", 0, p.length);
- }
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXMLRegionMap.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXMLRegionMap.java
deleted file mode 100644
index b024330..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXMLRegionMap.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - bug 249716 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.style;
-
-import java.util.Map;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-import org.eclipse.wst.xsl.ui.internal.style.XMLRegionMap;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestXMLRegionMap {
- private Map<String, String> regionMap = null;
-
- @Before
- public void setUp() throws Exception {
- regionMap = getRegionMap();
- }
-
- @After
- public void tearDown() throws Exception {
- regionMap = null;
- }
-
- @Test
- public void testXMLContentRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_CONTENT));
- assertEquals("Incorrect value", IStyleConstantsXML.XML_CONTENT, regionMap.get(DOMRegionContext.XML_CONTENT));
-
- }
-
- @Test
- public void testXMLDocTypeInternalSubsettRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET));
- assertEquals("Incorrect value", IStyleConstantsXML.XML_CONTENT, regionMap.get(DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET));
-
- }
-
- @Test
- public void testXMLTagOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_BORDER, regionMap.get(DOMRegionContext.XML_TAG_OPEN));
-
- }
-
- @Test
- public void testXMLTagCloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_BORDER, regionMap.get(DOMRegionContext.XML_TAG_CLOSE));
-
- }
-
- @Test
- public void testXMLEndTagOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_END_TAG_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_BORDER, regionMap.get(DOMRegionContext.XML_END_TAG_OPEN));
-
- }
-
- @Test
- public void testXMLCDataOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_CDATA_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.CDATA_BORDER, regionMap.get(DOMRegionContext.XML_CDATA_OPEN));
- }
-
- @Test
- public void testXMLCDataCloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_CDATA_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.CDATA_BORDER, regionMap.get(DOMRegionContext.XML_CDATA_CLOSE));
- }
-
- @Test
- public void testXMLCDataTextRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_CDATA_TEXT));
- assertEquals("Incorrect value", IStyleConstantsXML.CDATA_TEXT, regionMap.get(DOMRegionContext.XML_CDATA_TEXT));
- }
-
- @Test
- public void testXMLTagAttributeNameRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_ATTRIBUTE_NAME, regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME));
- }
-
- @Test
- public void testXMLDocTypeDeclartionRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_DECLARATION));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_NAME, regionMap.get(DOMRegionContext.XML_DOCTYPE_DECLARATION));
- }
-
- @Test
- public void testXMLTagNameRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_NAME));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_NAME, regionMap.get(DOMRegionContext.XML_TAG_NAME));
-
- }
-
- @Test
- public void testXMLTagAttributeValueRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE));
- }
-
- @Test
- public void testXMLTagAttributeEqualsRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS, regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS));
- }
-
- @Test
- public void testXMLCommentOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_COMMENT_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.COMMENT_BORDER, regionMap.get(DOMRegionContext.XML_COMMENT_OPEN));
- }
-
- @Test
- public void testXMLCommentCloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_COMMENT_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.COMMENT_BORDER, regionMap.get(DOMRegionContext.XML_COMMENT_CLOSE));
- }
-
- @Test
- public void testXMLCommentTextRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_COMMENT_TEXT));
- assertEquals("Incorrect value", IStyleConstantsXML.COMMENT_TEXT, regionMap.get(DOMRegionContext.XML_COMMENT_TEXT));
- }
-
- @Test
- public void testXMLDocTypeNameRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_NAME));
- assertEquals("Incorrect value", IStyleConstantsXML.DOCTYPE_NAME, regionMap.get(DOMRegionContext.XML_DOCTYPE_NAME));
- }
-
- @Test
- public void testXMLCharReferenceRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_CHAR_REFERENCE));
- assertEquals("Incorrect value", IStyleConstantsXML.ENTITY_REFERENCE, regionMap.get(DOMRegionContext.XML_CHAR_REFERENCE));
- }
-
- @Test
- public void testXMLPeReferenceRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_PE_REFERENCE));
- assertEquals("Incorrect value", IStyleConstantsXML.ENTITY_REFERENCE, regionMap.get(DOMRegionContext.XML_PE_REFERENCE));
- }
-
- @Test
- public void testXMLPIContentRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_PI_CONTENT));
- assertEquals("Incorrect value", IStyleConstantsXML.PI_CONTENT, regionMap.get(DOMRegionContext.XML_PI_CONTENT));
- }
-
- @Test
- public void testXMLPIOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_PI_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.PI_BORDER, regionMap.get(DOMRegionContext.XML_PI_OPEN));
- }
-
- @Test
- public void testXMLPICloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_PI_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.PI_BORDER, regionMap.get(DOMRegionContext.XML_PI_CLOSE));
- }
-
- @Test
- public void testXMLDeclartionOpenRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DECLARATION_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXML.DECL_BORDER, regionMap.get(DOMRegionContext.XML_DECLARATION_OPEN));
- }
-
- @Test
- public void testXMLDeclartionCloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DECLARATION_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.DECL_BORDER, regionMap.get(DOMRegionContext.XML_DECLARATION_CLOSE));
- }
-
- @Test
- public void testXMLDocTypeExternalIdSysrefRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF));
- assertEquals("Incorrect value", IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF));
- }
-
- @Test
- public void testXMLDocTypeExternalIdPubrefRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF));
- assertEquals("Incorrect value", IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF));
- }
-
- @Test
- public void testXMLDocTypeExternalIdPublicRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC));
- assertEquals("Incorrect value", IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC));
- }
-
- @Test
- public void testXMLDocTypeExternalIdSystemRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM));
- assertEquals("Incorrect value", IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, regionMap.get(DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM));
- }
-
- @Test
- public void testUndefinedRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.UNDEFINED));
- assertEquals("Incorrect value", IStyleConstantsXML.CDATA_TEXT, regionMap.get(DOMRegionContext.UNDEFINED));
- }
-
- @Test
- public void testWhiteSpaceRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.WHITE_SPACE));
- assertEquals("Incorrect value", IStyleConstantsXML.XML_CONTENT, regionMap.get(DOMRegionContext.WHITE_SPACE));
- }
-
- @Test
- public void testXMLEmptyTagClose() throws Exception {
- assertNotNull("Region Not Found.", regionMap.get(DOMRegionContext.XML_EMPTY_TAG_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXML.TAG_BORDER, regionMap.get(DOMRegionContext.XML_EMPTY_TAG_CLOSE));
- }
-
- private Map<String, String> getRegionMap() {
- XMLRegionMap xmlRegionMap = XMLRegionMap.getInstance();
- Map<String, String> regionMap = xmlRegionMap.getRegionMap();
- return regionMap;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLLineStyleProvider.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLLineStyleProvider.java
deleted file mode 100644
index 50bfc76..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLLineStyleProvider.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver - STAR - bug 213775 - intial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.ui.tests.style;
-
-import java.io.File;
-import static org.junit.Assert.*;
-import java.io.IOException;
-import java.util.ArrayList;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocumentExtension3;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewerExtension5;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.Highlighter;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xsl.ui.internal.StructuredTextViewerConfigurationXSL;
-import org.eclipse.wst.xsl.ui.tests.AbstractXSLUITest;
-import org.eclipse.wst.xsl.core.internal.text.rules.StructuredTextPartitionerForXSL;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests everything about code completion and code assistance.
- *
- */
-public class TestXSLLineStyleProvider extends AbstractXSLUITest {
-
- protected String projectName = null;
- protected String fileName = null;
- protected IFile file = null;
- protected IEditorPart textEditorPart = null;
- protected ITextEditor editor = null;
-
- protected XMLDocumentLoader xmlDocumentLoader = null;
- protected IStructuredDocument document = null;
- protected StructuredTextViewer sourceViewer = null;
- protected StructuredTextViewerConfigurationXSL xslConfiguration = new StructuredTextViewerConfigurationXSL();
- protected String Partitioning = IDocumentExtension3.DEFAULT_PARTITIONING;
- protected StructuredTextPartitionerForXSL defaultPartitioner = new StructuredTextPartitionerForXSL();
- protected Shell shell = null;
- protected Composite parent = null;
-
- public TestXSLLineStyleProvider() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * Setup the necessary projects, files, and source viewer for the tests.
- */
- @Before
- public void setUp() throws Exception {
- super.setUp();
- setupProject();
-
- }
-
- protected void loadFileForTesting(String xslFilePath)
- throws ResourceAlreadyExists, ResourceInUse, IOException,
- CoreException {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(
- new Path(xslFilePath));
- if (file != null && !file.exists()) {
- fail("Unable to locate " + fileName + " stylesheet.");
- }
-
- loadXSLFile();
-
- initializeSourceViewer();
- }
-
- protected void initializeSourceViewer() {
- // some test environments might not have a "real" display
- if (Display.getCurrent() != null) {
-
- if (PlatformUI.isWorkbenchRunning()) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell();
- } else {
- shell = new Shell(Display.getCurrent());
- }
- parent = new Composite(shell, SWT.NONE);
-
- // dummy viewer
- sourceViewer = new StructuredTextViewer(parent, null, null, false,
- SWT.NONE);
- } else {
- fail("Unable to run the test as a display must be available.");
- }
-
- configureSourceViewer();
- }
-
- protected void configureSourceViewer() {
- sourceViewer.configure(xslConfiguration);
-
- sourceViewer.setDocument(document);
- }
-
- private IStructuredModel model = null;
-
- protected void loadXSLFile() throws ResourceAlreadyExists, ResourceInUse,
- IOException, CoreException {
- IModelManager modelManager = StructuredModelManager.getModelManager();
- model = modelManager.getNewModelForEdit(file, true);
- document = model.getStructuredDocument();
- IDocumentPartitioner partitioner = defaultPartitioner.newInstance();
- partitioner.connect(document);
- document.setDocumentPartitioner(partitioner);
- }
-
- protected void setupProject() {
- projectName = "xsltestfiles";
- IProjectDescription description = ResourcesPlugin.getWorkspace()
- .newProjectDescription(projectName);
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
- projectName);
- try {
- project.create(description, new NullProgressMonitor());
- project.open(new NullProgressMonitor());
- } catch (CoreException e) {
-
- }
- }
-
- @After
- public void tearDown() throws Exception {
- super.tearDown();
- parent.dispose();
- if (model != null) {
- model.releaseFromEdit();
- }
- }
-
- private LineStyleProvider[] getLineStyleProviders() {
- LineStyleProvider[] lineStyleProviders = xslConfiguration
- .getLineStyleProviders(sourceViewer, IXMLPartitions.XML_DEFAULT);
- return lineStyleProviders;
- }
-
- private void setUpTest(String file) throws ResourceAlreadyExists,
- ResourceInUse, IOException, CoreException {
- fileName = file;
- String xslFilePath = projectName + File.separator + fileName;
- loadFileForTesting(xslFilePath);
- IStructuredDocument document = (IStructuredDocument) sourceViewer
- .getDocument();
- assertNotNull("Missing Document Partitioner", document
- .getDocumentPartitioner());
- }
-
- private LineStyleProvider initializeProvider() {
- LineStyleProvider[] lineStyleProviders = getLineStyleProviders();
- LineStyleProvider lineStyleProvider = lineStyleProviders[0];
-
- Highlighter highlighter = new Highlighter();
- lineStyleProvider.init(document, highlighter);
- return lineStyleProvider;
- }
-
- private IRegion getDocumentRangeFromWidgetRange(int offset, int length) {
- IRegion styleRegion = null;
- if (sourceViewer instanceof ITextViewerExtension5) {
- ITextViewerExtension5 extension = sourceViewer;
- styleRegion = extension.widgetRange2ModelRange(new Region(offset,
- length));
- } else {
- IRegion vr = null;
- if (sourceViewer != null)
- vr = sourceViewer.getVisibleRegion();
- else
- vr = new Region(0, document.getLength());
-
- if (offset <= vr.getLength()) {
- styleRegion = new Region(offset + vr.getOffset(), length);
- }
- }
- return styleRegion;
- }
-
- private void applyStyles(LineStyleProvider provider,
- ITypedRegion[] partitions, ArrayList holdStyleResults) {
- for (int i = 0; i < partitions.length; i++) {
- ITypedRegion currentPartition = partitions[i];
- boolean handled = provider.prepareRegions(currentPartition,
- currentPartition.getOffset(), currentPartition.getLength(),
- holdStyleResults);
- if (Debug.syntaxHighlighting) {
- if (!handled) {
- System.out
- .println("Did not handle highlighting in Highlighter inner while"); //$NON-NLS-1$
- }
- }
- }
- }
-
- @Test
- public void testHasLineStyleProvider() throws Exception {
- setUpTest("utils.xsl");
-
- LineStyleProvider[] lineStyleProviders = getLineStyleProviders();
- assertNotNull("No line style providers found.", lineStyleProviders);
- assertEquals("Wrong number of providers", 1, lineStyleProviders.length);
- }
-
- @Test
- public void testInitializeLineStyleProvider() throws Exception {
- setUpTest("utils.xsl");
- initializeProvider();
- }
-
- @Test
- public void testPrepareRegion() throws Exception {
- setUpTest("utils.xsl");
- LineStyleProvider provider = initializeProvider();
- ITypedRegion[] partitions = setupPartitions();
-
- assertTrue("No Partitions found.", partitions.length > 0);
- ArrayList holdStyleResults = new ArrayList();
- applyStyles(provider, partitions, holdStyleResults);
- assertFalse("No styles applied.", holdStyleResults.isEmpty());
- assertEquals("Unexpected StyleRange size", 241, holdStyleResults.size());
- }
-
- private ITypedRegion[] setupPartitions() throws BadLocationException {
- int startOffset = document.getFirstStructuredDocumentRegion()
- .getStartOffset();
- int endLineLength = document.getLength();
-
- IRegion styleRegion = getDocumentRangeFromWidgetRange(startOffset,
- endLineLength);
- ITypedRegion[] partitions = TextUtilities.computePartitioning(document,
- Partitioning, styleRegion.getOffset(), styleRegion.getLength(),
- false);
- return partitions;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLRegionMap.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLRegionMap.java
deleted file mode 100644
index 2ea72a9..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/style/TestXSLRegionMap.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- *Copyright (c) 2008, 2009 Standards for Technology in Automotive Retail and others.
- *All rights reserved. This program and the accompanying materials
- *are 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:
- * David Carver (STAR) - bug 249716 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.style;
-
-import java.util.Map;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xsl.ui.internal.style.IStyleConstantsXSL;
-import org.eclipse.wst.xsl.ui.internal.style.XSLRegionMap;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
-
-public class TestXSLRegionMap {
- Map<String, String> regionMap = null;
-
- @Before
- public void setUp() throws Exception {
- regionMap = getXSLRegionMap();
- }
-
- @After
- public void tearDown() throws Exception {
- regionMap = null;
- }
-
- private Map<String, String> getXSLRegionMap() {
- XSLRegionMap xslRegionMap = XSLRegionMap.getInstance();
- return xslRegionMap.getRegionMap();
- }
-
- public void testXSLTagOpenContentRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_BORDER, regionMap.get(DOMRegionContext.XML_TAG_OPEN));
-
- }
-
- @Test
- public void testXSLEndTagOpenContentRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_END_TAG_OPEN));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_BORDER, regionMap.get(DOMRegionContext.XML_END_TAG_OPEN));
-
- }
-
- @Test
- public void testXSLTagCloseContentRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_BORDER, regionMap.get(DOMRegionContext.XML_TAG_CLOSE));
-
- }
-
- @Test
- public void testXSLEmptyTagCloseRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_EMPTY_TAG_CLOSE));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_BORDER, regionMap.get(DOMRegionContext.XML_EMPTY_TAG_CLOSE));
-
- }
-
- @Test
- public void testXSLTagAttributeNameRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_ATTRIBUTE_NAME, regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME));
-
- }
-
- @Test
- public void testXSLTagNameRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_NAME));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_NAME, regionMap.get(DOMRegionContext.XML_TAG_NAME));
-
- }
-
- @Test
- public void testXSLTagAttributeValueRegion() throws Exception {
- assertNotNull("Region Not Found", regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE));
- assertEquals("Incorrect value", IStyleConstantsXSL.TAG_ATTRIBUTE_VALUE, regionMap.get(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE));
-
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/templates/TestTemplateContextTypeXSL.java b/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/templates/TestTemplateContextTypeXSL.java
deleted file mode 100644
index 95dfab2..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/src/org/eclipse/wst/xsl/ui/tests/templates/TestTemplateContextTypeXSL.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Intalio Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Carver (Intalio) - bug 325473
- *******************************************************************************/
-package org.eclipse.wst.xsl.ui.tests.templates;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.text.templates.TemplateVariableResolver;
-import org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL;
-
-import org.junit.*;
-import static org.junit.Assert.*;
-
-public class TestTemplateContextTypeXSL {
-
- @Test
- public void testXSLTemplateContextType() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- }
-
- @Test
- public void testCursorVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("cursor")) {
- return;
- }
- }
-
- fail("Cursor variable resolver was not found.");
- }
-
- @Test
- public void testDateVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("date")) {
- return;
- }
- }
-
- fail("Date variable resolver was not found.");
- }
-
- @Test
- public void testYearVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("year")) {
- return;
- }
- }
-
- fail("Year variable resolver was not found.");
- }
-
- @Test
- public void testTimeVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("time")) {
- return;
- }
- }
-
- fail("Time variable resolver was not found.");
- }
-
- @Test
- public void testUserVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("user")) {
- return;
- }
- }
-
- fail("User variable resolver was not found.");
- }
-
- @Test
- public void testDollarVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("dollar")) {
- return;
- }
- }
-
- fail("User variable resolver was not found.");
- }
-
- @Test
- public void testWordSelectionVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("word_selection")) {
- return;
- }
- }
-
- fail("Word Selection variable resolver was not found.");
- }
-
- @Test
- public void testLineSelectionVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("line_selection")) {
- return;
- }
- }
-
- fail("Line Selection variable resolver was not found.");
- }
-
- @Test
- public void testXMLEncodingVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("encoding")) {
- return;
- }
- }
-
- fail("Encoding Selection variable resolver was not found.");
- }
-
- @Test
- public void testXSLVersionVariableAvailable() throws Exception {
- TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
- Iterator<TemplateVariableResolver> variables = contextType.resolvers();
-
- while (variables.hasNext()) {
- TemplateVariableResolver resolver = variables.next();
- if (resolver.getType().equals("xsl_version")) {
- return;
- }
- }
-
- fail("XSL Version variable resolver was not found.");
- }
-
-}
diff --git a/tests/org.eclipse.wst.xsl.ui.tests/test.xml b/tests/org.eclipse.wst.xsl.ui.tests/test.xml
deleted file mode 100644
index 5ddd305..0000000
--- a/tests/org.eclipse.wst.xsl.ui.tests/test.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
-
- <!-- should be little need to change what's above -->
- <property
- name="plugin-name"
- value="org.eclipse.wst.xsl.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xsl.ui.tests.XSLUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
-
-</project>