diff options
author | Nitin Dahyabhai | 2013-01-10 18:21:08 +0000 |
---|---|---|
committer | Nitin Dahyabhai | 2013-01-10 18:21:08 +0000 |
commit | 68de84ea0401aecf4ef871dc9e46304c63d6305e (patch) | |
tree | 4570bd5f7d8bb803c5280502f3b800830f37cbdf | |
parent | 03300642e8e41f25ed36dbd46d2bc76b221ff1fc (diff) | |
download | webtools.sourceediting-68de84ea0401aecf4ef871dc9e46304c63d6305e.tar.gz webtools.sourceediting-68de84ea0401aecf4ef871dc9e46304c63d6305e.tar.xz webtools.sourceediting-68de84ea0401aecf4ef871dc9e46304c63d6305e.zip |
[nobug] merge development/org.eclipse.wst.sse.unittests
24 files changed, 812 insertions, 0 deletions
diff --git a/development/org.eclipse.wst.sse.unittests/.classpath b/development/org.eclipse.wst.sse.unittests/.classpath new file mode 100644 index 0000000000..bfb335329e --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> + <classpathentry path="org.eclipse.pde.core.requiredPlugins" kind="con"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/development/org.eclipse.wst.sse.unittests/.project b/development/org.eclipse.wst.sse.unittests/.project new file mode 100644 index 0000000000..e6f5109345 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.wst.sse.unittests</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/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.core.resources.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..afa5c91352 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Tue Apr 04 03:36:32 EDT 2006 +eclipse.preferences.version=1 +encoding/<project>=ISO-8859-1 diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..2dd8b5cef1 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,80 @@ +#Sun Apr 16 14:37:21 EDT 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.3 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.ui.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..ef2ac6532b --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +#Tue Apr 04 03:36:39 EDT 2006 +eclipse.preferences.version=1 +internal.default.compliance=default diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.ltk.core.refactoring.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000000..c59368c5e1 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,3 @@ +#Tue Apr 04 03:36:32 EDT 2006 +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs new file mode 100644 index 0000000000..f724958463 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs @@ -0,0 +1,15 @@ +#Sun Apr 16 14:05:29 EDT 2006 +compilers.p.build=0 +compilers.p.deprecated=1 +compilers.p.illegal-att-value=0 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=0 +compilers.p.unknown-attribute=0 +compilers.p.unknown-class=0 +compilers.p.unknown-element=0 +compilers.p.unknown-resource=0 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.p.unused-element-or-attribute=0 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF b/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..25d4679ae3 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF @@ -0,0 +1,44 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name.0 +Bundle-SymbolicName: org.eclipse.wst.sse.unittests; singleton:=true +Bundle-Version: 0.7.0 +Bundle-ClassPath: . +Bundle-Vendor: %Bundle-Vendor.0 +Bundle-Localization: plugin +Export-Package: org.eclipse.wst.sse.unittests, + org.eclipse.wst.sse.unittests.minortools +Require-Bundle: org.junit;bundle-version="3.8.0", + org.eclipse.core.runtime, + org.eclipse.wst.css.tests.encoding;resolution:=optional, + org.eclipse.wst.css.core.tests;resolution:=optional, + org.eclipse.wst.css.ui.tests;resolution:=optional, + org.eclipse.wst.dtd.core.tests;resolution:=optional, + org.eclipse.wst.dtd.ui.tests;resolution:=optional, + org.eclipse.wst.html.core.tests;resolution:=optional, + org.eclipse.wst.html.tests.encoding;resolution:=optional, + org.eclipse.wst.html.ui.tests;resolution:=optional, + org.eclipse.wst.sse.core.tests;resolution:=optional, + org.eclipse.wst.sse.ui.tests;resolution:=optional, + org.eclipse.wst.xml.core.tests;resolution:=optional, + org.eclipse.wst.xml.tests.encoding;resolution:=optional, + org.eclipse.wst.xml.validation.tests;resolution:=optional, + org.eclipse.wst.xsd.validation.tests;resolution:=optional, + org.eclipse.wst.css.ui.tests;resolution:=optional, + org.eclipse.wst.sse.ui;resolution:=optional, + org.eclipse.wst.xml.ui;resolution:=optional, + org.eclipse.wst.xml.ui.tests;resolution:=optional, + org.eclipse.jst.jsp.core.tests;resolution:=optional, + org.eclipse.jst.jsp.tests.encoding;resolution:=optional, + org.eclipse.jst.jsp.ui.tests;resolution:=optional, + org.eclipse.wst.xsd.core.tests;resolution:=optional, + org.eclipse.wst.xsd.ui.tests;resolution:=optional, + org.eclipse.wst.xsl.tests;resolution:=optional, + org.eclipse.wst.jsdt.core.tests.compiler;resolution:=optional, + org.eclipse.wst.jsdt.core.tests.model;resolution:=optional, + org.eclipse.wst.jsdt.ui.tests;resolution:=optional, + org.eclipse.wst.jsdt.web.core.tests;resolution:=optional, + org.eclipse.wst.jsdt.web.ui.tests;resolution:=optional +Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true diff --git a/development/org.eclipse.wst.sse.unittests/SSE Master List Test Suite.launch b/development/org.eclipse.wst.sse.unittests/SSE Master List Test Suite.launch new file mode 100644 index 0000000000..582c9cab45 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/SSE Master List Test Suite.launch @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="false"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="true"/> +<booleanAttribute key="clearws" value="true"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/SSE Master List Test Suite"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> +<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.wst.sse.unittests.MasterListTestSuite"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -showLocation -consoleLog"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.wst.sse.unittests"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms100M -Xmx600M -XX:MaxPermSize=192M"/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.sdk.ide"/> +<booleanAttribute key="run_in_ui_thread" value="true"/> +<booleanAttribute key="show_selected_only" value="false"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useCustomFeatures" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="true"/> +<booleanAttribute key="useProduct" value="true"/> +</launchConfiguration> diff --git a/development/org.eclipse.wst.sse.unittests/build.properties b/development/org.eclipse.wst.sse.unittests/build.properties new file mode 100644 index 0000000000..bde1454301 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2007 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 +############################################################################### +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties +source.. = src/ diff --git a/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif b/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif Binary files differnew file mode 100644 index 0000000000..75ebdb8586 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif diff --git a/development/org.eclipse.wst.sse.unittests/plugin.properties b/development/org.eclipse.wst.sse.unittests/plugin.properties new file mode 100644 index 0000000000..8c4370bf31 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/plugin.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2001, 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 +# +############################################################################### +XML_Source_Page_Editor.name=XML Source Page Editor +JavaScript_Source_Page_Editor.name=JavaScript Source Page Editor + +Bundle-Vendor.0 = Eclipse.org +Bundle-Name.0 = Unit Tests +additionalTests=Additional TestCases and TestSuites
\ No newline at end of file diff --git a/development/org.eclipse.wst.sse.unittests/plugin.xml b/development/org.eclipse.wst.sse.unittests/plugin.xml new file mode 100644 index 0000000000..6dd4917856 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/plugin.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.ui.editors"> + <editor + name="%XML_Source_Page_Editor.name" + icon="icons/sourceEditor.gif" + contributorClass="org.eclipse.wst.xml.ui.internal.actions.ActionContributorXML" + class="org.eclipse.wst.sse.ui.StructuredTextEditor" + symbolicFontName="org.eclipse.wst.sse.ui.textfont" + id="org.eclipse.core.runtime.xml.source"> + <contentTypeBinding + contentTypeId="org.eclipse.core.runtime.xml" /> + <contentTypeBinding + contentTypeId="org.eclipse.wst.xml.core.xmlsource" /> + </editor> + </extension> + + <extension-point id="additionalTests" name="%additionalTests" schema="schema/additionalTests.exsd"/> + +</plugin> diff --git a/development/org.eclipse.wst.sse.unittests/schema/additionalTests.exsd b/development/org.eclipse.wst.sse.unittests/schema/additionalTests.exsd new file mode 100644 index 0000000000..e0e5893e18 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/schema/additionalTests.exsd @@ -0,0 +1,123 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.eclipse.wst.sse.unittests"> +<annotation> + <appInfo> + <meta.schema plugin="org.eclipse.wst.sse.unittests" id="additionalTests" name="%additionalTests"/> + </appInfo> + <documentation> + This extension point provides a way to add extra test cases and suites to the already running list without declaring a runtime dependency in this plug-in. + </documentation> + </annotation> + + <element name="extension"> + <complexType> + <choice minOccurs="0" maxOccurs="unbounded"> + <element ref="test"/> + <element ref="suite"/> + </choice> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appInfo> + <meta.attribute translatable="true"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="test"> + <annotation> + <documentation> + Adds an individual Test case to run. + </documentation> + </annotation> + <complexType> + <attribute name="class" type="string" use="required"> + <annotation> + <documentation> + The Test class name. + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn="junit.framework.Test:"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="suite"> + <annotation> + <documentation> + Adds a TestSuite to run. + </documentation> + </annotation> + <complexType> + <attribute name="class" type="string" use="required"> + <annotation> + <documentation> + The TestSuite class name. + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn="junit.framework.TestSuite:"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appInfo> + <meta.section type="since"/> + </appInfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="examples"/> + </appInfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="apiInfo"/> + </appInfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="implementation"/> + </appInfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java new file mode 100644 index 0000000000..97cb8ca6c4 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java @@ -0,0 +1,125 @@ +/***************************************************************************** + * Copyright (c) 2004, 2009 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.sse.unittests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jst.jsp.core.tests.JSPCoreTestSuite; +import org.eclipse.jst.jsp.tests.encoding.JSPEncodingTestSuite; +import org.eclipse.jst.jsp.ui.tests.JSPUITestSuite; +import org.eclipse.wst.css.core.tests.CSSCoreTestSuite; +import org.eclipse.wst.css.tests.encoding.CSSEncodingTestSuite; +import org.eclipse.wst.css.ui.tests.CSSUITestSuite; +import org.eclipse.wst.dtd.core.tests.DTDCoreTestSuite; +import org.eclipse.wst.dtd.ui.tests.DTDUITestSuite; +import org.eclipse.wst.html.core.tests.HTMLCoreTestSuite; +import org.eclipse.wst.html.tests.encoding.HTMLEncodingTestSuite; +import org.eclipse.wst.html.ui.tests.HTMLUITestSuite; +import org.eclipse.wst.jsdt.core.tests.RunJSDTCoreTests; +import org.eclipse.wst.jsdt.core.tests.compiler.JSDTCompilerTests; +import org.eclipse.wst.jsdt.ui.tests.JSDTUITests; +import org.eclipse.wst.jsdt.web.core.tests.AllWebCoreTests; +import org.eclipse.wst.jsdt.web.ui.tests.AllWebUITests; +import org.eclipse.wst.sse.core.tests.SSEModelTestSuite; +import org.eclipse.wst.sse.ui.tests.SSEUITestSuite; +import org.eclipse.wst.xml.core.tests.SSEModelXMLTestSuite; +import org.eclipse.wst.xml.tests.encoding.EncodingTestSuite; +import org.eclipse.wst.xml.ui.tests.XMLUITestSuite; +import org.eclipse.wst.xml.validation.tests.internal.AllXMLTests; +import org.eclipse.wst.xsd.core.tests.internal.AllXSDCoreTests; +import org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests; + +public class MasterListTestSuite extends TestSuite { + private static final String CLASS = "class"; + private static final String EXTENSION_POINT_ID = "org.eclipse.wst.sse.unittests.additionalTests"; + + public MasterListTestSuite() { + super("WTP Source Editing Master List Test Suite"); + + System.setProperty("wtp.autotest.noninteractive", "true"); + + addTest(SSEModelTestSuite.suite()); + + addTest(SSEModelXMLTestSuite.suite()); + addTest(DTDCoreTestSuite.suite()); + addTest(AllXSDCoreTests.suite()); + addTest(CSSCoreTestSuite.suite()); + addTest(HTMLCoreTestSuite.suite()); + addTest(JSPCoreTestSuite.suite()); + + addTest(EncodingTestSuite.suite()); + addTest(CSSEncodingTestSuite.suite()); + addTest(HTMLEncodingTestSuite.suite()); + addTest(JSPEncodingTestSuite.suite()); + + addTest(AllXMLTests.suite()); + addTest(AllXSDTests.suite()); + + addTest(SSEUITestSuite.suite()); + addTest(XMLUITestSuite.suite()); + addTest(DTDUITestSuite.suite()); + addTest(CSSUITestSuite.suite()); + addTest(HTMLUITestSuite.suite()); + addTest(JSPUITestSuite.suite()); + + addTest(RunJSDTCoreTests.suite()); + addTest(JSDTCompilerTests.suite()); + addTest(JSDTUITests.suite()); + addTest(AllWebCoreTests.suite()); + addTest(AllWebUITests.suite()); + + +// addTest(new AllTestsSuite()); + + // addTest(RegressionBucket.suite()); + // addTest(AllTestCases.suite()); + + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID); + for (int i = 0; i < elements.length; i++) { + if (elements[i].getName().equals("suite")) { + TestSuite suite; + try { + suite = (TestSuite) elements[i].createExecutableExtension(CLASS); + addTestSuite(suite.getClass()); + System.err.println("Adding TestSuite " + suite.getClass().getName()); + } + catch (CoreException e) { + e.printStackTrace(System.err); + Platform.getLog(Platform.getBundle("org.eclipse.wst.sse.unittests")).log(e.getStatus()); + } + } + else if (elements[i].getName().equals("test")) { + Test test; + try { + test = (Test) elements[i].createExecutableExtension(CLASS); + addTestSuite(test.getClass()); + System.err.println("Adding TestCase " + test.getClass().getName()); + } + catch (CoreException e) { + e.printStackTrace(System.err); + Platform.getLog(Platform.getBundle("org.eclipse.wst.sse.unittests")).log(e.getStatus()); + } + } + } + } + + public void testAll() { + // this method needs to exist, but doesn't really do anything + // other than to signal to create an instance of this class. + // The rest it automatic from the tests added in constructor. + } +} diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/TestTurkish.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/TestTurkish.java new file mode 100644 index 0000000000..939c544208 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/TestTurkish.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2004, 2007 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.sse.unittests; + +import java.util.Locale; + +/** + * TestTurkish + * See http://www.i18nguy.com/unicode/turkish-i18n.html + */ + +public class TestTurkish { + public static void main(String[] args) { + String turkishLowerCase = "\u0131" + "\u0069"; + String turkishUpperCase = "\u0130" + "\u0049"; + Locale[] locales = Locale.getAvailableLocales(); + for (int i = 0; i < locales.length; i++) { + // System.out.println(locales[i]); + } + Locale turkishLocale = new Locale("TR"); + String testUppercase = turkishLowerCase.toUpperCase(turkishLocale); + System.out.println(turkishUpperCase.equals(testUppercase)); + } +} diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java new file mode 100644 index 0000000000..578fc46fde --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2004, 2007 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.sse.unittests.minortools; + +import java.io.IOException; +import java.io.StringReader; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * TestString + */ + +public class TestString { + + public static void main(String[] args) { + + + String xml = "<?xml version=\"1.0\" encoding=\"UTF-16\"?><message><sourceUri></sourceUri><body></body></message>"; + + + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(false); + factory.setValidating(false); + try { + DocumentBuilder builder = factory.newDocumentBuilder(); + Document document = builder.parse(new InputSource(new StringReader(xml))); + if (document != null) { + System.out.print(document.hasChildNodes()); + } + System.out.println(document); + } + catch (ParserConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + catch (SAXException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + +} diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java new file mode 100644 index 0000000000..aa2e238027 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2004, 2005 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.sse.unittests.minortools; + + + +public class TestStringUtils { + + /** + * TestStringUtils constructor comment. + */ + private TestStringUtils() { + super(); + } + + /** + * Replace matching literal portions of a string with another string + */ + public static String replace(String aString, String source, String target) { + if (aString == null) + return null; + String normalString = ""; //$NON-NLS-1$ + int length = aString.length(); + int position = 0; + int previous = 0; + int spacer = source.length(); + while (position + spacer - 1 < length && aString.indexOf(source, position) > -1) { + position = aString.indexOf(source, previous); + normalString = normalString + aString.substring(previous, position) + target; + position += spacer; + previous = position; + } + normalString = normalString + aString.substring(position, aString.length()); + + return normalString; + } + +} diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java new file mode 100644 index 0000000000..61ed9c5068 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2004, 2005 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.sse.unittests.minortools; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.eclipse.wst.xml.core.tests.util.CommonXML; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + + + +/** + * Modifies plugin.xml and fragment.xml files to not require specific versions + * of their plugin dependencies. + * + * @author nitin + */ +public class VersionRemover { + + char[] charbuff = new char[2048]; + StringBuffer s = null; + + public VersionRemover() { + super(); + } + + + + public static void main(String[] args) { + if (args.length < 1) + new VersionRemover().visit(new File("d:/target")); + else + new VersionRemover().visit(new File(args[0])); + } + + + + protected void visit(File file) { + // Skip directories like org.eclipse.*, org.apache.*, and org.junit.* + if (file.isDirectory() && !file.getName().startsWith("org.eclipse.") && !file.getName().startsWith("org.apache") && !file.getName().startsWith("org.junit")) { + String[] contents = file.list(); + for (int i = 0; i < contents.length; i++) + visit(new File(file.getAbsolutePath() + '/' + contents[i])); + } + else { + fixupFile(file); + } + } + + protected void fixupFile(File file) { + // only load and fixup files named plugin.xml or fragment.xml under eclipse\plugins\XXXXXXX.* + if (!(file.getName().equalsIgnoreCase("plugin.xml") || file.getName().equalsIgnoreCase("fragment.xml")) || file.getAbsolutePath().indexOf("eclipse\\plugins\\XXXXXXX.") == -1) + return; + // System.out.println(file.getAbsolutePath()); + try { + Document doc = CommonXML.getDocumentBuilder().parse(file); + NodeList imports = null; + if (file.getName().equalsIgnoreCase("plugin.xml")) + imports = doc.getElementsByTagName("import"); + else if (file.getName().equalsIgnoreCase("fragment.xml")) + imports = doc.getElementsByTagName("fragment"); + boolean changed = false; + for (int i = 0; i < imports.getLength(); i++) { + Node importNode = imports.item(i); + if (importNode.getNodeName().equalsIgnoreCase("import") && importNode.getAttributes().getNamedItem("version") != null) { + changed = true; + importNode.getAttributes().removeNamedItem("version"); + } + if (importNode.getAttributes().getNamedItem("plugin-version") != null) { + changed = true; + importNode.getAttributes().removeNamedItem("plugin-version"); + } + if (importNode.getAttributes().getNamedItem("match") != null) { + importNode.getAttributes().removeNamedItem("match"); + changed = true; + } + } + if (changed) { + FileOutputStream ostream = new FileOutputStream(file.getAbsolutePath()); + CommonXML.serialize(doc, ostream); + ostream.close(); + System.out.println("Modified " + file.getAbsolutePath()); + } + } + catch (SAXException e) { + System.err.println(file.getPath() + ": " + e); + } + catch (IOException e) { + System.err.println(file.getPath() + ": " + e); + } + } +} diff --git a/development/org.eclipse.wst.sse.unittests/src/testStringXML.jpage b/development/org.eclipse.wst.sse.unittests/src/testStringXML.jpage new file mode 100644 index 0000000000..0f1eaa00db --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/src/testStringXML.jpage @@ -0,0 +1,10 @@ +
+String xml="<?xml version=\"1.0\" encoding=\"UTF-8\"?><message><sourceUri></sourceUri><body></body></message>"; + + +DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); +factory.setNamespaceAware(false); +factory.setValidating(false); +DocumentBuilder builder = factory.newDocumentBuilder(); +Document document = builder.parse(new InputSource(new StringReader(xml))); +System.out.println(document);
\ No newline at end of file diff --git a/development/org.eclipse.wst.sse.unittests/testCreateTranslationAdapter.obj b/development/org.eclipse.wst.sse.unittests/testCreateTranslationAdapter.obj Binary files differnew file mode 100644 index 0000000000..69f6f2ca5c --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/testCreateTranslationAdapter.obj diff --git a/development/org.eclipse.wst.sse.unittests/testTranslationTextComparison.obj b/development/org.eclipse.wst.sse.unittests/testTranslationTextComparison.obj Binary files differnew file mode 100644 index 0000000000..69f6f2ca5c --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/testTranslationTextComparison.obj diff --git a/development/org.eclipse.wst.sse.unittests/tet.jsp b/development/org.eclipse.wst.sse.unittests/tet.jsp new file mode 100644 index 0000000000..191b21ecec --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/tet.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>content of lowercase title tags</title>
+<tıtle>content of lowercase title tags (no diaresis over i)</tıtle>
+<title>content of uppercase tags</title>
+<title></title>
+<title></title>
+<title></title>
+<title></title>
+</head>
+<body>
+<i></i>
+<i></i>
+<i></i>
+<i></i>
+</body>
+</html>
diff --git a/development/org.eclipse.wst.sse.unittests/turkishCase.jpage b/development/org.eclipse.wst.sse.unittests/turkishCase.jpage new file mode 100644 index 0000000000..ba96e61b21 --- /dev/null +++ b/development/org.eclipse.wst.sse.unittests/turkishCase.jpage @@ -0,0 +1,3 @@ + +String s = "\u0131"+"\u0069"; +s.toUpperCase();
\ No newline at end of file |