Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.jet.tests-feature/.project17
-rw-r--r--tests/org.eclipse.jet.tests-feature/build.properties7
-rw-r--r--tests/org.eclipse.jet.tests-feature/eclipse_update_120.jpgbin14641 -> 0 bytes
-rw-r--r--tests/org.eclipse.jet.tests-feature/epl-v10.html304
-rw-r--r--tests/org.eclipse.jet.tests-feature/feature.properties159
-rw-r--r--tests/org.eclipse.jet.tests-feature/feature.xml65
-rw-r--r--tests/org.eclipse.jet.tests-feature/license.html79
-rw-r--r--tests/org.eclipse.jet.tests-feature/rootfiles/epl-v10.html304
-rw-r--r--tests/org.eclipse.jet.tests-feature/rootfiles/notice.html86
-rw-r--r--tests/org.eclipse.jet.tests.core/.classpath7
-rw-r--r--tests/org.eclipse.jet.tests.core/.cvsignore1
-rw-r--r--tests/org.eclipse.jet.tests.core/.project28
-rw-r--r--tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--tests/org.eclipse.jet.tests.core/META-INF/MANIFEST.MF13
-rw-r--r--tests/org.eclipse.jet.tests.core/about.html29
-rw-r--r--tests/org.eclipse.jet.tests.core/build.properties7
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet6
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet11
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected41
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet34
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected93
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet8
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet36
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected74
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected49
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected19
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected11
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet9
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected16
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates folder.jarbin1567 -> 0 bytes
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates folder.zipbin1567 -> 0 bytes
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/Copy of test1.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllTests.java20
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllToolsSuites.java60
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/FileUtils.java78
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/TestNewLineUtil.java49
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/TestURLUtility.java125
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/TestJETParser.java373
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/AllTests.java23
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/IncludeDependenciesTest.java136
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/LineInfoTests.java67
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestIncludeAlternativesTracker.java213
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManager.java177
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManagerBuilder.java95
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java78
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestUniqueNameGenerator.java131
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/ASTDumper.java184
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/AllTests.java18
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestInternalJET1Parser.java153
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestJETASTParser.java560
-rw-r--r--tests/org.eclipse.jet.tests.core/test.xml66
-rw-r--r--tests/org.eclipse.jet.tests/.classpath7
-rw-r--r--tests/org.eclipse.jet.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.jet.tests/.project28
-rw-r--r--tests/org.eclipse.jet.tests/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--tests/org.eclipse.jet.tests/.settings/org.eclipse.jdt.core.prefs59
-rw-r--r--tests/org.eclipse.jet.tests/META-INF/MANIFEST.MF18
-rw-r--r--tests/org.eclipse.jet.tests/about.html29
-rw-r--r--tests/org.eclipse.jet.tests/build.properties10
-rw-r--r--tests/org.eclipse.jet.tests/data/ActionsUtil/MANIFEST.MF17
-rw-r--r--tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16be.xmlbin150 -> 0 bytes
-rw-r--r--tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16le.xmlbin150 -> 0 bytes
-rw-r--r--tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_bom.xml4
-rw-r--r--tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_no_bom.xml4
-rw-r--r--tests/org.eclipse.jet.tests/data/DOMInspector.xml11
-rw-r--r--tests/org.eclipse.jet.tests/data/alljet2.jet34
-rw-r--r--tests/org.eclipse.jet.tests/data/alljet2.jet.expected93
-rw-r--r--tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java65
-rw-r--r--tests/org.eclipse.jet.tests/data/attributeParsingErrors.jet6
-rw-r--r--tests/org.eclipse.jet.tests/data/bean.model.sample.xml22
-rw-r--r--tests/org.eclipse.jet.tests/data/beanModel.badlocation.xml21
-rw-r--r--tests/org.eclipse.jet.tests/data/beanModel.xml21
-rw-r--r--tests/org.eclipse.jet.tests/data/beanModel.xsd39
-rw-r--r--tests/org.eclipse.jet.tests/data/beans.xsd43
-rw-r--r--tests/org.eclipse.jet.tests/data/bug147714.jet11
-rw-r--r--tests/org.eclipse.jet.tests/data/dm-example.xml37
-rw-r--r--tests/org.eclipse.jet.tests/data/dm-example.xsd145
-rw-r--r--tests/org.eclipse.jet.tests/data/jetast.ecore97
-rw-r--r--tests/org.eclipse.jet.tests/data/library.xml25
-rw-r--r--tests/org.eclipse.jet.tests/data/library.xml.indisguise25
-rw-r--r--tests/org.eclipse.jet.tests/data/lineinfo.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/lineinfo.jet.expected.txt10
-rw-r--r--tests/org.eclipse.jet.tests/data/newproject.nolocation.xml4
-rw-r--r--tests/org.eclipse.jet.tests/data/newproject.xml4
-rw-r--r--tests/org.eclipse.jet.tests/data/newproject.xsd81
-rw-r--r--tests/org.eclipse.jet.tests/data/plain.xml21
-rw-r--r--tests/org.eclipse.jet.tests/data/sample.dataaccess10
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/changedTemplates/simple.v2.input.jet11
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java118
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java83
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat1
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat21
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat31
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat41
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java23
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java39
-rw-r--r--tests/org.eclipse.jet.tests/data/taglibs.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.astdump.expected41
-rw-r--r--tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.expected.java114
-rw-r--r--tests/org.eclipse.jet.tests/data/taglibs.jet.astdump.expected46
-rw-r--r--tests/org.eclipse.jet.tests/data/taglibs.jet.expected.java114
-rw-r--r--tests/org.eclipse.jet.tests/data/textTrimmingTests.jet70
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedComment.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedDeclaration.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedDirective.jet1
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedExpression.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedScriplet.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedXMLEnd.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/unclosedXMLStart.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlEndWithAttributes.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlStartWithoutEnd.jet8
-rw-r--r--tests/org.eclipse.jet.tests/model/dataAccess.ecore24
-rw-r--r--tests/org.eclipse.jet.tests/model/dataAccess.genmodel25
-rw-r--r--tests/org.eclipse.jet.tests/plugin.properties19
-rw-r--r--tests/org.eclipse.jet.tests/plugin.xml48
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/Customer.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/DataAccessFactory.java73
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/DataAccessPackage.java503
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/Employee.java71
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/Order.java110
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/Person.java81
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/CustomerImpl.java147
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessFactoryImpl.java130
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessPackageImpl.java327
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/EmployeeImpl.java217
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/OrderImpl.java271
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/impl/PersonImpl.java215
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessAdapterFactory.java171
-rw-r--r--tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessSwitch.java195
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllSuites.java60
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java28
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/FileUtils.java93
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java22
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/LineInfoTests.java65
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestCompilationHelper.java163
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJET2Parser.java478
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJETParser.java370
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestSimplifiedCompiler.java428
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TextTrimmingTests.java225
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/AllTests.java19
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/EmfModelLoaderTests.java82
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/TestXMLDocumentLoads.java113
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/WorkspaceContextTests.java37
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/AllTests.java19
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/ResourceTemplateInputTest.java136
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverBuilderTest.java114
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverHelperFactoryTest.java126
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/AllTests.java19
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleDescriptions.java42
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleJarUtil.java47
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleLoading.java76
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestDirectoryBundleProvider.java83
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TagLibraryDataFactoryTests.java104
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TestTagLibManager.java58
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/LoadTagTests.java48
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java21
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java42
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java60
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/LowerCaseTagTests.java209
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UpperCaseTagTests.java209
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java56
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/JavaActionsUtilTests.java70
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/TestImportsLocationTag.java136
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/ActionsUtilTests.java117
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/AllTests.java17
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AbstractExprTest.java93
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AllTests.java43
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AttributeStepTests.java71
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/BooleanFunctionTests.java61
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/Bug130552Workaround.java78
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/BuiltinStringFunctionsTests.java214
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/ChildStepTests.java145
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/DOMInspectorTests.java185
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/DescendantOrSelfTests.java58
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/EMFResourceInspectorTests.java116
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/EObjectInspectorTests.java1052
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/EStructuralFeatureSettingTests.java98
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/ExpandedNameTests.java88
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/LogicalOpTests.java54
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/NumberBinaryOpTests.java63
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/NumberFunctionTests.java39
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/ParentStepTests.java84
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/RelOpTests.java328
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/ResourceAttributeInspectorTests.java406
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/ResourceInspectorTests.java482
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/RootTests.java82
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/SelfStepTests.java117
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/StringFunctionTests.java61
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/VariableTests.java86
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathInspectorManagerTests.java45
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathOverDOMTests.java113
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathOverEcoreTests.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathOverEmfXmlXsdTests.java127
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathParserDefects.java35
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathParserTests.java768
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/XPathTokenScannerTests.java251
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/AllTests.java28
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CamelCaseFunctionTests.java42
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CardinalityFunctionTests.java84
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/ClassNameFunctionTests.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/EscapeJavaWhitespaceFunctionTests.java26
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowerCaseFunctionTests.java25
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowercaseFirstFunctionTests.java31
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/PackageNameFunctionTests.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/RemoveWhitespaceFunctionTests.java23
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/TrimWhitespaceFunctionTests.java24
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFirstFunctionTests.java41
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFunctionTests.java25
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/XMLEncodeFunctionTests.java25
-rw-r--r--tests/org.eclipse.jet.tests/test.xml66
250 files changed, 0 insertions, 18741 deletions
diff --git a/tests/org.eclipse.jet.tests-feature/.project b/tests/org.eclipse.jet.tests-feature/.project
deleted file mode 100644
index 56c9f02..0000000
--- a/tests/org.eclipse.jet.tests-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jet.tests-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jet.tests-feature/build.properties b/tests/org.eclipse.jet.tests-feature/build.properties
deleted file mode 100644
index 7f03a5e..0000000
--- a/tests/org.eclipse.jet.tests-feature/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# NLS_MESSAGEFORMAT_VAR
-root=rootfiles
-bin.includes = feature.xml,\
- eclipse_update_120.jpg,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/tests/org.eclipse.jet.tests-feature/eclipse_update_120.jpg b/tests/org.eclipse.jet.tests-feature/eclipse_update_120.jpg
deleted file mode 100644
index 68e3e02..0000000
--- a/tests/org.eclipse.jet.tests-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jet.tests-feature/epl-v10.html b/tests/org.eclipse.jet.tests-feature/epl-v10.html
deleted file mode 100644
index cb1073a..0000000
--- a/tests/org.eclipse.jet.tests-feature/epl-v10.html
+++ /dev/null
@@ -1,304 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- }
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- }
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
-
- }
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang="EN-US" style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests-feature/feature.properties b/tests/org.eclipse.jet.tests-feature/feature.properties
deleted file mode 100644
index 9f28475..0000000
--- a/tests/org.eclipse.jet.tests-feature/feature.properties
+++ /dev/null
@@ -1,159 +0,0 @@
-# /**
-# * <copyright>
-# *
-# * Copyright (c) 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 - Initial API and implementation
-# *
-# * </copyright>
-# *
-# * $Id$
-# */
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-# This file contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Java Emitter Templates (JET) Tests (Incubation)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the M2T update site
-updateSiteName=Eclipse Model to Text (M2T) Updates
-
-# "description" property - description of the feature
-description=Java Emitter Templates (JET) Tests (Incubation)
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/tests/org.eclipse.jet.tests-feature/feature.xml b/tests/org.eclipse.jet.tests-feature/feature.xml
deleted file mode 100644
index 4e8b72c..0000000
--- a/tests/org.eclipse.jet.tests-feature/feature.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.jet.tests"
- label="%featureName"
- version="0.8.1.qualifier"
- provider-name="%providerName">
-
- <description url="http://www.eclipse.org/modeling/m2t">
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 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
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/modeling/m2t/updates/"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.jet"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.emf.codegen"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.emf.ecore"/>
- <import plugin="org.eclipse.emf.ecore.xmi"/>
- <import plugin="org.eclipse.xsd"/>
- </requires>
-
- <plugin
- id="org.eclipse.jet.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.test"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.ant.optional.junit"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"/>
-
- <plugin
- id="org.eclipse.jet.tests.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/tests/org.eclipse.jet.tests-feature/license.html b/tests/org.eclipse.jet.tests-feature/license.html
deleted file mode 100644
index 74122b2..0000000
--- a/tests/org.eclipse.jet.tests-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/tests/org.eclipse.jet.tests-feature/rootfiles/epl-v10.html b/tests/org.eclipse.jet.tests-feature/rootfiles/epl-v10.html
deleted file mode 100644
index cb1073a..0000000
--- a/tests/org.eclipse.jet.tests-feature/rootfiles/epl-v10.html
+++ /dev/null
@@ -1,304 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- }
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- }
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
-
- }
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang="EN-US" style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests-feature/rootfiles/notice.html b/tests/org.eclipse.jet.tests-feature/rootfiles/notice.html
deleted file mode 100644
index da529cb..0000000
--- a/tests/org.eclipse.jet.tests-feature/rootfiles/notice.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-
-</body>
-</html>
diff --git a/tests/org.eclipse.jet.tests.core/.classpath b/tests/org.eclipse.jet.tests.core/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/tests/org.eclipse.jet.tests.core/.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.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jet.tests.core/.cvsignore b/tests/org.eclipse.jet.tests.core/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jet.tests.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jet.tests.core/.project b/tests/org.eclipse.jet.tests.core/.project
deleted file mode 100644
index ea64630..0000000
--- a/tests/org.eclipse.jet.tests.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jet.tests.core</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.jet.tests.core/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6e07d32..0000000
--- a/tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Tue May 22 14:41:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-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.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 4c1d5b1..0000000
--- a/tests/org.eclipse.jet.tests.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue May 22 14:41:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.jet.tests.core/META-INF/MANIFEST.MF b/tests/org.eclipse.jet.tests.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 8b812d2..0000000
--- a/tests/org.eclipse.jet.tests.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: JET Tools Unit Tests Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.jet.tests.core
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.jet.core,
- org.eclipse.core.filebuffers,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.text,
- org.junit
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/tests/org.eclipse.jet.tests.core/about.html b/tests/org.eclipse.jet.tests.core/about.html
deleted file mode 100644
index d4f39ad..0000000
--- a/tests/org.eclipse.jet.tests.core/about.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
- <h3>About This Content</h3>
-
- <p>June 5, 2007</p>
- <h3>License</h3>
-
- <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
- Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
- Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
- at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; 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 (&quot;Redistributor&quot;) and different terms and conditions may
- apply to your use of any object code in the Content. Check the Redistributor's 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>
- <p align="right"><small><a href="#top">go to top</a></small></p>
-
-</body>
-</html>
diff --git a/tests/org.eclipse.jet.tests.core/build.properties b/tests/org.eclipse.jet.tests.core/build.properties
deleted file mode 100644
index bce1562..0000000
--- a/tests/org.eclipse.jet.tests.core/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- data/,\
- about.html,\
- test.xml
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet
deleted file mode 100644
index 99bf3cc..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet
+++ /dev/null
@@ -1,6 +0,0 @@
-<%@taglib prefix="c" id="org.eclipse.jet.controlTags"%>
-
-<%-- The following line is missing a double quote (") on the 'var' attribute --%>
-<c:iterate select="foo" var="bar>
- some text parameterized by bar: <c:get select="$bar"/>
-</c:iterate> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet
deleted file mode 100644
index 5a8e497..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet
+++ /dev/null
@@ -1,11 +0,0 @@
-<%-- Bug 147714 requests the JET compiler to treat <tag ...> as <tag .../> if tag is an emptyTag.
-This is for compatibility with DPTK: http://www.alphaworks.ibm.com/tech/dptk.
-Since DPTK does not use namespace prefixes, the fix only applies to tags with not prefix.
---%>
-<%@taglib id="org.eclipse.jet.tests.TestLibrary2" prefix="c" %>
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="" %>
-
-<%-- line 8: expect error --%><c:nl>
-<%-- line 9: expect ok --%><c:nl/>
-<%-- line 10: expect warning --%><nl>
-<%-- line 11: expect ok --%><nl/>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected
deleted file mode 100644
index 86277b0..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected
+++ /dev/null
@@ -1,41 +0,0 @@
-<directive name="taglib" line="1" col="1">
- <attribute name="id">org.eclipse.jet.tests.TestLibrary</attribute>
- <attribute name="prefix">test</attribute>
-</directive>
-<data>"isAllUpper", "nl", "other", "tokenize", "upper"
-
-</data>
-<tag name="test:tokenize" line="4" col="1">
- <attribute name="string">a,b,c,d,e,f,g</attribute>
- <attribute name="sep">,</attribute>
- <attribute name="var">token</attribute>
- <content>
- <data></data>
- <tag name="test:other" line="5" col="1">
- <content>
- <data>some text</data>
- </content>
- </tag>
- <data>
-</data>
- <tag name="test:isAllUpper" line="6" col="1">
- <attribute name="var">token</attribute>
- <content>
- <data></data>
- </content>
- </tag>
- <data></data>
- <tag name="test:upper" line="8" col="1">
- <content>
- <data>foo</data>
- </content>
- </tag>
- <tag name="test:nl" line="8" col="29">
- </tag>
- <data>
-</data>
- <tag name="test:other" line="9" col="1">
- </tag>
- <data></data>
- </content>
-</tag>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet
deleted file mode 100644
index ba01d6f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%-- String x = "Hello World!"; -%>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet
deleted file mode 100644
index a12518f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%! public void foo() {} >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet
deleted file mode 100644
index c822dec..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet
+++ /dev/null
@@ -1 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet
deleted file mode 100644
index b67abe9..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%= "Hello World!" >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet
deleted file mode 100644
index dd654a9..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<% String x = "Hello World!"; >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet
deleted file mode 100644
index 08f095f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-</test:include
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet
deleted file mode 100644
index 31f3ccf..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-<test:include template="foo"
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet
deleted file mode 100644
index 241c44d..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet
+++ /dev/null
@@ -1,34 +0,0 @@
-<%@jet class="Foo" package="org.eclipse.emf.examples"%>
-Some top level text.
-<%= "An expression" %>
-<%!
-int foo() {
- return 3;
-}
-%>
-<%
-if(foo() > 0) {
- foo();
-}
-%>
-<%-- a comment --%>
-<test:container one="test one" two='test two'>
- <test:empty/>
- <test:container>
- some text <nontest:text attributes="foo"/>
- </test:container>
-</test:container>
-<%-- tags containing Java --%>
-<test:container>
- <%= foo(); %>
- <% if(foo() > 0) { %>
- some text
- <% } %>
-</test:container>
-<%-- Java container tags --%>
-<% if(foo() > 0) { %>
- some text
- <test:empty/>
- <test:container>
- </test:container>
-<% } %>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected
deleted file mode 100644
index 43b65a2..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected
+++ /dev/null
@@ -1,93 +0,0 @@
-<directive name="jet" start="(1,1)" stop="(1,56)">
- <attribute name="class">Foo</attribute>
- <attribute name="package">org.eclipse.emf.examples</attribute>
-</directive>
-<data>
-Some top level text.
-</data>
-<expression start="(3,4)" stop="(3,21)"> "An expression" </expression>
-<data>
-</data>
-<declaration start="(4,4)" stop="(8,1)">
-int foo() {
- return 3;
-}
-</declaration>
-<data>
-</data>
-<scriptlet start="(9,3)" stop="(13,1)">
-if(foo() > 0) {
- foo();
-}
-</scriptlet>
-<data>
-</data>
-<comment start="(14,5)" stop="(14,16)"> a comment </comment>
-<data>
-</data>
-<tag name="test:container" start="(15,1)" stop="(15,47)">
- <attribute name="one">test one</attribute>
- <attribute name="two">test two</attribute>
- <content>
- <data>
- </data>
- <tag name="test:empty" start="(16,5)" stop="(16,18)">
- </tag>
- <data>
- </data>
- <tag name="test:container" start="(17,5)" stop="(17,21)">
- <content>
- <data>
- some text <nontest:text attributes="foo"/>
- </data>
- </content>
- </tag>
- <data>
-</data>
- </content>
-</tag>
-<data>
-</data>
-<comment start="(21,5)" stop="(21,27)"> tags containing Java </comment>
-<data>
-</data>
-<tag name="test:container" start="(22,1)" stop="(22,17)">
- <content>
- <data>
- </data>
- <expression start="(23,8)" stop="(23,16)"> foo(); </expression>
- <data>
- </data>
- <scriptlet start="(24,7)" stop="(24,24)"> if(foo() > 0) { </scriptlet>
- <data>
- some text
- </data>
- <scriptlet start="(26,7)" stop="(26,10)"> } </scriptlet>
- <data>
-</data>
- </content>
-</tag>
-<data>
-</data>
-<comment start="(28,5)" stop="(28,26)"> Java container tags </comment>
-<data>
-</data>
-<scriptlet start="(29,3)" stop="(29,20)"> if(foo() > 0) { </scriptlet>
-<data>
- some text
- </data>
-<tag name="test:empty" start="(31,9)" stop="(31,22)">
-</tag>
-<data>
- </data>
-<tag name="test:container" start="(32,9)" stop="(32,25)">
- <content>
- <data>
- </data>
- </content>
-</tag>
-<data>
-</data>
-<scriptlet start="(34,3)" stop="(34,6)"> } </scriptlet>
-<data>
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet
deleted file mode 100644
index ba01d6f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%-- String x = "Hello World!"; -%>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet
deleted file mode 100644
index a12518f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%! public void foo() {} >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet
deleted file mode 100644
index c822dec..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet
+++ /dev/null
@@ -1 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet
deleted file mode 100644
index b67abe9..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%= "Hello World!" >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet
deleted file mode 100644
index dd654a9..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<% String x = "Hello World!"; >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet
deleted file mode 100644
index 08f095f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-</test:include
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet
deleted file mode 100644
index 31f3ccf..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-<test:include template="foo"
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet
deleted file mode 100644
index a614208..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-</test:start attr="value">
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet
deleted file mode 100644
index 54760f5..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet
+++ /dev/null
@@ -1,8 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<test:start attr="value">
-
-<test:start2 attr="two">
-
-</test:start>
-</test:start2> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt
deleted file mode 100644
index 4fecfd7..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-1:69:<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-2:48:"isAllUpper", "nl", "other", "tokenize", "upper"
-3:0:
-4:58:<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-5:34:<test:other>some text</test:other>
-6:29:<test:isAllUpper var="token">
-7:18:</test:isAllUpper>
-8:38:<test:upper>foo</test:upper><test:nl/>
-9:13:<test:other/>
-10:16:</test:tokenize>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc
deleted file mode 100644
index 1435b71..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc
+++ /dev/null
@@ -1,3 +0,0 @@
-This is content from include2.jetinc in alt1.
-<%@ include file="include2.jetinc" %>
-Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc
deleted file mode 100644
index 75d8420..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc
+++ /dev/null
@@ -1,4 +0,0 @@
-This is content from include2.jetinc in alt2.
-7 + 8 = <%= 7 + 8 %>
-<%@include file="include1.jetinc"%>
-Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet
deleted file mode 100644
index 264a6bf..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet
+++ /dev/null
@@ -1,36 +0,0 @@
-<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
---- before failing include with alternative >>>
-<%@include file="include1.fail.jetinc" fail="alternative"%>
-<%@start%>
- Alternative text to include1.fail.jetinc
- 2 + 4 = <%= 2 + 4 %>
- <%@include file="include1.jetinc" fail="alternative"%>
- <%@start%>
- Fail alternative for include1.jetinc within fail alternative of include1.fail.jetinc
- <%@end%>
- <%@include file="include2.fail.jetinc" fail="alternative"%>
- <%@start%>
- Fail alternative for include2.fail.jetinc within fail alternative of include1.fail.jetinc
- <%@end%>
-<%@end%>
-<<< after include ---
-
---- before successful include with alternative >>>
-<%@include file="include1.jetinc" fail="alternative"%>
-<%@start%>
- Alternative text to include1.jetinc - should not be processed
- 7 + 3 = <%= 7 + 3 %>
- <%@include file="include2.jetinc" fail="alternative"%>
- <%@start%>
- Fail alternative for include2.jetinc within fail alternative of include1.jetinc
- <%@end%>
- <%@include file="include2.fail.jetinc" fail="alternative"%>
- <%@start%>
- Fail alternative for include2.fail.jetinc within fail alternative of include1.jetinc
- <%@end%>
-<%@end%>
-<<< after include ---
-
---- before failing include with alternative >>>
-<%@include file="include1.fail.jetinc" fail="silent"%>
-<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected
deleted file mode 100644
index f0eef0e..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected
+++ /dev/null
@@ -1,74 +0,0 @@
-<directive name="jet" line="1" col="1">
- <attribute name="class">Simple</attribute>
- <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
-</directive>
-<data>--- before failing include with alternative >>>
-</data>
-<directive name="include" line="3" col="1">
- <attribute name="file">include1.fail.jetinc</attribute>
- <attribute name="fail">alternative</attribute>
-</directive>
-<data></data>
-<directive name="start" line="4" col="1">
-</directive>
-<data> Alternative text to include1.fail.jetinc
- 2 + 4 = </data>
-<expression line="6" col="14"> 2 + 4 </expression>
-<data>
- </data>
-<directive name="include" line="7" col="3">
- <attribute name="file">include1.jetinc</attribute>
- <attribute name="fail">alternative</attribute>
-</directive>
-<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
- <data>This is content from include1.jetinc in base.
-3 + 5 = </data>
- <expression line="2" col="12"> 3 + 5 </expression>
- <data>
-Done
-</data>
-</included>
-<data> </data>
-<data>
-</data>
-<directive name="include" line="11" col="3">
- <attribute name="file">include2.fail.jetinc</attribute>
- <attribute name="fail">alternative</attribute>
-</directive>
-<data></data>
-<directive name="start" line="12" col="3">
-</directive>
-<data> Fail alternative for include2.fail.jetinc within fail alternative of include1.fail.jetinc
-</data>
-<directive name="end" line="14" col="3">
-</directive>
-<data></data>
-<directive name="end" line="15" col="1">
-</directive>
-<data><<< after include ---
-
---- before successful include with alternative >>>
-</data>
-<directive name="include" line="19" col="1">
- <attribute name="file">include1.jetinc</attribute>
- <attribute name="fail">alternative</attribute>
-</directive>
-<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
- <data>This is content from include1.jetinc in base.
-3 + 5 = </data>
- <expression line="2" col="12"> 3 + 5 </expression>
- <data>
-Done
-</data>
-</included>
-<data>
-<<< after include ---
-
---- before failing include with alternative >>>
-</data>
-<directive name="include" line="35" col="1">
- <attribute name="file">include1.fail.jetinc</attribute>
- <attribute name="fail">silent</attribute>
-</directive>
-<data><<< after include ---
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet
deleted file mode 100644
index 2a9764f..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet
+++ /dev/null
@@ -1,4 +0,0 @@
-<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
---- before include >>>
-<%@include file="include2.jetinc"%>
-<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected
deleted file mode 100644
index 88b4247..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected
+++ /dev/null
@@ -1,49 +0,0 @@
-<directive name="jet" line="1" col="1">
- <attribute name="class">Simple</attribute>
- <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
-</directive>
-<data>--- before include >>>
-</data>
-<directive name="include" line="3" col="1">
- <attribute name="file">include2.jetinc</attribute>
-</directive>
-<included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
- <data>This is content from include2.jetinc in base.
-</data>
- <directive name="include" line="2" col="1">
- <attribute name="file">include2.jetinc</attribute>
- </directive>
- <included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt1/">
- <data>This is content from include2.jetinc in alt1.
-</data>
- <directive name="include" line="2" col="1">
- <attribute name="file">include2.jetinc</attribute>
- </directive>
- <included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt2/">
- <data>This is content from include2.jetinc in alt2.
-7 + 8 = </data>
- <expression line="2" col="12"> 7 + 8 </expression>
- <data>
-</data>
- <directive name="include" line="3" col="1">
- <attribute name="file">include1.jetinc</attribute>
- </directive>
- <included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
- <data>This is content from include1.jetinc in base.
-3 + 5 = </data>
- <expression line="2" col="12"> 3 + 5 </expression>
- <data>
-Done
-</data>
- </included>
- <data>Done
-</data>
- </included>
- <data>Done
-</data>
- </included>
- <data>Done
-</data>
-</included>
-<data><<< after include ---
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc
deleted file mode 100644
index ef24377..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc
+++ /dev/null
@@ -1,3 +0,0 @@
-This is content from include1.jetinc in base.
-3 + 5 = <%= 3 + 5 %>
-Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc
deleted file mode 100644
index 230b451..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc
+++ /dev/null
@@ -1,3 +0,0 @@
-This is content from include2.jetinc in base.
-<%@ include file="include2.jetinc" %>
-Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet
deleted file mode 100644
index 80803f6..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet
+++ /dev/null
@@ -1,4 +0,0 @@
-<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
---- before include >>>
-<%@include file="include1.jetinc"%>
-<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected
deleted file mode 100644
index 6051345..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected
+++ /dev/null
@@ -1,19 +0,0 @@
-<directive name="jet" line="1" col="1">
- <attribute name="class">Simple</attribute>
- <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
-</directive>
-<data>--- before include >>>
-</data>
-<directive name="include" line="3" col="1">
- <attribute name="file">include1.jetinc</attribute>
-</directive>
-<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
- <data>This is content from include1.jetinc in base.
-3 + 5 = </data>
- <expression line="2" col="12"> 3 + 5 </expression>
- <data>
-Done
-</data>
-</included>
-<data><<< after include ---
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected
deleted file mode 100644
index ff45607..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected
+++ /dev/null
@@ -1,11 +0,0 @@
-<directive name="jet" line="1" col="1">
- <attribute name="class">Simple</attribute>
- <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
-</directive>
-<data>--- before include >>>
-</data>
-<directive name="include" line="3" col="1">
- <attribute name="file">include1.jetinc</attribute>
-</directive>
-<data><<< after include ---
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet
deleted file mode 100644
index b910599..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet
+++ /dev/null
@@ -1,9 +0,0 @@
-<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
---- before scriptlet >>>
-<%
-// This is a scriptlet
-String value = "World";
-%>
-<<< after scriptlet ---
-
-Hello <%= value %>!
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected
deleted file mode 100644
index 4af00e5..0000000
--- a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected
+++ /dev/null
@@ -1,16 +0,0 @@
-<directive name="jet" line="1" col="1">
- <attribute name="class">Simple</attribute>
- <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
-</directive>
-<data>--- before scriptlet >>>
-</data>
-<scriptlet line="3" col="3">
-// This is a scriptlet
-String value = "World";
-</scriptlet>
-<data><<< after scriptlet ---
-
-Hello </data>
-<expression line="9" col="10"> value </expression>
-<data>!
-</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/templates folder.jar b/tests/org.eclipse.jet.tests.core/data/templates folder.jar
deleted file mode 100644
index 055a260..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates folder.jar
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jet.tests.core/data/templates folder.zip b/tests/org.eclipse.jet.tests.core/data/templates folder.zip
deleted file mode 100644
index 055a260..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates folder.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/Copy of test1.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/Copy of test1.txt
deleted file mode 100644
index 7c6f088..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base1/Copy of test1.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is Copy of test1.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt
deleted file mode 100644
index 04fabc7..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is nested/test3.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt
deleted file mode 100644
index e6f09cd..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is nested/test4.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt
deleted file mode 100644
index be088ae..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is test1.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt
deleted file mode 100644
index ebbc1b4..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is test2.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt
deleted file mode 100644
index 62f7a19..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is nested/test5.txt in data/templates/base2. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt
deleted file mode 100644
index 9a38f46..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is test1.txt in data/templates/base2. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt
deleted file mode 100644
index c36abf0..0000000
--- a/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is test2.txt in data/templates/base2. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllTests.java
deleted file mode 100644
index 04964bd..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllTests.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.jet.tests.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jet.tests.tools"); //$NON-NLS-1$
- suite.addTest(org.eclipse.jet.tests.core.url.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.parser.jasper.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.tools.compiler.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.tools.parser.AllTests.suite());
- //$JUnit-BEGIN$
- suite.addTestSuite(TestNewLineUtil.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllToolsSuites.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllToolsSuites.java
deleted file mode 100644
index ce4c6fa..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/AllToolsSuites.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: AllToolsSuites.java,v 1.1 2007/04/04 14:55:55 pelder Exp $
- */
-
-package org.eclipse.jet.tests.core;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllToolsSuites extends TestSuite
-{
- private static Test[] suites = new Test []{
- org.eclipse.jet.tests.core.AllTests.suite(),
- };
-
- public static Test suite()
- {
- return new AllToolsSuites("JET Build JUnit Test Suite"); //$NON-NLS-1$
- }
-
- public AllToolsSuites()
- {
- super();
- populateSuite();
- }
-
- public AllToolsSuites(Class theClass)
- {
- super(theClass);
- populateSuite();
- }
-
- public AllToolsSuites(String name)
- {
- super(name);
- populateSuite();
- }
-
- protected void populateSuite()
- {
- for (int i = 0; i < suites.length; i++)
- {
- addTest(suites[i]);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/FileUtils.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/FileUtils.java
deleted file mode 100644
index 8aafa2d..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/FileUtils.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.jet.tests.core;
-
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.filebuffers.manipulation.ConvertLineDelimitersOperation;
-import org.eclipse.core.filebuffers.manipulation.FileBufferOperationRunner;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jet.internal.core.NewLineUtil;
-
-/**
- * File utilities for Unit tests getting expected results from the JUnit project.
- *
- */
-public class FileUtils {
-
- /**
- *
- *
- */
- private FileUtils() {
- // prevent instantiation.
- }
-
- /**
- * Resolve a URL to a location string (file system absolute path).
- * @param urlString a URL string, possibly using the platform:/ format.
- * @return an absolute file system path corresponding to <code>urlString</code>
- * @throws IOException if an IO error occurs
- * @throws MalformedURLException if urlString is an invalid URL
- */
- public static String resolveURLToLocationString(String urlString) throws IOException, MalformedURLException {
- String fileName = Platform.resolve(new URL(urlString)).getFile();
- return fileName;
- }
-
- /**
- * Return the file contents as a string. This method also converts the file's line
- * separator to the current system's line separator if <code>convertNewLines</code> is <code>true</code>.
- * @param urlString a URL string, possibly using the platform:/ format.
- * @param convertNewLines Convert the file line separators to the system line separator.
- * @return the file contents
- * @throws IOException if an IO error occurs
- * @throws MalformedURLException if urlString is an invalid URL
- * @throws CoreException if an error occurs reading the file.
- */
- public static String getFileContents(String urlString, boolean convertNewLines) throws MalformedURLException, IOException, CoreException {
-
- final ITextFileBufferManager textBufferMgr = FileBuffers.getTextFileBufferManager();
- String fileName = resolveURLToLocationString(urlString);
-
- final IPath path = new Path(fileName);
- textBufferMgr.connect(path, new NullProgressMonitor());
- final ITextFileBuffer textFileBuffer = textBufferMgr.getTextFileBuffer(path);
-
- if(convertNewLines) {
- new FileBufferOperationRunner(textBufferMgr, null)
- .execute(
- new IPath[] { path },
- new ConvertLineDelimitersOperation(System.getProperty("line.separator")), //$NON-NLS-1$
- new NullProgressMonitor());
- }
-
- final String result = textFileBuffer.getDocument().get();
- textBufferMgr.disconnect(path, new NullProgressMonitor());
- return result;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/TestNewLineUtil.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/TestNewLineUtil.java
deleted file mode 100644
index 4530281..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/TestNewLineUtil.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- */
-package org.eclipse.jet.tests.core;
-
-import org.eclipse.jet.internal.core.NewLineUtil;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for ReplaceLineTerminatorOperation
- *
- */
-public class TestNewLineUtil extends TestCase {
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testSetLineTerminator() {
- final String mixedText = "Line1\nLine2\r\nLine3\n\rLine4\r\n"; //$NON-NLS-1$
- final String result = NewLineUtil.setLineTerminator(mixedText, "\n"); //$NON-NLS-1$
-
- final String expected = "Line1\nLine2\nLine3\n\nLine4\n"; //$NON-NLS-1$
- assertEquals(expected,result);
- }
-
- public void testGetLineTerminator() {
- final String windowsText = "Line1\r\nLine2\r\nLine3\n\rLine4\r\n"; //$NON-NLS-1$
- assertEquals("\r\n", NewLineUtil.getLineTerminator(windowsText)); //$NON-NLS-1$
-
- final String linuxText = "Line1\nLine2\r\nLine3\n\rLine4\r\n"; //$NON-NLS-1$
- assertEquals("\n", NewLineUtil.getLineTerminator(linuxText)); //$NON-NLS-1$
-
- final String macosText = "Line1\rLine2\r\nLine3\n\rLine4\r\n"; //$NON-NLS-1$
- assertEquals("\r", NewLineUtil.getLineTerminator(macosText)); //$NON-NLS-1$
-
- }
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/AllTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/AllTests.java
deleted file mode 100644
index 75ed8cf..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.core.url;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.core.url");
- //$JUnit-BEGIN$
- suite.addTestSuite(TestURLUtility.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/TestURLUtility.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/TestURLUtility.java
deleted file mode 100644
index 7fff5f3..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/core/url/TestURLUtility.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- */
-package org.eclipse.jet.tests.core.url;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jet.internal.core.url.URLUtility;
-import org.osgi.framework.Bundle;
-
-/**
- * @author pelder
- *
- */
-public class TestURLUtility extends TestCase {
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.url.URLUtility#jarRootEntryURL(java.net.URL)}.
- * @throws IOException
- */
- public void test_jar_platform_plugin() throws IOException {
- URL platformURL = new URL("platform:/plugin/org.eclipse.jet.tests.core/data/templates folder.jar");
- assertEquals("platform:/plugin/org.eclipse.jet.tests.core/data/templates folder.jar", platformURL.toExternalForm());
-
- URL platformJARRoot = URLUtility.jarRootEntryURL(platformURL);
- assertEquals("jar:platform:/plugin/org.eclipse.jet.tests.core/data/templates folder.jar!/", platformJARRoot.toExternalForm());
-
- URL test1TxtURL = URLUtility.jarEntryURL(platformURL, "templates/base1/Copy of test1.txt");
- assertEquals("jar:platform:/plugin/org.eclipse.jet.tests.core/data/templates folder.jar!/templates/base1/Copy of test1.txt",test1TxtURL.toExternalForm());
- InputStream stream = test1TxtURL.openStream();
- int nBytes = stream.available();
- assertTrue(nBytes > 0);
- byte[] buffer = new byte[nBytes];
- int nRead = stream.read(buffer);
- assertEquals(nBytes, nRead);
- String content = new String(buffer,"Cp1252");
- assertEquals("This is Copy of test1.txt in data/templates/base1.", content);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.url.URLUtility#jarRootEntryURL(java.net.URL)}.
- * @throws IOException
- */
- public void test_jar_file() throws IOException {
- final Bundle bundle = Platform.getBundle("org.eclipse.jet.tests.core");
-
- final URL[] findEntries = FileLocator.findEntries(bundle, new Path("data/templates folder.jar"));
- final URL entry = findEntries[0];
- final URL resolved = FileLocator.resolve(entry);
-
- URL test1TxtURL = URLUtility.jarEntryURL(resolved, "templates/base1/Copy of test1.txt");
- InputStream stream = test1TxtURL.openStream();
- int nBytes = stream.available();
- assertTrue(nBytes > 0);
- byte[] buffer = new byte[nBytes];
- int nRead = stream.read(buffer);
- assertEquals(nBytes, nRead);
- String content = new String(buffer,"Cp1252");
- assertEquals("This is Copy of test1.txt in data/templates/base1.", content);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.url.URLUtility#jarRootEntryURL(java.net.URL)}.
- * @throws IOException
- */
- public void test_file_jar_file() throws IOException {
- final Bundle bundle = Platform.getBundle("org.eclipse.jet.tests.core");
-
- final URL[] findEntries = FileLocator.findEntries(bundle, new Path("data/templates folder.jar"));
- final URL entry = findEntries[0];
- final URL resolved = FileLocator.resolve(entry);
-
- URL test1TxtURL = URLUtility.relativeURL(resolved, "templates/base1/Copy of test1.txt");
-// assertEquals("jar:platform:/plugin/org.eclipse.jet.tests.core/data/templates folder.jar!/templates/base1/Copy of test1.txt",test1TxtURL.toExternalForm());
- InputStream stream = test1TxtURL.openStream();
- int nBytes = stream.available();
- assertTrue(nBytes > 0);
- byte[] buffer = new byte[nBytes];
- int nRead = stream.read(buffer);
- assertEquals(nBytes, nRead);
- String content = new String(buffer,"Cp1252");
- assertEquals("This is Copy of test1.txt in data/templates/base1.", content);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.url.URLUtility#toURL(java.net.URI)}.
- * @throws URISyntaxException
- * @throws IOException
- */
- public void testToURL() throws URISyntaxException, IOException {
- final Bundle bundle = Platform.getBundle("org.eclipse.jet.tests.core");
-
- final URL[] findEntries = FileLocator.findEntries(bundle, new Path("data/templates/base1/Copy of test1.txt"));
- final URL entry = findEntries[0];
- final URL resolved = FileLocator.resolve(entry);
- final File file = new File(resolved.getPath());
-
-
- URL test1TxtURL = file.toURL();
-
- final String URI_STRING = file.toURI().toString();
-
- URI uri = new URI(URI_STRING);
- URL converted = uri.toURL();
- assertEquals(URI_STRING, converted.toString());
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/AllTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/AllTests.java
deleted file mode 100644
index b67c829..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.parser.jasper;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.parser.legacy"); //$NON-NLS-1$
- //$JUnit-BEGIN$
- suite.addTestSuite(TestJETParser.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/TestJETParser.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/TestJETParser.java
deleted file mode 100644
index 7f7bce7..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/parser/jasper/TestJETParser.java
+++ /dev/null
@@ -1,373 +0,0 @@
-package org.eclipse.jet.tests.parser.jasper;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.IProblem;
-import org.eclipse.jet.core.parser.ProblemSeverity;
-import org.eclipse.jet.internal.core.NewLineUtil;
-import org.eclipse.jet.internal.core.parser.jasper.CommentElementDelegate;
-import org.eclipse.jet.internal.core.parser.jasper.DeclarationElementDelegate;
-import org.eclipse.jet.internal.core.parser.jasper.JETCoreElement;
-import org.eclipse.jet.internal.core.parser.jasper.JETException;
-import org.eclipse.jet.internal.core.parser.jasper.JETMark;
-import org.eclipse.jet.internal.core.parser.jasper.JETParseEventListener2;
-import org.eclipse.jet.internal.core.parser.jasper.JETParser;
-import org.eclipse.jet.internal.core.parser.jasper.JETReader;
-import org.eclipse.jet.internal.core.parser.jasper.XMLElementDelegate;
-import org.eclipse.jet.tests.core.FileUtils;
-
-public class TestJETParser extends TestCase {
-
- private static final String PLUGIN_ID = "org.eclipse.jet.tests.core"; //$NON-NLS-1$
- private static final String BASE_PLUGIN_URL = "platform:/plugin/" + PLUGIN_ID + "/data/parser/legacy/"; //$NON-NLS-1$ //$NON-NLS-2$
-
-
- private static class SavedProblem {
-
- private final ProblemSeverity severity;
- private final int problemId;
- private final String message;
- private final Object[] msgArgs;
- private final int start;
- private final int end;
- private final int line;
-
- public SavedProblem(ProblemSeverity severity, int problemId, String message, Object[] msgArgs, int start, int end, int line) {
- this.severity = severity;
- this.problemId = problemId;
- this.message = message;
- this.msgArgs = msgArgs;
- this.start = start;
- this.end = end;
- this.line = line;
- }
-
- /**
- * @return Returns the end.
- */
- public final int getEnd() {
- return end;
- }
-
- /**
- * @return Returns the line.
- */
- public final int getLine() {
- return line;
- }
-
- /**
- * @return Returns the message.
- */
- public final String getMessage() {
- return message;
- }
-
- /**
- * @return Returns the msgArgs.
- */
- public final Object[] getMsgArgs() {
- return msgArgs;
- }
-
- /**
- * @return Returns the problemId.
- */
- public final int getProblemId() {
- return problemId;
- }
-
- /**
- * @return Returns the severity.
- */
- public final ProblemSeverity getSeverity() {
- return severity;
- }
-
- /**
- * @return Returns the start.
- */
- public final int getStart() {
- return start;
- }
-
- }
-
- private static class AllJET2SyntaxListener implements JETParseEventListener2 {
-
- private final StringBuffer buffer = new StringBuffer();
- private int indent = 0;
- private final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
- private final JETReader reader;
- private final List problems = new ArrayList();
-
-
- public AllJET2SyntaxListener(JETReader reader) {
- this.reader = reader;
- }
-
- public void beginPageProcessing() throws JETException {
-// doIndent();
-// buffer.append("<jet2>").append(NL); //$NON-NLS-1$
-// indent++;
- }
-
- private void doIndent() {
- for(int i = 0; i < indent; i++) {
- buffer.append(" "); //$NON-NLS-1$
- }
- }
-
- public void endPageProcessing() throws JETException {
-// doIndent();
-// buffer.append("</jet2>").append(NL); //$NON-NLS-1$
- }
-
- public String getLog() {
- return NewLineUtil.setLineTerminator(buffer, NL);
- }
-
- public void handleCharData(char[] chars) throws JETException {
- doIndent();
- buffer.append("<data>").append(chars).append("</data>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void handleComment(JETMark start, JETMark stop) {
- doIndent();
- buffer.append("<comment start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(reader.getChars(start,stop));
- buffer.append("</comment>").append(NL); //$NON-NLS-1$
-
- }
-
- public void handleDeclaration(JETMark start, JETMark stop) {
- doIndent();
- buffer.append("<declaration start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(reader.getChars(start,stop));
- buffer.append("</declaration>").append(NL); //$NON-NLS-1$
-
- }
-
- public void handleDirective(String directive, JETMark start,
- JETMark stop, Map attributes) throws JETException {
- doIndent();
- buffer.append("<directive name=\"" + directive + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = attributes.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(entry.getValue()).append("</attribute>").append(NL); //$NON-NLS-1$
-
- }
- indent--;
- doIndent();
- buffer.append("</directive>").append(NL); //$NON-NLS-1$
- }
-
- public void handleExpression(JETMark start, JETMark stop, Map attributes)
- throws JETException {
- doIndent();
- buffer.append("<expression start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(reader.getChars(start,stop));
- buffer.append("</expression>").append(NL); //$NON-NLS-1$
- }
-
- public void handleScriptlet(JETMark start, JETMark stop, Map attributes)
- throws JETException {
- doIndent();
- buffer.append("<scriptlet start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(reader.getChars(start,stop));
- buffer.append("</scriptlet>").append(NL); //$NON-NLS-1$
- }
-
- public void handleXMLEmptyTag(String tagName, JETMark start, JETMark stop, Map attributeMap) {
- doIndent();
- buffer.append("<tag name=\"" + tagName + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = attributeMap.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL); //$NON-NLS-1$
- }
-
- public void handleXMLEndTag(String tagName, JETMark start, JETMark stop) {
- indent--;
- doIndent();
- buffer.append("</content>").append(NL); //$NON-NLS-1$
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL); //$NON-NLS-1$
- }
-
- public void handleXMLStartTag(String tagName, JETMark start, JETMark stop, Map attributeMap) {
- doIndent();
- buffer.append("<tag name=\"" + tagName + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = attributeMap.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- doIndent();
- buffer.append("<content>").append(NL); //$NON-NLS-1$
- indent++;
- }
-
- public boolean isKnownTag(String tagName) {
- return tagName.startsWith("test:"); //$NON-NLS-1$
- }
-
- /**
- * @return Returns the problems.
- */
- public final List getProblems() {
- return problems;
- }
-
- public void recordProblem(ProblemSeverity severity, int problemId, String message, Object[] msgArgs, int start, int end, int line, int colOffset) {
- problems.add(new SavedProblem(severity, problemId, message, msgArgs, start, end, line));
-
- }
-
- public boolean isKnownInvalidTagName(String tagName) {
- // TODO Auto-generated method stub
- return false;
- }
- }
-
- private AllJET2SyntaxListener doJET2Parse(String urlString) throws IOException, MalformedURLException, FileNotFoundException, JETException {
- String fileName = FileUtils.resolveURLToLocationString(urlString);
-
- FileInputStream inputStream = new FileInputStream(new File(fileName));
- JETReader reader = new JETReader(urlString, inputStream, "UTF8"); //$NON-NLS-1$
- AllJET2SyntaxListener listener = new AllJET2SyntaxListener(reader);
- JETParser.Directive directive = new JETParser.Directive();
- directive.getDirectives().add("jet"); //$NON-NLS-1$
- directive.getDirectives().add("taglib"); //$NON-NLS-1$
-
- JETCoreElement[] coreElements = new JETCoreElement[] {
- directive,
- new JETParser.Expression(),
- new CommentElementDelegate(),
- new DeclarationElementDelegate(),
- new JETParser.Scriptlet(),
- new XMLElementDelegate(),
- };
- JETParser parser = new JETParser(reader, listener, coreElements);
-
- parser.parse();
- return listener;
- }
-
- private void doUnclosedElementTest(String urlString, String openChars, int expectedProblemId) throws IOException, MalformedURLException, FileNotFoundException, JETException {
- final AllJET2SyntaxListener listener = doJET2Parse(urlString);
- final List problems = listener.getProblems();
- assertEquals(1, problems.size());
- SavedProblem problem = (SavedProblem) problems.get(0);
- assertEquals(ProblemSeverity.ERROR, problem.getSeverity());
- assertEquals(expectedProblemId, problem.getProblemId());
- }
-
- public void testAllJET2Syntax() throws Exception {
- String urlString = BASE_PLUGIN_URL + "alljet2.jet"; //$NON-NLS-1$
- AllJET2SyntaxListener listener = doJET2Parse(urlString);
-
- assertEquals(FileUtils.getFileContents(urlString + ".expected", true), listener.getLog()); //$NON-NLS-1$
- }
-
- public void testUnclosedComment() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedComment.jet"; //$NON-NLS-1$
- String openChars = "<%--"; //$NON-NLS-1$
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
-
-
- }
-
- public void testUnclosedDeclaration() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedDeclaration.jet"; //$NON-NLS-1$
- String openChars = "<%!"; //$NON-NLS-1$
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testUnclosedDirective() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedDirective.jet"; //$NON-NLS-1$
- String openChars = "<%@"; //$NON-NLS-1$
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedExpression() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedExpression.jet"; //$NON-NLS-1$
- String openChars = "<%="; //$NON-NLS-1$
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedScriptlet() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedScriplet.jet"; //$NON-NLS-1$
- String openChars = "<%"; //$NON-NLS-1$
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedXMLStart() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedXMLStart.jet"; //$NON-NLS-1$
- String openChars = "<"; //$NON-NLS-1$
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testUnclosedXMLEnd() throws Exception {
- String urlString = BASE_PLUGIN_URL + "unclosedXMLEnd.jet"; //$NON-NLS-1$
- String openChars = "</"; //$NON-NLS-1$
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testXMLEndWithAttributes() throws Exception {
- String urlString = BASE_PLUGIN_URL + "xmlEndWithAttributes.jet"; //$NON-NLS-1$
- String openChars = "</"; //$NON-NLS-1$
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- // this error is not detected by the parser, but by post parse processing.
-// public void testXMLStartWithoutEnd() throws Exception {
-// String urlString = BASE_PLUGIN_URL + "xmlStartWithoutEnd.jet";
-// String openChars = "<test:start>";
-//
-// doUnclosedElementTest(urlString, openChars, Problem.MissingXmlEndTag);
-// }
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/AllTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/AllTests.java
deleted file mode 100644
index 737a035..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/AllTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jet.tests.tools.compiler;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.tools.compiler"); //$NON-NLS-1$
- //$JUnit-BEGIN$
- suite.addTestSuite(TestIncludeAlternativesTracker.class);
- suite.addTestSuite(TestTemplateInput.class);
- suite.addTestSuite(LineInfoTests.class);
- suite.addTestSuite(IncludeDependenciesTest.class);
- suite.addTestSuite(TestUniqueNameGenerator.class);
- suite.addTestSuite(TestInputManager.class);
- suite.addTestSuite(TestInputManagerBuilder.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/IncludeDependenciesTest.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/IncludeDependenciesTest.java
deleted file mode 100644
index bd8bbd4..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/IncludeDependenciesTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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
- */
-package org.eclipse.jet.tests.tools.compiler;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.core.compiler.IncludeDependencies;
-
-/**
- * @author pelder
- *
- */
-public class IncludeDependenciesTest extends TestCase {
-
-
- private static final String TEMPLATE_A = "templates/A.jet"; //$NON-NLS-1$
- private static final String TEMPLATE_B = "templates/B.jet"; //$NON-NLS-1$
- private static final String INCLUDE_X = "X.jetinc"; //$NON-NLS-1$
- private static final String INLCUDE_Y = "Y.jetinc"; //$NON-NLS-1$
- private static final String INCLUDE_Z = "Z.jetinc"; //$NON-NLS-1$
- private static final String INCLUDE_W = "W.jetinc"; //$NON-NLS-1$
- private IncludeDependencies includeDependencies;
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- includeDependencies = new IncludeDependencies();
- includeDependencies.addDependencies(TEMPLATE_A, new String[] {INCLUDE_X, INLCUDE_Y});
- includeDependencies.addDependencies(TEMPLATE_B, new String[] {INCLUDE_X, INCLUDE_Z});
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.IncludeDependencies#addDependencies(java.lang.String, java.lang.String[])}.
- */
- public void testAddDependencies() {
- includeDependencies.addDependencies(TEMPLATE_A, new String[] {INCLUDE_W});
-
- final String[] xAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_X);
- assertEqualSets("xAffectedTemplates", new String[]{TEMPLATE_A, TEMPLATE_B}, xAffectedTemplates); //$NON-NLS-1$
-
- final String[] yAffectedTemplates = includeDependencies.getAffectedTemplates(INLCUDE_Y);
- assertEqualSets("yAffectedTemplates", new String[]{TEMPLATE_A, }, yAffectedTemplates); //$NON-NLS-1$
-
- final String[] zAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_Z);
- assertEqualSets("zAffectedTemplates", new String[]{TEMPLATE_B}, zAffectedTemplates); //$NON-NLS-1$
-
- final String[] wAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_W);
- assertEqualSets("wAffectedTemplates", new String[]{TEMPLATE_A}, wAffectedTemplates); //$NON-NLS-1$
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.IncludeDependencies#removeDependencies(java.lang.String)}.
- */
- public void testRemoveDependencies() {
- includeDependencies.removeDependencies(TEMPLATE_A);
-
- final String[] xAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_X);
- assertEqualSets("xAffectedTemplates", new String[]{TEMPLATE_B}, xAffectedTemplates); //$NON-NLS-1$
-
- final String[] yAffectedTemplates = includeDependencies.getAffectedTemplates(INLCUDE_Y);
- assertEqualSets("yAffectedTemplates", new String[]{}, yAffectedTemplates); //$NON-NLS-1$
-
- final String[] zAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_Z);
- assertEqualSets("zAffectedTemplates", new String[]{TEMPLATE_B}, zAffectedTemplates); //$NON-NLS-1$
-
- final String[] wAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_W);
- assertEqualSets("wAffectedTemplates", new String[]{}, wAffectedTemplates); //$NON-NLS-1$
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.IncludeDependencies#getAffectedTemplates(java.lang.String)}.
- */
- public void testGetAffectedTemplates() {
- final String[] xAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_X);
- assertEqualSets("xAffectedTemplates", new String[]{TEMPLATE_A, TEMPLATE_B}, xAffectedTemplates); //$NON-NLS-1$
-
- final String[] yAffectedTemplates = includeDependencies.getAffectedTemplates(INLCUDE_Y);
- assertEqualSets("yAffectedTemplates", new String[]{TEMPLATE_A, }, yAffectedTemplates); //$NON-NLS-1$
-
- final String[] zAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_Z);
- assertEqualSets("zAffectedTemplates", new String[]{TEMPLATE_B}, zAffectedTemplates); //$NON-NLS-1$
-
- final String[] wAffectedTemplates = includeDependencies.getAffectedTemplates(INCLUDE_W);
- assertEqualSets("wAffectedTemplates", new String[]{}, wAffectedTemplates); //$NON-NLS-1$
- }
-
- public void testSerialization() throws Exception {
- final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(byteOutput);
-
- oos.writeObject(includeDependencies);
-
- oos.close();
-
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(byteOutput.toByteArray()));
- includeDependencies = (IncludeDependencies) ois.readObject();
-
- ois.close();
-
- testGetAffectedTemplates();
-
- testRemoveDependencies();
-
- }
- /**
- * @param message
- * @param expected
- * @param actual
- */
- private void assertEqualSets(final String message, final String[] expected, final String[] actual) {
- assertNotNull(message + " not null"); //$NON-NLS-1$
- final Set affectedSet = new HashSet(Arrays.asList(actual));
- assertEquals(message + " size", expected.length, affectedSet.size()); //$NON-NLS-1$
- for (int i = 0; i < expected.length; i++) {
- assertTrue(message + " contains " + expected[i], affectedSet.contains(expected[i])); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/LineInfoTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/LineInfoTests.java
deleted file mode 100644
index 9855ae0..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/LineInfoTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.jet.tests.tools.compiler;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.core.parser.LineInfo;
-import org.eclipse.jet.tests.core.FileUtils;
-
-public class LineInfoTests extends TestCase {
-
- private static final String TESTDATA_URI = "platform:/plugin/org.eclipse.jet.tests.core/data/parser/lineinfo.jet"; //$NON-NLS-1$
-
- /*
- * Test method for 'org.eclipse.jet.internal.parser.LineInfo.calculateLines(char[])'
- */
- public void testCalculateLines() throws Exception {
- String urlString = TESTDATA_URI;
- final String fileContents = FileUtils.getFileContents(urlString, false);
-
- final LineInfo[] lineInfo = LineInfo.calculateLines(fileContents.toCharArray());
- final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < lineInfo.length; i++) {
- result.append(i + 1).append(":").append(lineInfo[i].getEnd() - lineInfo[i].getStart()).append(':') //$NON-NLS-1$
- .append(fileContents.substring(lineInfo[i].getStart(), lineInfo[i].getEnd())).append(NL);
- }
-
- final String expectedContents = FileUtils.getFileContents(urlString + ".expected.txt", true); //$NON-NLS-1$
- assertEquals(expectedContents, result.toString());
-
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.parser.LineInfo.getLineInfo(LineInfo[], int)'
- */
- public void testGetLineInfo() throws Exception {
- String urlString = TESTDATA_URI;
- final String fileContents = FileUtils.getFileContents(urlString, false);
-
- final LineInfo[] lineInfo = LineInfo.calculateLines(fileContents.toCharArray());
-
- try {
- LineInfo.getLineInfo(lineInfo, -1);
- fail();
- } catch(IllegalArgumentException e) {
- // success
- }
-
-
- final LineInfo startInfo = LineInfo.getLineInfo(lineInfo, 0);
- assertEquals(lineInfo[0], startInfo);
- assertEquals(0, startInfo.getStart());
-
- final LineInfo liInNL = LineInfo.getLineInfo(lineInfo, lineInfo[0].getEnd());
- assertEquals(lineInfo[0], liInNL);
-
- final int lastcharOffset = lineInfo[lineInfo.length - 1].getEnd() - 1;
- final LineInfo endInfo = LineInfo.getLineInfo(lineInfo, lastcharOffset);
- assertEquals(lineInfo[lineInfo.length - 1], endInfo);
-
- final int strOffset = fileContents.indexOf("a,b,c,d,e,f,g"); // this is on line 4, col 24 //$NON-NLS-1$
- final LineInfo strLineInfo = LineInfo.getLineInfo(lineInfo, strOffset);
- assertEquals(lineInfo[3], strLineInfo);
- assertTrue("in [start, end)", strLineInfo.getStart() <= strOffset && strOffset < strLineInfo.getEnd()); //$NON-NLS-1$
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestIncludeAlternativesTracker.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestIncludeAlternativesTracker.java
deleted file mode 100644
index e0877cb..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestIncludeAlternativesTracker.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package org.eclipse.jet.tests.tools.compiler;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.core.parser.IncludeAlternativesTracker;
-
-public class TestIncludeAlternativesTracker extends TestCase {
-
- public void testFailedInclude() {
- final String includeMarker = "include"; //$NON-NLS-1$
- final String startMarker = "start"; //$NON-NLS-1$
- final String endMarker = "end"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.addIncludeWithAlternative(includeMarker, true);
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.startAlternative(startMarker);
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.endAlternative(endMarker);
-
- assertTrue(tracker.isCompileEnabled());
- }
-
- public void testSuccessfulInclude() {
- final String includeMarker = "include"; //$NON-NLS-1$
- final String startMarker = "start"; //$NON-NLS-1$
- final String endMarker = "end"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.addIncludeWithAlternative(includeMarker, false);
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.startAlternative(startMarker);
-
- assertFalse(tracker.isCompileEnabled());
-
- tracker.endAlternative(endMarker);
-
- assertTrue(tracker.isCompileEnabled());
- }
-
- public void testFailedIncludeWithNestedInclude() {
- final String includeMarker = "include"; //$NON-NLS-1$
- final String startMarker = "start"; //$NON-NLS-1$
- final String endMarker = "end"; //$NON-NLS-1$
- final String includeChildFoundMarker = "includeChildFound"; //$NON-NLS-1$
- final String startChildFoundMarker = "startChildFound"; //$NON-NLS-1$
- final String endChildFoundMarker = "endChildFound"; //$NON-NLS-1$
- final String includeChildNotFoundMarker = "includeChildNotFound"; //$NON-NLS-1$
- final String startChildNotFoundMarker = "startChildNotFound"; //$NON-NLS-1$
- final String endChildNotFoundMarker = "endChildNotFound"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- // <%@include fail="alternative" file="NotFound" %>
- tracker.addIncludeWithAlternative(includeMarker, true);
-
- assertTrue(tracker.isCompileEnabled());
-
- // <%@ start %> for NotFound
- tracker.startAlternative(startMarker);
-
- assertTrue(tracker.isCompileEnabled());
- {
- // <%@include fail="alternative" file="ChildFound" %>
- tracker.addIncludeWithAlternative(includeChildFoundMarker, false);
- assertTrue(tracker.isCompileEnabled());
-
- // <%@ start %> for ChildFound
- tracker.startAlternative(startChildFoundMarker);
- assertFalse(tracker.isCompileEnabled());
-
- // <%@ end %> for ChildFound
- tracker.endAlternative(endChildFoundMarker);
- assertTrue(tracker.isCompileEnabled());
- }
- {
- // <%@include fail="alternative" file="ChildNotFound" %>
- tracker.addIncludeWithAlternative(includeChildNotFoundMarker, true);
- assertTrue(tracker.isCompileEnabled());
-
- // <%@ start %> for ChildNotFound
- tracker.startAlternative(startChildNotFoundMarker);
- assertTrue(tracker.isCompileEnabled());
-
- // <%@ end %> for ChildNotFound
- tracker.endAlternative(endChildNotFoundMarker);
- assertTrue(tracker.isCompileEnabled());
- }
- // <%@ end %> for NotFound
- tracker.endAlternative(endMarker);
-
- assertTrue(tracker.isCompileEnabled());
- }
-
- public void testSuccessIncludeWithNestedInclude() {
- final String includeMarker = "include"; //$NON-NLS-1$
- final String startMarker = "start"; //$NON-NLS-1$
- final String endMarker = "end"; //$NON-NLS-1$
- final String includeChildFoundMarker = "includeChildFound"; //$NON-NLS-1$
- final String startChildFoundMarker = "startChildFound"; //$NON-NLS-1$
- final String endChildFoundMarker = "endChildFound"; //$NON-NLS-1$
- final String includeChildNotFoundMarker = "includeChildNotFound"; //$NON-NLS-1$
- final String startChildNotFoundMarker = "startChildNotFound"; //$NON-NLS-1$
- final String endChildNotFoundMarker = "endChildNotFound"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- // <%@include fail="alternative" file="Found" %>
- tracker.addIncludeWithAlternative(includeMarker, false);
-
- assertTrue(tracker.isCompileEnabled());
-
- // <%@ start %> for Found
- tracker.startAlternative(startMarker);
-
- assertFalse(tracker.isCompileEnabled());
- {
- // <%@include fail="alternative" file="ChildFound" %>
- tracker.addIncludeWithAlternative(includeChildFoundMarker, false);
- assertFalse(tracker.isCompileEnabled());
-
- // <%@ start %> for ChildFound
- tracker.startAlternative(startChildFoundMarker);
- assertFalse(tracker.isCompileEnabled());
-
- // <%@ end %> for ChildFound
- tracker.endAlternative(endChildFoundMarker);
- assertFalse(tracker.isCompileEnabled());
- }
- {
- // <%@include fail="alternative" file="ChildNotFound" %>
- tracker.addIncludeWithAlternative(includeChildNotFoundMarker, false);
- assertFalse(tracker.isCompileEnabled());
-
- // <%@ start %> for ChildNotFound
- tracker.startAlternative(startChildNotFoundMarker);
- assertFalse(tracker.isCompileEnabled());
-
- // <%@ end %> for ChildNotFound
- tracker.endAlternative(endChildNotFoundMarker);
- assertFalse(tracker.isCompileEnabled());
- }
- // <%@ end %> for Found
- tracker.endAlternative(endMarker);
-
- assertTrue(tracker.isCompileEnabled());
- }
-
- public void testMissingEnd() {
- final String includeMarker = "include"; //$NON-NLS-1$
- final String startMarker = "start"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.addIncludeWithAlternative(includeMarker, true);
-
- tracker.startAlternative(startMarker);
-
- final int count[] = {0};
-
- tracker.validateStackIsEmpty(new IncludeAlternativesTracker.ValidationProblemReporter() {
-
- public void reportMissingEnd(Object startDirective) {
- assertEquals(startDirective, startDirective);
- count[0]++;
- }
-
- public void reportMissingStart(Object includeDirective) {
- fail();
-
- }});
-
- assertEquals(1, count[0]);
- }
-
- public void testMissingStart() {
- final String includeMarker = "include"; //$NON-NLS-1$
- IncludeAlternativesTracker tracker = new IncludeAlternativesTracker();
-
- assertTrue(tracker.isCompileEnabled());
-
- tracker.addIncludeWithAlternative(includeMarker, true);
-
- final int count[] = {0};
-
- tracker.validateStackIsEmpty(new IncludeAlternativesTracker.ValidationProblemReporter() {
-
- public void reportMissingEnd(Object startDirective) {
- fail();
- }
-
- public void reportMissingStart(Object includeDirective) {
- assertEquals(includeMarker, includeDirective);
- count[0]++;
-
- }});
-
- assertEquals(1, count[0]);
- }
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManager.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManager.java
deleted file mode 100644
index 752b718..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * 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
- */
-package org.eclipse.jet.tests.tools.compiler;
-
-import java.net.URI;
-import java.util.Stack;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.DefaultTemplateResolver;
-import org.eclipse.jet.core.parser.ITemplateInput;
-import org.eclipse.jet.core.parser.ITemplateResolver;
-import org.eclipse.jet.core.parser.RecursiveIncludeException;
-
-/**
- * Tests for {@link DefaultTemplateResolver}.
- */
-public class TestInputManager extends TestCase {
-
- private static final String LOCATION1_URL = "platform:/plugin/org.eclipse.jet.tests.core/data/templates/base1/"; //$NON-NLS-1$
- private static final String LOCATION2_URL = "platform:/plugin/org.eclipse.jet.tests.core/data/templates/base2/"; //$NON-NLS-1$
- private URI location1;
- private URI location2;
- private ITemplateResolver im;
-
- protected void setUp() throws Exception {
- super.setUp();
- location1 = new URI(LOCATION1_URL);
- location2 = new URI(LOCATION2_URL);
- DefaultTemplateResolver.Builder builder = new DefaultTemplateResolver.Builder(new URI[] {location1, location2});
-
- im = builder.build();
- }
-
- /**
- * Test method for {@link DefaultTemplateResolver#getInput(String)}.
- *
- */
- public void testGetInput() {
- final String templatePath = "test1.txt"; //$NON-NLS-1$
- final ITemplateInput input = im.getInput(templatePath);
-
- assertEquals(templatePath, input.getTemplatePath());
- assertEquals(location1, input.getBaseLocation());
- }
-
- /**
- * Test method for {@link DefaultTemplateResolver#getIncludedInput(String, ITemplateInput[])}.
- *
- */
- public void testGetIncludedInput() throws RecursiveIncludeException {
- final String templatePath = "test1.txt"; //$NON-NLS-1$
-
- final String[] includePaths = {
- "test1.txt", //$NON-NLS-1$
- "test2.txt", //$NON-NLS-1$
- "test2.txt", //$NON-NLS-1$
- };
- final URI[] expectedBaseURLs = {
- location2,
- location1,
- location2,
- };
- final Stack inputStack = new Stack();
-
- inputStack.push(im.getInput(templatePath));
-
- for (int i = 0; i < expectedBaseURLs.length; i++) {
- final ITemplateInput[] currentStack = (ITemplateInput[])inputStack.toArray(new ITemplateInput[inputStack.size()]);
- final ITemplateInput includedInput = im.getIncludedInput(includePaths[i], currentStack);
-
- assertEquals("index " + i, includePaths[i], includedInput.getTemplatePath()); //$NON-NLS-1$
- assertEquals("index " + i, expectedBaseURLs[i], includedInput.getBaseLocation()); //$NON-NLS-1$
-
- inputStack.push(includedInput);
- }
- }
-
- /**
- * Test method for {@link DefaultTemplateResolver#getIncludedInput(String, ITemplateInput[])} to verify recursion detection.
- *
- */
- public void testGetIncludedInput_recursion() {
- final String templatePath = "test1.txt"; //$NON-NLS-1$
-
- final String[] includePaths = {
- "test2.txt", //$NON-NLS-1$
- "test1.txt", //$NON-NLS-1$
- };
- final URI[] expectedActiveBaseLocations = {
- location1,
- location1,
- };
- final String[] expectedActiveTemplatePaths = {
- "test1.txt", //$NON-NLS-1$
- "test2.txt", //$NON-NLS-1$
- };
- final Stack inputStack = new Stack();
-
- inputStack.push(im.getInput(templatePath));
-
- try {
- for (int i = 0; i < includePaths.length; i++) {
- final ITemplateInput[] currentStack = (ITemplateInput[])inputStack.toArray(new ITemplateInput[inputStack.size()]);
- final ITemplateInput includedInput = im.getIncludedInput(includePaths[i], currentStack);
-
- inputStack.push(includedInput);
- }
-
- fail("Expected RecursiveIncludeException"); //$NON-NLS-1$
- } catch(RecursiveIncludeException e) {
- assertEquals(includePaths[includePaths.length - 1], e.getTemplatePath());
- assertEquals(location1, e.getBaseLocation());
- final String[] activeTemplatePaths = e.getActiveTemplatePaths();
- assertEquals(2, activeTemplatePaths.length);
- for (int i = 0; i < activeTemplatePaths.length; i++) {
- assertEquals(expectedActiveTemplatePaths[i], activeTemplatePaths[i]);
- }
- final URI[] activeBaseLocations = e.getActiveBaseLocations();
- assertEquals(2, activeBaseLocations.length);
- for (int i = 0; i < activeBaseLocations.length; i++) {
- assertEquals(expectedActiveBaseLocations[i], activeBaseLocations[i]);
- }
- }
-
-
- }
-
- public void testGetIncludedInput_relativePaths() throws RecursiveIncludeException {
- final String templatePath = "test1.txt"; //$NON-NLS-1$
-
- final String[] includePaths = {
- "nested/test3.txt", //$NON-NLS-1$
- "test4.txt", //$NON-NLS-1$
- "test5.txt", //$NON-NLS-1$
- "../test2.txt", //$NON-NLS-1$
- };
- final URI[] expectedBaseURLs = {
- location1,
- location1,
- location2,
- location1,
- };
- final String[] expectedTemplatePaths = {
- "nested/test3.txt", //$NON-NLS-1$
- "nested/test4.txt", //$NON-NLS-1$
- "nested/test5.txt", //$NON-NLS-1$
- "test2.txt", //$NON-NLS-1$
- };
-
- final Stack inputStack = new Stack();
-
- inputStack.push(im.getInput(templatePath));
-
- for (int i = 0; i < expectedBaseURLs.length; i++) {
- final ITemplateInput[] currentStack = (ITemplateInput[])inputStack.toArray(new ITemplateInput[inputStack.size()]);
- final ITemplateInput includedInput = im.getIncludedInput(includePaths[i], currentStack);
- assertNotNull("index " + i, includedInput); //$NON-NLS-1$
- assertEquals("index " + i, expectedTemplatePaths[i], includedInput.getTemplatePath()); //$NON-NLS-1$
- assertEquals("index " + i, expectedBaseURLs[i], includedInput.getBaseLocation()); //$NON-NLS-1$
-
- inputStack.push(includedInput);
- }
-
- }
-
-
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManagerBuilder.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManagerBuilder.java
deleted file mode 100644
index d259fc4..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestInputManagerBuilder.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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
- */package org.eclipse.jet.tests.tools.compiler;
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.DefaultTemplateResolver;
-import org.eclipse.jet.core.parser.ITemplateResolver;
-
-/**
- * JUnits for {@link DefaultTemplateResolver.Builder}.
- *
- */
-public class TestInputManagerBuilder extends TestCase {
-
- private static final String LOCATION1_URL = "platform:/plugin/org.eclipse.jet.tests.core/data/templates/base2/"; //$NON-NLS-1$
- private static final String LOCATION2_URL = "platform:/plugin/org.eclipse.jet.tests.core/data/templates/base1/"; //$NON-NLS-1$
-
- /**
- * Test method for {@link org.eclipse.jet.core.parser.DefaultTemplateResolver.Builder#Builder(java.net.URI[])}.
- * @throws MalformedURLException
- * @throws URISyntaxException
- */
- public void testBuilderURLArray() throws MalformedURLException, URISyntaxException {
- final URI location1 = new URI(LOCATION2_URL);
- final URI location2 = new URI(LOCATION1_URL);
- DefaultTemplateResolver.Builder builder = new DefaultTemplateResolver.Builder(new URI[] {location1, location2});
-
- final ITemplateResolver im = builder.build();
-
- URI[] baseLocations = im.getBaseLocations();
-
- assertNotNull("baseLocations", baseLocations); //$NON-NLS-1$
- assertEquals(2, baseLocations.length);
- assertEquals(location1, baseLocations[0]);
- assertEquals(location2, baseLocations[1]);
- }
-
- /**
- * Test method for {@link DefaultTemplateResolver.Builder#Builder(URI[])} with a null array
- */
- public void testBuilderURLArray_null() {
- URI[] nullArray = null;
-
- try {
- new DefaultTemplateResolver.Builder(nullArray);
- fail("Expected NullPointerException"); //$NON-NLS-1$
- } catch(NullPointerException e) {
- // success
- }
- }
-
- /**
- * Test method for {@link org.eclipse.jet.core.parser.DefaultTemplateResolver.Builder#Builder(java.net.URI)}.
- * @throws URISyntaxException
- */
- public void testBuilderURL() throws URISyntaxException {
- final URI location1 = new URI(LOCATION2_URL);
- DefaultTemplateResolver.Builder builder = new DefaultTemplateResolver.Builder(location1);
-
- final ITemplateResolver im = builder.build();
-
- URI[] baseLocations = im.getBaseLocations();
-
- assertNotNull("baseLocations", baseLocations); //$NON-NLS-1$
- assertEquals(1, baseLocations.length);
- assertEquals(location1, baseLocations[0]);
- }
-
- /**
- * Test method for {@link DefaultTemplateResolver.Builder#Builder(URI)} with a null argument.
- *
- */
- public void testBuilderURL_null() {
- final URI nullURL = null;
- try {
- new DefaultTemplateResolver.Builder(nullURL);
- fail("Expected NullPointerException"); //$NON-NLS-1$
- } catch(NullPointerException e) {
- // success
- }
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java
deleted file mode 100644
index 75f3866..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- */
-package org.eclipse.jet.tests.tools.compiler;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.TemplateInputException;
-import org.eclipse.jet.internal.core.parser.DefaultTemplateInput;
-
-/**
- * @author pelder
- *
- */
-public class TestTemplateInput extends TestCase {
-
- private static final String TEMPLATE_PATH = "test1.txt"; //$NON-NLS-1$
- private static final String LOCATION1_URI = "platform:/plugin/org.eclipse.jet.tests.core/data/templates/base1/"; //$NON-NLS-1$
- private URI location1;
- private DefaultTemplateInput templateInput;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- location1 = new URI(LOCATION1_URI);
- templateInput = new DefaultTemplateInput(location1, TEMPLATE_PATH, "UTF-8"); //$NON-NLS-1$
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.parser.DefaultTemplateInput#getBaseLocation()}.
- */
- public void testGetBaseLocation() {
- assertEquals(location1, templateInput.getBaseLocation());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.parser.DefaultTemplateInput#getTemplatePath()}.
- */
- public void testGetTemplatePath() {
- assertEquals(TEMPLATE_PATH, templateInput.getTemplatePath());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.parser.DefaultTemplateInput#getTemplatePath()}.
- * @throws IOException
- * @throws TemplateInputException
- * @throws URISyntaxException
- */
- public void testGetTemplatePath_pathWithSpaces() throws IOException, TemplateInputException, URISyntaxException {
- final String templatePath = "Copy of test1.txt";
- DefaultTemplateInput defaultTemplateInput = new DefaultTemplateInput(location1, templatePath, "UTF-8");
-
- assertEquals(templatePath, defaultTemplateInput.getTemplatePath());
-
- Reader reader = null;
- try {
- reader = defaultTemplateInput.getReader();
- assertNotNull("reader", reader);
- } finally {
- if(reader != null) {
- reader.close();
- }
- }
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestUniqueNameGenerator.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestUniqueNameGenerator.java
deleted file mode 100644
index 72e73ab..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestUniqueNameGenerator.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * <copyright>
- *
- * 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: TestUniqueNameGenerator.java,v 1.1 2007/04/04 14:55:55 pelder Exp $
- */
-package org.eclipse.jet.tests.tools.compiler;
-
-import java.util.Collections;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.ast.JETAST;
-import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
-import org.eclipse.jet.internal.core.compiler.DuplicateGeneratedClassException;
-import org.eclipse.jet.internal.core.compiler.UniqueNameGenerator;
-
-/**
- * Unit tests for {@link UniqueNameGenerator}.
- *
- */
-public class TestUniqueNameGenerator extends TestCase {
-
- private static final String DEFAULT_PACKAGE = "org.eclipse.jet.compiled"; //$NON-NLS-1$
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.UniqueNameGenerator#ensureJavaOutputSet(java.lang.String, JETCompilationUnit)}.
- * @throws DuplicateGeneratedClassException
- */
- public void testEnsureJavaOutputSet_noconflicts() throws DuplicateGeneratedClassException {
- Map pathToFQN = Collections.EMPTY_MAP;
- Map fqnToPath = Collections.EMPTY_MAP;
- UniqueNameGenerator util = new UniqueNameGenerator(pathToFQN, fqnToPath, DEFAULT_PACKAGE);
-
- JETCompilationUnit cu = new JETAST().newJETCompilationUnit();
-
- util.ensureJavaOutputSet("templates/bob.jet", cu); //$NON-NLS-1$
-
- assertEquals(DEFAULT_PACKAGE, cu.getOutputJavaPackage());
- assertEquals("_jet_bob", cu.getOutputJavaClassName()); //$NON-NLS-1$
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.UniqueNameGenerator#ensureJavaOutputSet(java.lang.String, JETCompilationUnit)}.
- * @throws DuplicateGeneratedClassException
- */
- public void testEnsureJavaOutputSet_nameConflict() throws DuplicateGeneratedClassException {
- final String templatePath = "templates/bob.jet"; //$NON-NLS-1$
- final String otherTemplatePath = "templates/other/bob.jet"; //$NON-NLS-1$
- UniqueNameGenerator util = new UniqueNameGenerator(Collections.EMPTY_MAP, Collections.EMPTY_MAP, DEFAULT_PACKAGE);
-
- JETCompilationUnit cu1 = new JETAST().newJETCompilationUnit();
- JETCompilationUnit cu2 = new JETAST().newJETCompilationUnit();
-
- util.ensureJavaOutputSet(templatePath, cu1);
-
- assertEquals(DEFAULT_PACKAGE, cu1.getOutputJavaPackage());
- assertEquals("_jet_bob", cu1.getOutputJavaClassName()); //$NON-NLS-1$
-
- util.ensureJavaOutputSet(otherTemplatePath, cu2);
-
- assertEquals(DEFAULT_PACKAGE, cu2.getOutputJavaPackage());
- assertEquals("_jet_bob_0", cu2.getOutputJavaClassName()); //$NON-NLS-1$
-
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.compiler.UniqueNameGenerator#ensureJavaOutputSet(java.lang.String, JETCompilationUnit)}.
- * @throws DuplicateGeneratedClassException
- */
- public void testEnsureJavaOutputSet_sameName() throws DuplicateGeneratedClassException {
- final String templatePath = "templates/bob.jet"; //$NON-NLS-1$
- UniqueNameGenerator util = new UniqueNameGenerator(Collections.EMPTY_MAP, Collections.EMPTY_MAP, DEFAULT_PACKAGE);
-
- JETCompilationUnit cu1 = new JETAST().newJETCompilationUnit();
- JETCompilationUnit cu2 = new JETAST().newJETCompilationUnit();
-
- util.ensureJavaOutputSet(templatePath, cu1);
-
- assertEquals(DEFAULT_PACKAGE, cu1.getOutputJavaPackage());
- assertEquals("_jet_bob", cu1.getOutputJavaClassName()); //$NON-NLS-1$
-
- util.ensureJavaOutputSet(templatePath, cu2);
-
- assertEquals(DEFAULT_PACKAGE, cu2.getOutputJavaPackage());
- assertEquals("_jet_bob", cu2.getOutputJavaClassName()); //$NON-NLS-1$
-
- }
-
- public void testEnsureJavaOutputSet_duplicate() {
- final String templatePath = "templates/bob.jet"; //$NON-NLS-1$
- final String otherTemplatePath = "templates/jim.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu1 = new JETAST().newJETCompilationUnit();
- cu1.setOutputJavaPackage("a.b.c"); //$NON-NLS-1$
- cu1.setOutputJavaClassName("Common"); //$NON-NLS-1$
-
- UniqueNameGenerator util = new UniqueNameGenerator(Collections.EMPTY_MAP, Collections.EMPTY_MAP, DEFAULT_PACKAGE);
- try {
- util.ensureJavaOutputSet(otherTemplatePath, cu1);
- } catch (DuplicateGeneratedClassException e) {
- fail(e.toString());
- }
-
- JETCompilationUnit cu2 = new JETAST().newJETCompilationUnit();
- cu2.setOutputJavaPackage("a.b.c"); //$NON-NLS-1$
- cu2.setOutputJavaClassName("Common"); //$NON-NLS-1$
-
- try {
- util.ensureJavaOutputSet(templatePath, cu2);
- fail("Expected DuplicateGeneratedClassException"); //$NON-NLS-1$
- } catch (DuplicateGeneratedClassException e) {
- assertEquals("templatePath", templatePath, e.getTemplatePath()); //$NON-NLS-1$
- assertEquals("otherTemplatePath", otherTemplatePath, e.getOtherTemplatePath()); //$NON-NLS-1$
- assertEquals("fqn", "a.b.c.Common", e.getFullyQualifiedJavaClassName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/ASTDumper.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/ASTDumper.java
deleted file mode 100644
index 3e11679..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/ASTDumper.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package org.eclipse.jet.tests.tools.parser;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jet.core.parser.ast.Comment;
-import org.eclipse.jet.core.parser.ast.IncludedContent;
-import org.eclipse.jet.core.parser.ast.JETASTVisitor;
-import org.eclipse.jet.core.parser.ast.JETDirective;
-import org.eclipse.jet.core.parser.ast.JavaDeclaration;
-import org.eclipse.jet.core.parser.ast.JavaExpression;
-import org.eclipse.jet.core.parser.ast.JavaScriptlet;
-import org.eclipse.jet.core.parser.ast.TextElement;
-import org.eclipse.jet.core.parser.ast.XMLBodyElement;
-import org.eclipse.jet.core.parser.ast.XMLBodyElementEnd;
-import org.eclipse.jet.core.parser.ast.XMLEmptyElement;
-import org.eclipse.jet.internal.core.NewLineUtil;
-
-/**
- * AST Dumper for verification
- *
- */
-public class ASTDumper extends JETASTVisitor {
-
- private final StringBuffer buffer = new StringBuffer();
- private int indent = 0;
- private final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private void doIndent() {
- for(int i = 0; i < indent; i++) {
- buffer.append(" "); //$NON-NLS-1$
- }
- }
-
- public String getLog() {
- return NewLineUtil.setLineTerminator(buffer, NL);
- }
-
-
- /**
- *
- */
- public ASTDumper() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Declaration)
- */
- public boolean visit(JavaDeclaration declaration) {
- doIndent();
- buffer.append("<declaration line=\"" + declaration.getLine() + "\" col=\"" + declaration.getColumn() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(declaration.getJavaContent());
- buffer.append("</declaration>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Directive)
- */
- public boolean visit(JETDirective directive) {
- doIndent();
- buffer.append("<directive name=\"" + directive.getName() + "\" line=\"" + directive.getLine() + "\" col=\"" + directive.getColumn() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = directive.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(entry.getValue()).append("</attribute>").append(NL); //$NON-NLS-1$
-
- }
- indent--;
- doIndent();
- buffer.append("</directive>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Expression)
- */
- public boolean visit(JavaExpression expression) {
- doIndent();
- buffer.append("<expression line=\"" + expression.getLine() + "\" col=\"" + expression.getColumn() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(expression.getJavaContent());
- buffer.append("</expression>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Scriptlet)
- */
- public boolean visit(JavaScriptlet scriptlet) {
- doIndent();
- buffer.append("<scriptlet line=\"" + scriptlet.getLine() + "\" col=\"" + scriptlet.getColumn() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(scriptlet.getJavaContent());
- buffer.append("</scriptlet>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.TextElement)
- */
- public boolean visit(TextElement text) {
- doIndent();
- buffer.append("<data>").append(text.getText()).append("</data>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.XMLEmptyElement)
- */
- public boolean visit(XMLEmptyElement xmlEmptyElement) {
- doIndent();
- buffer.append("<tag name=\"" + xmlEmptyElement.getName() + "\" line=\"" + xmlEmptyElement.getLine() + "\" col=\"" + xmlEmptyElement.getColumn() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = xmlEmptyElement.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.XMLBodyElement)
- */
- public boolean visit(XMLBodyElement xmlBodyElement) {
- doIndent();
- buffer.append("<tag name=\"" + xmlBodyElement.getName() + "\" line=\"" + xmlBodyElement.getLine() + "\" col=\"" + xmlBodyElement.getColumn() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- indent++;
- for (Iterator i = xmlBodyElement.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- doIndent();
- buffer.append("<content>").append(NL); //$NON-NLS-1$
- indent++;
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#endVisit(org.eclipse.jet.compiler.XMLBodyElement)
- */
- public void endVisit(XMLBodyElement xmlBodyElement) {
- indent--;
- doIndent();
- buffer.append("</content>").append(NL); //$NON-NLS-1$
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL); //$NON-NLS-1$
- }
-
- public boolean visit(Comment comment) {
- doIndent();
- buffer.append("<comment line=\"" + comment.getLine() + "\" col=\"" + comment.getColumn() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append(comment.getCommentText());
- buffer.append("</comment>").append(NL); //$NON-NLS-1$
- return true;
- }
-
- public boolean visit(XMLBodyElementEnd xmlBodyElementEnd) {
- // do nothing
- return true;
-
- }
-
- public boolean visit(IncludedContent content) {
- doIndent();
- buffer.append("<included templatePath=\"" + content.getTemplatePath() + "\" baseLocation=\"" + content.getBaseLocationURI() + "\">").append(NL); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- indent++;
- return true;
- }
-
- public void endVisit(IncludedContent content) {
- indent--;
- doIndent();
- buffer.append("</included>").append(NL); //$NON-NLS-1$
-
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/AllTests.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/AllTests.java
deleted file mode 100644
index 9b4a36c..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/AllTests.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.jet.tests.tools.parser;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.tools.parser"); //$NON-NLS-1$
- //$JUnit-BEGIN$
- suite.addTestSuite(TestJETASTParser.class);
- suite.addTestSuite(TestInternalJET1Parser.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestInternalJET1Parser.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestInternalJET1Parser.java
deleted file mode 100644
index 9f55330..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestInternalJET1Parser.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package org.eclipse.jet.tests.tools.parser;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jet.core.parser.DefaultTemplateResolver;
-import org.eclipse.jet.core.parser.IJETParser;
-import org.eclipse.jet.core.parser.IProblem;
-import org.eclipse.jet.core.parser.ITemplateResolver;
-import org.eclipse.jet.core.parser.ProblemSeverity;
-import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
-import org.eclipse.jet.core.parser.ast.Problem;
-import org.eclipse.jet.internal.core.parser.InternalJET1Parser;
-import org.eclipse.jet.tests.core.FileUtils;
-
-public class TestInternalJET1Parser extends TestCase {
-
- private URI baseLocation;
- private URI altBaseLocation1;
- private URI altBaseLocation2
- ;
- private IJETParser parser;
- protected void setUp() throws Exception {
- super.setUp();
- baseLocation = new URI("platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/"); //$NON-NLS-1$
- altBaseLocation1 = new URI("platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt1/"); //$NON-NLS-1$
- altBaseLocation2 = new URI("platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt2/"); //$NON-NLS-1$
- ITemplateResolver templateResolver = new DefaultTemplateResolver.Builder(new URI[] {
- baseLocation,
- altBaseLocation1,
- altBaseLocation2,
- }).build();
- parser = new InternalJET1Parser(templateResolver);
- }
-
- /**
- * @param templatePath
- * @param resultsSuffix
- * @return
- * @throws MalformedURLException
- * @throws IOException
- * @throws CoreException
- */
- private String getResultsContents(final String templatePath, final String resultsSuffix) throws MalformedURLException, IOException, CoreException {
- return FileUtils.getFileContents(baseLocation.resolve(templatePath + resultsSuffix).toString(), true);
- }
-
- public void testInternalJET1Parser() {
-
- }
-
- public void testParseString() throws Exception {
- final String templatePath = "simple.javajet"; //$NON-NLS-1$
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templatePath);
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertFalse("no cu errors or warnings", cu.hasErrors() || cu.hasWarnings()); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-
- public void testParseString_simpleInclude() throws Exception {
- final String templatePath = "simple.include.javajet"; //$NON-NLS-1$
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templatePath);
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertFalse("no cu errors or warnings", cu.hasErrors() || cu.hasWarnings()); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-
- public void testParseString_complexInclude() throws Exception {
- final String templatePath = "complex.include.javajet"; //$NON-NLS-1$
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templatePath);
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertFalse("no cu errors or warnings", cu.hasErrors() || cu.hasWarnings()); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-
- public void testParseCharArray() throws Exception {
- final String templatePath = "simple.javajet"; //$NON-NLS-1$
- final String templateSource = getResultsContents(templatePath, ""); //$NON-NLS-1$
-
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templateSource.toCharArray());
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertFalse("no cu errors or warnings", cu.hasErrors() || cu.hasWarnings()); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-
- public void testParseCharArray_simpleInclude() throws Exception {
- final String templatePath = "simple.include.javajet"; //$NON-NLS-1$
- final String templateSource = getResultsContents(templatePath, ""); //$NON-NLS-1$
-
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templateSource.toCharArray());
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertTrue("cu errors, but no warnings", cu.hasErrors() && !cu.hasWarnings()); //$NON-NLS-1$
-
- final List problems = cu.getProblems();
-
- assertEquals(1, problems.size());
-
- Problem problem = (Problem) problems.get(0);
- assertEquals(ProblemSeverity.ERROR, problem.getProblemSeverity());
- assertEquals(IProblem.MissingFile, problem.getId());
- assertEquals("include1.jetinc", problem.getMessageArgs()[0]); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".chararray.astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-
- public void testParseString_includeWithAlternatives() throws Exception {
- final String templatePath = "alternative.include.javajet"; //$NON-NLS-1$
- final JETCompilationUnit cu = (JETCompilationUnit) parser.parse(templatePath);
-
- assertTrue("cu not null", cu != null); //$NON-NLS-1$
-
- assertFalse("no cu errors or warnings", cu.hasErrors() || cu.hasWarnings()); //$NON-NLS-1$
-
- final ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
- }
-}
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestJETASTParser.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestJETASTParser.java
deleted file mode 100644
index d893fcf..0000000
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/parser/TestJETASTParser.java
+++ /dev/null
@@ -1,560 +0,0 @@
-package org.eclipse.jet.tests.tools.parser;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jet.core.parser.DefaultTemplateResolver;
-import org.eclipse.jet.core.parser.IProblem;
-import org.eclipse.jet.core.parser.ITagLibraryResolver;
-import org.eclipse.jet.core.parser.ProblemSeverity;
-import org.eclipse.jet.core.parser.ast.JETAST;
-import org.eclipse.jet.core.parser.ast.JETASTParser;
-import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
-import org.eclipse.jet.core.parser.ast.Problem;
-import org.eclipse.jet.taglib.CustomTagKind;
-import org.eclipse.jet.taglib.TagAttributeDefinition;
-import org.eclipse.jet.taglib.TagDefinition;
-import org.eclipse.jet.taglib.TagLibrary;
-import org.eclipse.jet.taglib.TagLibraryReference;
-import org.eclipse.jet.tests.core.FileUtils;
-
-public class TestJETASTParser extends TestCase {
-
- public static final class TestTagAttributeDefinition implements TagAttributeDefinition {
-
- public static final class Builder {
- private final String name;
- private final String type;
- private boolean required;
-
- public Builder(String name, String type) {
- this.name = name;
- this.type = type;
- }
-
- public Builder required(boolean required) {
- this.required = required;
- return this;
- }
-
- public TestTagAttributeDefinition build() {
- return new TestTagAttributeDefinition(this);
- }
- }
-
- private final String name;
- private final String type;
- private final String description;
- private final boolean required;
-
- private TestTagAttributeDefinition(Builder builder) {
- name = builder.name;
- description = "Description of " + name; //$NON-NLS-1$
- type = builder.type;
- required = builder.required;
-
-
- }
- public String getDescription() {
- return description;
- }
-
- public String getName() {
- return name;
- }
-
- public String getType() {
- return type;
- }
-
- public boolean isDeprecated() {
- return false;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- }
- public static final class TestTagDefinition implements TagDefinition {
-
- public static final class Builder {
-
- private final TagLibrary tagLib;
- private final String name;
- private final CustomTagKind kind;
- private boolean contentAllowed;
- private boolean emptyAllowed;
- private boolean removeWhenContainingLineIsEmpty;
- private boolean requiresNewWriter;
- private final List tags = new ArrayList();
-
- public Builder(TagLibrary tagLib, String name, CustomTagKind kind) {
- this.tagLib = tagLib;
- this.name = name;
- this.kind = kind;
- }
-
- public Builder contentAllowed(boolean contentAllowed) {
- this.contentAllowed = contentAllowed;
- return this;
- }
-
- public Builder emptyAllowed(boolean emptyAllowed) {
- this.emptyAllowed = emptyAllowed;
- return this;
- }
-
- public Builder removeWhenContainingLineIsEmpty(boolean removeWhenContainingLineIsEmpty) {
- this.removeWhenContainingLineIsEmpty = removeWhenContainingLineIsEmpty;
- return this;
- }
-
- public Builder requiresNewWriter(boolean requiresNewWriter) {
- this.requiresNewWriter = requiresNewWriter;
- return this;
- }
-
- public Builder attribute(TagAttributeDefinition attribute) {
- tags.add(attribute);
- return this;
- }
-
- public TagDefinition build() {
- return new TestTagDefinition(this);
- }
- }
- private final TagLibrary tagLib;
- private final String name;
- private final CustomTagKind kind;
- private final String description;
- private final boolean contentAllowed;
- private final boolean emptyAllowed;
- private final boolean removeWhenContainingLineIsEmpty;
- private final boolean requiresNewWriter;
- private final List attributes;
-
- public TestTagDefinition(Builder builder) {
- tagLib = builder.tagLib;
- name = builder.name;
- kind = builder.kind;
- description = "Description for " + builder.name; //$NON-NLS-1$
- contentAllowed = builder.contentAllowed;
- emptyAllowed = builder.emptyAllowed;
- removeWhenContainingLineIsEmpty = builder.removeWhenContainingLineIsEmpty;
- requiresNewWriter = builder.requiresNewWriter;
-
- attributes = builder.tags;
- }
- public TagAttributeDefinition getAttributeDefinition(String name) {
- for (Iterator i = attributes.iterator(); i.hasNext();) {
- TagAttributeDefinition attribute = (TagAttributeDefinition) i.next();
- if(name.equals(attribute.getName())) {
- return attribute;
- }
- }
- return null;
- }
-
- public List getAttributeDefinitions() {
- // TODO Auto-generated method stub
- return attributes;
- }
-
- public String getDescription() {
- return description;
- }
-
- public CustomTagKind getKind() {
- return kind;
- }
-
- public String getName() {
- return name;
- }
-
- public TagLibrary getTagLibrary() {
- return tagLib;
- }
-
- public boolean isContentAllowed() {
- return contentAllowed;
- }
-
- public boolean isDeprecated() {
- return false;
- }
-
- public boolean isEmptyTagAllowed() {
- return emptyAllowed;
- }
-
- public boolean removeWhenContainingLineIsEmpty() {
- return removeWhenContainingLineIsEmpty;
- }
-
- public boolean requiresNewWriter() {
- return requiresNewWriter;
- }
-
- }
- public static final class TestTagLibrary implements TagLibrary {
-
- private static final TagLibrary instance = new TestTagLibrary();
-
- public static TagLibrary getInstance() {
- return instance;
- }
-
- private static final Map tagsByName = new HashMap(5);
- static {
- tagsByName.put("tokenize", //$NON-NLS-1$
- new TestTagDefinition.Builder(instance, "tokenize", CustomTagKind.ITERATING) //$NON-NLS-1$
- .contentAllowed(true)
- .removeWhenContainingLineIsEmpty(true)
- .attribute(new TestTagAttributeDefinition.Builder("string", "String").required(true).build()) //$NON-NLS-1$ //$NON-NLS-2$
- .attribute(new TestTagAttributeDefinition.Builder("sep", "String").required(true).build()) //$NON-NLS-1$ //$NON-NLS-2$
- .attribute(new TestTagAttributeDefinition.Builder("var", "String").required(true).build()) //$NON-NLS-1$ //$NON-NLS-2$
- .build());
- tagsByName.put("upper", //$NON-NLS-1$
- new TestTagDefinition.Builder(instance, "upper", CustomTagKind.FUNCTION) //$NON-NLS-1$
- .contentAllowed(true)
- .build());
- tagsByName.put("isAllUpper", //$NON-NLS-1$
- new TestTagDefinition.Builder(instance, "isAllUpper", CustomTagKind.CONDITIONAL) //$NON-NLS-1$
- .contentAllowed(true)
- .removeWhenContainingLineIsEmpty(true)
- .attribute(new TestTagAttributeDefinition.Builder("var", "String").required(true).build()) //$NON-NLS-1$ //$NON-NLS-2$
- .build());
- tagsByName.put("nl", //$NON-NLS-1$
- new TestTagDefinition.Builder(instance, "nl", CustomTagKind.EMPTY) //$NON-NLS-1$
- .contentAllowed(false)
- .emptyAllowed(true)
- .build());
- tagsByName.put("other", //$NON-NLS-1$
- new TestTagDefinition.Builder(instance, "other", CustomTagKind.EMPTY) //$NON-NLS-1$
- .contentAllowed(true)
- .emptyAllowed(true)
- .removeWhenContainingLineIsEmpty(true)
- .build());
- }
-
- public String getDefaultPrefix() {
- return "test"; //$NON-NLS-1$
- }
-
- public String getDescription() {
- return "test description"; //$NON-NLS-1$
- }
-
- public String getLibraryId() {
- return "org.eclipse.jet.tests.TestLibrary"; //$NON-NLS-1$
- }
-
- public String getLibraryName() {
- return "Test Library"; //$NON-NLS-1$
- }
-
- public TagDefinition getTagDefinition(String name) {
- return (TagDefinition) tagsByName.get(name);
- }
-
- public String[] getTagNames() {
- return (String[]) tagsByName.keySet().toArray(new String[0]);
- }
-
- public boolean hasTag(String tagNCName) {
- return tagsByName.containsKey(tagNCName);
- }
-
- public boolean isDeprecated() {
- return false;
- }
-
- }
- private static final class TagLibResolver implements ITagLibraryResolver {
-
- public TagLibrary getLibrary(String tagLibraryID) {
- return TestTagLibrary.getInstance();
- }
-
- }
- private URI baseLocation;
- protected void setUp() throws Exception {
- super.setUp();
- baseLocation = new URI("platform:/plugin/org.eclipse.jet.tests.core/data/parser/ast/"); //$NON-NLS-1$
-
- }
- /*
- * Test method for 'org.eclipse.jet.compiler.JET2Parser.compile(String, InputStream, String)'
- */
- public void testCompile() throws Exception {
- final String templatePath = "taglibs.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- ASTDumper astDumper = new ASTDumper();
- cu.accept(astDumper);
-
- assertEquals(getResultsContents(templatePath, ".JETASTParser.astdump.expected"), astDumper.getLog()); //$NON-NLS-1$
-
- }
- /**
- * @param templatePath
- * @param resultsSuffix
- * @return
- * @throws MalformedURLException
- * @throws IOException
- * @throws CoreException
- */
- private String getResultsContents(final String templatePath, final String resultsSuffix) throws MalformedURLException, IOException, CoreException {
- return FileUtils.getFileContents(baseLocation.resolve(templatePath + resultsSuffix).toString(), true);
- }
-
- public void testCompilationUnit_getTagLibraryReferences() throws Exception {
- final String templatePath = "taglibs.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- final TagLibraryReference[] tlRefs = cu.getTagLibraryReferences();
- assertNotNull(tlRefs);
- assertEquals(1, tlRefs.length);
- assertEquals("test", tlRefs[0].getPrefix()); //$NON-NLS-1$
- assertEquals("org.eclipse.jet.tests.TestLibrary", tlRefs[0].getTagLibraryId()); //$NON-NLS-1$
- }
-
- public void testXMLStartAsEmpty_bug147714() throws MalformedURLException, FileNotFoundException, IOException {
- final String templatePath = "bug147714.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 3, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 8, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.MissingXmlEndTag, problems[0].getId()); //$NON-NLS-1$
-
- assertEquals("Problem 2 line number", 8, problems[1].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 2 severity", ProblemSeverity.ERROR, problems[1].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 2 id", IProblem.TagCannotHaveContent, problems[1].getId()); //$NON-NLS-1$
-
- assertEquals("Problem 3 line number", 10, problems[2].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 3 severity", ProblemSeverity.WARNING, problems[2].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 3 id", IProblem.TagInterpretedAsEmptyTag, problems[2].getId()); //$NON-NLS-1$
-
-
- }
-
- public void testUnclosedCommnetErrors() throws Exception {
- final String templatePath = "unclosedComment.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- public void testUnclosedDeclarationErrors() throws Exception {
- final String templatePath = "unclosedDeclaration.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0] //$NON-NLS-1$
- .getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0] //$NON-NLS-1$
- .getId());
-
- }
-
- public void testUnclosedDirectiveErrors() throws Exception {
- final String templatePath = "unclosedDirective.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 1, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- public void testUnclosedExpressionErrors() throws Exception {
- final String templatePath = "unclosedExpression.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- public void testUnclosedScriptletErrors() throws Exception {
- final String templatePath = "unclosedScriplet.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- public void testUnclosedXMLEndErrors() throws Exception {
- final String templatePath = "unclosedXMLEnd.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- public void testUnclosedXMLStartErrors() throws Exception {
- final String templatePath = "unclosedXMLStart.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length); //$NON-NLS-1$
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber()); //$NON-NLS-1$
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId()); //$NON-NLS-1$
-
- }
-
- /**
- * @param cu
- * @return
- */
- private Problem[] getSortedProblems(JETCompilationUnit cu) {
- List problems = new ArrayList(cu.getProblems());
- // problems are not guaranteed to be in line order (should they)
- Collections.sort(problems, new Comparator() {
-
- public int compare(Object arg0, Object arg1) {
- Problem p0 = (Problem) arg0;
- Problem p1 = (Problem) arg1;
- int lineCompare = p0.getLineNumber() - p1.getLineNumber();
- if(lineCompare == 0) {
- return p0.getColOffset() - p1.getColOffset();
- } else {
- return lineCompare;
- }
- }});
-
- Problem[] problem = (Problem[]) problems.toArray(new Problem[problems.size()]);
- return problem;
- }
-
- public void testAttributeParsingErrors() throws Exception {
- final String templatePath = "attributeParsingErrors.jet"; //$NON-NLS-1$
-
- JETCompilationUnit cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibResolver())
- .build()
- .parse(templatePath);
-
- Problem[] problems = getSortedProblems(cu);
-
- assertTrue("At least one problem", problems.length > 0); //$NON-NLS-1$
-
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity()); //$NON-NLS-1$
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId()); //$NON-NLS-1$
- assertEquals("Problem 1 line number", 4, problems[0].getLineNumber()); //$NON-NLS-1$
- }
-}
diff --git a/tests/org.eclipse.jet.tests.core/test.xml b/tests/org.eclipse.jet.tests.core/test.xml
deleted file mode 100644
index bcddd44..0000000
--- a/tests/org.eclipse.jet.tests.core/test.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: test.xml,v 1.1 2007/04/04 15:24:17 pelder Exp $
- */
--->
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.jet.tests.core"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- 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="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="emft-folder" value="${eclipse-home}/emf_folder"/>
- <delete dir="${emft-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${emft-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jet.tests.core.AllToolsSuites"/>
- </ant>
- </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">
- </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="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.jet.tests/.classpath b/tests/org.eclipse.jet.tests/.classpath
deleted file mode 100644
index ce73933..0000000
--- a/tests/org.eclipse.jet.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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jet.tests/.cvsignore b/tests/org.eclipse.jet.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jet.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jet.tests/.project b/tests/org.eclipse.jet.tests/.project
deleted file mode 100644
index b145280..0000000
--- a/tests/org.eclipse.jet.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jet.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.jet.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.jet.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 68bb836..0000000
--- a/tests/org.eclipse.jet.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Thu Jan 12 10:55:42 EST 2006
-eclipse.preferences.version=1
-encoding//data/alljet2.jet=UTF-8
-encoding//data/alljet2.jet.expected=UTF-8
-encoding//data/beans.xsd=UTF8
-encoding//data/dm-example.xsd=UTF8
diff --git a/tests/org.eclipse.jet.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.jet.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 96cf3d5..0000000
--- a/tests/org.eclipse.jet.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,59 +0,0 @@
-#Tue Apr 03 15:27:11 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-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.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=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/tests/org.eclipse.jet.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jet.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 401edb0..0000000
--- a/tests/org.eclipse.jet.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jet.tests;singleton:=true
-Bundle-Version: 0.8.0.qualifier
-Bundle-ClassPath: tests.jar
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.jet,
- org.junit,
- org.eclipse.emf.codegen,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.xsd,
- org.eclipse.core.filebuffers,
- org.eclipse.core.resources
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/tests/org.eclipse.jet.tests/about.html b/tests/org.eclipse.jet.tests/about.html
deleted file mode 100644
index d4f39ad..0000000
--- a/tests/org.eclipse.jet.tests/about.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
- <h3>About This Content</h3>
-
- <p>June 5, 2007</p>
- <h3>License</h3>
-
- <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
- Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
- Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
- at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; 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 (&quot;Redistributor&quot;) and different terms and conditions may
- apply to your use of any object code in the Content. Check the Redistributor's 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>
- <p align="right"><small><a href="#top">go to top</a></small></p>
-
-</body>
-</html>
diff --git a/tests/org.eclipse.jet.tests/build.properties b/tests/org.eclipse.jet.tests/build.properties
deleted file mode 100644
index d2ceaa4..0000000
--- a/tests/org.eclipse.jet.tests/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-# NLS_MESSAGEFORMAT_VAR
-source.tests.jar = src/
-output.tests.jar = bin/
-bin.includes = META-INF/,\
- .,\
- data/,\
- plugin.xml,\
- about.html,\
- test.xml
-src.includes = about.html
diff --git a/tests/org.eclipse.jet.tests/data/ActionsUtil/MANIFEST.MF b/tests/org.eclipse.jet.tests/data/ActionsUtil/MANIFEST.MF
deleted file mode 100644
index ff8d913..0000000
--- a/tests/org.eclipse.jet.tests/data/ActionsUtil/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jet.tests;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-ClassPath: tests.jar
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.jet,
- org.junit,
- org.eclipse.emf.codegen,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.xsd,
- org.eclipse.core.filebuffers,
- org.eclipse.core.resources
-Bundle-Vendor: %providerName
diff --git a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16be.xml b/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16be.xml
deleted file mode 100644
index 368bb8c..0000000
--- a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16be.xml
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16le.xml b/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16le.xml
deleted file mode 100644
index a167ef1..0000000
--- a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16le.xml
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_bom.xml b/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_bom.xml
deleted file mode 100644
index 59bda64..0000000
--- a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_bom.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root>
- <a attr="b"/>
-</root>
diff --git a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_no_bom.xml b/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_no_bom.xml
deleted file mode 100644
index e93c6a2..0000000
--- a/tests/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_no_bom.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root>
- <a attr="b"/>
-</root>
diff --git a/tests/org.eclipse.jet.tests/data/DOMInspector.xml b/tests/org.eclipse.jet.tests/data/DOMInspector.xml
deleted file mode 100644
index dd08e67..0000000
--- a/tests/org.eclipse.jet.tests/data/DOMInspector.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<root rootAttr="test">
- <!-- a comment within root -->
- <a name="foo" name-with_hyphen="hello">
- <b>Some foo text.</b>
- </a>
- <a name="bar">
- <b>Some bar text.</b>
- </a>
-</root>
diff --git a/tests/org.eclipse.jet.tests/data/alljet2.jet b/tests/org.eclipse.jet.tests/data/alljet2.jet
deleted file mode 100644
index 241c44d..0000000
--- a/tests/org.eclipse.jet.tests/data/alljet2.jet
+++ /dev/null
@@ -1,34 +0,0 @@
-<%@jet class="Foo" package="org.eclipse.emf.examples"%>
-Some top level text.
-<%= "An expression" %>
-<%!
-int foo() {
- return 3;
-}
-%>
-<%
-if(foo() > 0) {
- foo();
-}
-%>
-<%-- a comment --%>
-<test:container one="test one" two='test two'>
- <test:empty/>
- <test:container>
- some text <nontest:text attributes="foo"/>
- </test:container>
-</test:container>
-<%-- tags containing Java --%>
-<test:container>
- <%= foo(); %>
- <% if(foo() > 0) { %>
- some text
- <% } %>
-</test:container>
-<%-- Java container tags --%>
-<% if(foo() > 0) { %>
- some text
- <test:empty/>
- <test:container>
- </test:container>
-<% } %>
diff --git a/tests/org.eclipse.jet.tests/data/alljet2.jet.expected b/tests/org.eclipse.jet.tests/data/alljet2.jet.expected
deleted file mode 100644
index 43b65a2..0000000
--- a/tests/org.eclipse.jet.tests/data/alljet2.jet.expected
+++ /dev/null
@@ -1,93 +0,0 @@
-<directive name="jet" start="(1,1)" stop="(1,56)">
- <attribute name="class">Foo</attribute>
- <attribute name="package">org.eclipse.emf.examples</attribute>
-</directive>
-<data>
-Some top level text.
-</data>
-<expression start="(3,4)" stop="(3,21)"> "An expression" </expression>
-<data>
-</data>
-<declaration start="(4,4)" stop="(8,1)">
-int foo() {
- return 3;
-}
-</declaration>
-<data>
-</data>
-<scriptlet start="(9,3)" stop="(13,1)">
-if(foo() > 0) {
- foo();
-}
-</scriptlet>
-<data>
-</data>
-<comment start="(14,5)" stop="(14,16)"> a comment </comment>
-<data>
-</data>
-<tag name="test:container" start="(15,1)" stop="(15,47)">
- <attribute name="one">test one</attribute>
- <attribute name="two">test two</attribute>
- <content>
- <data>
- </data>
- <tag name="test:empty" start="(16,5)" stop="(16,18)">
- </tag>
- <data>
- </data>
- <tag name="test:container" start="(17,5)" stop="(17,21)">
- <content>
- <data>
- some text <nontest:text attributes="foo"/>
- </data>
- </content>
- </tag>
- <data>
-</data>
- </content>
-</tag>
-<data>
-</data>
-<comment start="(21,5)" stop="(21,27)"> tags containing Java </comment>
-<data>
-</data>
-<tag name="test:container" start="(22,1)" stop="(22,17)">
- <content>
- <data>
- </data>
- <expression start="(23,8)" stop="(23,16)"> foo(); </expression>
- <data>
- </data>
- <scriptlet start="(24,7)" stop="(24,24)"> if(foo() > 0) { </scriptlet>
- <data>
- some text
- </data>
- <scriptlet start="(26,7)" stop="(26,10)"> } </scriptlet>
- <data>
-</data>
- </content>
-</tag>
-<data>
-</data>
-<comment start="(28,5)" stop="(28,26)"> Java container tags </comment>
-<data>
-</data>
-<scriptlet start="(29,3)" stop="(29,20)"> if(foo() > 0) { </scriptlet>
-<data>
- some text
- </data>
-<tag name="test:empty" start="(31,9)" stop="(31,22)">
-</tag>
-<data>
- </data>
-<tag name="test:container" start="(32,9)" stop="(32,25)">
- <content>
- <data>
- </data>
- </content>
-</tag>
-<data>
-</data>
-<scriptlet start="(34,3)" stop="(34,6)"> } </scriptlet>
-<data>
-</data>
diff --git a/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java b/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java
deleted file mode 100644
index 4d19cf8..0000000
--- a/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.emf.examples;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-
-public class Foo implements JET2Template {
-
-
-int foo() {
- return 3;
-}
-
- public Foo() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("Some top level text."); //$NON-NLS-1$
- out.write(NL);
- out.write( "An expression" );
- out.write(NL);
-
-if(foo() > 0) {
- foo();
-}
-
- out.write("<test:container one=\"test one\" two='test two'>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" <test:empty/>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" <test:container>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" some text <nontest:text attributes=\"foo\"/>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" </test:container>"); //$NON-NLS-1$
- out.write(NL);
- out.write("</test:container>"); //$NON-NLS-1$
- out.write(NL);
- out.write("<test:container>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" "); //$NON-NLS-1$
- out.write( foo(); );
- out.write(NL);
- if(foo() > 0) {
- out.write(" some text"); //$NON-NLS-1$
- out.write(NL);
- }
- out.write("</test:container>"); //$NON-NLS-1$
- out.write(NL);
- if(foo() > 0) {
- out.write(" some text"); //$NON-NLS-1$
- out.write(NL);
- out.write(" <test:empty/>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" <test:container>"); //$NON-NLS-1$
- out.write(NL);
- out.write(" </test:container>"); //$NON-NLS-1$
- out.write(NL);
- }
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/attributeParsingErrors.jet b/tests/org.eclipse.jet.tests/data/attributeParsingErrors.jet
deleted file mode 100644
index 99bf3cc..0000000
--- a/tests/org.eclipse.jet.tests/data/attributeParsingErrors.jet
+++ /dev/null
@@ -1,6 +0,0 @@
-<%@taglib prefix="c" id="org.eclipse.jet.controlTags"%>
-
-<%-- The following line is missing a double quote (") on the 'var' attribute --%>
-<c:iterate select="foo" var="bar>
- some text parameterized by bar: <c:get select="$bar"/>
-</c:iterate> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/bean.model.sample.xml b/tests/org.eclipse.jet.tests/data/bean.model.sample.xml
deleted file mode 100644
index c2367f2..0000000
--- a/tests/org.eclipse.jet.tests/data/bean.model.sample.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<root>
- <project name="test.beans">
- <beanmodel name="Library" basePackage="base.pkg">
- <bean name="Author" project="foo">
- <attribute name="name" type="String" kind="FIELD"/>
- <attribute name="books" type="Book" kind="LIST"/>
- </bean>
- <bean name="Book">
- <attribute name="title" type="String" kind="FIELD">The book title</attribute>
- <attribute name="pages" type="int" kind="FIELD"/>
- <attribute name="authors" type="Book" kind="LIST"/>
- </bean>
- <bean name="Library">
- <attribute name="name" type="String" kind="FIELD"/>
- <attribute name="yearFounded" type="int" kind="FIELD"/>
- <attribute name="authors" type="Author" kind="LIST"/>
- <attribute name="books" type="Book" kind="LIST"/>
- <attribute name="openSince" type="int" kind="DERIVED"/>
- </bean>
- </beanmodel>
- </project>
-</root> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/beanModel.badlocation.xml b/tests/org.eclipse.jet.tests/data/beanModel.badlocation.xml
deleted file mode 100644
index e819cbf..0000000
--- a/tests/org.eclipse.jet.tests/data/beanModel.badlocation.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="missing.beanModel.xsd">
- <beanModel basePackage="org.example" name="Library">
- <bean name="Library">
- <attribute kind="FIELD" name="name" type="String"/>
- <attribute kind="FIELD" name="yearFounded" type="int"/>
- <attribute kind="DERIVED" name="yearsOpen" type="int"/>
- <attribute kind="LIST" name="books" type="Book"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Book">
- <attribute kind="FIELD" name="title" type="String"/>
- <attribute kind="FIELD" name="pages" type="int"/>
- <attribute kind="LIST" name="author" type="Author"/>
- </bean>
- <bean name="Author">
- <attribute kind="FIELD" name="name" type="String"/>
- <attribute kind="LIST" name="books" type="Book"/>
- </bean>
- </beanModel>
-</root>
diff --git a/tests/org.eclipse.jet.tests/data/beanModel.xml b/tests/org.eclipse.jet.tests/data/beanModel.xml
deleted file mode 100644
index fb8d74c..0000000
--- a/tests/org.eclipse.jet.tests/data/beanModel.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="beanModel.xsd">
- <beanModel basePackage="org.example" name="Library">
- <bean name="Library">
- <attribute kind="FIELD" name="name" type="String"/>
- <attribute kind="FIELD" name="yearFounded" type="int"/>
- <attribute kind="DERIVED" name="yearsOpen" type="int"/>
- <attribute kind="LIST" name="books" type="Book"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Book">
- <attribute kind="FIELD" name="title" type="String"/>
- <attribute kind="FIELD" name="pages" type="int"/>
- <attribute kind="LIST" name="author" type="Author"/>
- </bean>
- <bean name="Author">
- <attribute kind="FIELD" name="name" type="String"/>
- <attribute kind="LIST" name="books" type="Book"/>
- </bean>
- </beanModel>
-</root>
diff --git a/tests/org.eclipse.jet.tests/data/beanModel.xsd b/tests/org.eclipse.jet.tests/data/beanModel.xsd
deleted file mode 100644
index 13a285a..0000000
--- a/tests/org.eclipse.jet.tests/data/beanModel.xsd
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="root">
- <xsd:sequence>
- <xsd:element name="beanModel" type="beanModel" maxOccurs="unbounded" minOccurs="0"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="project">
- <xsd:sequence>
- <xsd:element name="beanModel" type="beanModel" maxOccurs="unbounded" minOccurs="0"></xsd:element>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:complexType name="beanModel">
- <xsd:sequence>
- <xsd:element name="bean" type="bean" maxOccurs="unbounded" minOccurs="0"></xsd:element>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
- <xsd:attribute name="basePackage" type="xsd:string"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:complexType name="bean">
- <xsd:sequence>
- <xsd:element name="attribute" type="attribute" maxOccurs="unbounded" minOccurs="0"></xsd:element>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:complexType name="attribute">
- <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
- <xsd:attribute name="type" type="xsd:string"></xsd:attribute>
- <xsd:attribute name="kind" type="xsd:string"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:element name="root" type="root"></xsd:element>
-</xsd:schema> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/beans.xsd b/tests/org.eclipse.jet.tests/data/beans.xsd
deleted file mode 100644
index f886846..0000000
--- a/tests/org.eclipse.jet.tests/data/beans.xsd
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.example.org/beans" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" targetNamespace="http://www.example.org/beans">
- <xsd:complexType name="root">
- <xsd:sequence>
- <xsd:element maxOccurs="unbounded" minOccurs="0" name="project" type="project"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="project">
- <xsd:sequence>
- <xsd:element maxOccurs="unbounded" minOccurs="0" name="beanModel" type="beanModel"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- </xsd:complexType>
-
- <xsd:complexType name="beanModel">
- <xsd:sequence>
- <xsd:element maxOccurs="unbounded" minOccurs="0" name="bean" type="bean"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="basePackage" type="xsd:string"/>
- </xsd:complexType>
-
- <xsd:complexType name="bean">
- <xsd:sequence>
- <xsd:element maxOccurs="unbounded" minOccurs="0" name="attribute" type="attribute"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- </xsd:complexType>
-
- <xsd:complexType name="attribute">
- <xsd:sequence>
- <xsd:element maxOccurs="1" minOccurs="0" name="doc" type="xsd:string"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="type" type="xsd:string"/>
- <xsd:attribute name="kind" type="xsd:string"/>
- <xsd:attribute name="name-with_hyphen" type="xsd:string" use="optional"/>
- </xsd:complexType>
-
- <xsd:element name="root" type="root"/>
-
-</xsd:schema>
diff --git a/tests/org.eclipse.jet.tests/data/bug147714.jet b/tests/org.eclipse.jet.tests/data/bug147714.jet
deleted file mode 100644
index ec12e85..0000000
--- a/tests/org.eclipse.jet.tests/data/bug147714.jet
+++ /dev/null
@@ -1,11 +0,0 @@
-<%-- Bug 147714 requests the JET compiler to treat <tag ...> as <tag .../> if tag is an emptyTag.
-This is for compatibility with DPTK: http://www.alphaworks.ibm.com/tech/dptk.
-Since DPTK does not use namespace prefixes, the fix only applies to tags with not prefix.
---%>
-<%@taglib id="org.eclipse.jet.controlTags" prefix="c" %>
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="" %>
-
-<%-- line 8: expect error --%><c:get select="$foo">
-<%-- line 9: expect ok --%><c:get select="$foo"/>
-<%-- line 10: expect warning --%><nl>
-<%-- line 11: expect ok --%><nl/>
diff --git a/tests/org.eclipse.jet.tests/data/dm-example.xml b/tests/org.eclipse.jet.tests/data/dm-example.xml
deleted file mode 100644
index f03f715..0000000
--- a/tests/org.eclipse.jet.tests/data/dm-example.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="dm-example.xsl"?>
-<catalog xmlns="http://www.example.com/catalog"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/catalog
- dm-example.xsd"
- xml:lang="en"
- version="0.1">
-
-<!-- This example is for data model illustration only.
- It does not demonstrate good schema design. -->
-
-<tshirt code="T1534017" label=" Staind : Been Awhile "
- xlink:href="http://example.com/0,,1655091,00.html"
- sizes="M L XL">
- <title> Staind: Been Awhile Tee Black (1-sided) </title>
- <description>
- <html:p>
- Lyrics from the hit song 'It's Been Awhile'
- are shown in white, beneath the large
- 'Flock &amp; Weld' Staind logo.
- </html:p>
- </description>
- <price> 25.00 </price>
-</tshirt>
-
-<album code="A1481344" label=" Staind : Its Been A While "
- formats="CD">
- <title> It's Been A While </title>
- <description xsi:nil="true" />
- <price currency="USD"> 10.99 </price>
- <artist> Staind </artist>
-</album>
-
-</catalog> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/dm-example.xsd b/tests/org.eclipse.jet.tests/data/dm-example.xsd
deleted file mode 100644
index 0231cf3..0000000
--- a/tests/org.eclipse.jet.tests/data/dm-example.xsd
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:cat="http://www.example.com/catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.example.com/catalog">
-
-<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
-<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.cs.rpi.edu/~puninj/XGMML/xlinks-2001.xsd"/>
-
-<xs:element name="catalog">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" ref="cat:_item"/>
- </xs:sequence>
- <xs:attribute fixed="0.1" name="version" type="xs:string" use="required"/>
- <xs:attribute ref="xml:base"/>
- <xs:attribute ref="xml:lang"/>
- </xs:complexType>
-</xs:element>
-
-<xs:element abstract="true" name="_item" type="cat:itemType"/>
-
-<xs:complexType name="itemType">
- <xs:sequence>
- <xs:element name="title" type="xs:token"/>
- <xs:element name="description" nillable="true" type="cat:description"/>
- <xs:element maxOccurs="unbounded" name="price" type="cat:price"/>
- </xs:sequence>
- <xs:attribute name="label" type="xs:token"/>
- <xs:attribute name="code" type="xs:ID" use="required"/>
- <xs:attributeGroup ref="xlink:simpleLink"/>
-</xs:complexType>
-
-<xs:element name="tshirt" substitutionGroup="cat:_item" type="cat:tshirtType"/>
-
-<xs:complexType name="tshirtType">
- <xs:complexContent>
- <xs:extension base="cat:itemType">
- <xs:attribute name="sizes" type="cat:clothesSizes" use="required"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:simpleType name="clothesSizes">
- <xs:union memberTypes="cat:sizeList">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="oneSize"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="sizeList">
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="cat:clothesSize"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="clothesSize">
- <xs:union memberTypes="cat:numberedSize cat:categorySize"/>
-</xs:simpleType>
-
-<xs:simpleType name="numberedSize">
- <xs:restriction base="xs:integer">
- <xs:enumeration value="4"/>
- <xs:enumeration value="6"/>
- <xs:enumeration value="8"/>
- <xs:enumeration value="10"/>
- <xs:enumeration value="12"/>
- <xs:enumeration value="14"/>
- <xs:enumeration value="16"/>
- <xs:enumeration value="18"/>
- <xs:enumeration value="20"/>
- <xs:enumeration value="22"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="categorySize">
- <xs:restriction base="xs:token">
- <xs:enumeration value="XS"/>
- <xs:enumeration value="S"/>
- <xs:enumeration value="M"/>
- <xs:enumeration value="L"/>
- <xs:enumeration value="XL"/>
- <xs:enumeration value="XXL"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:element name="album" substitutionGroup="cat:_item" type="cat:albumType"/>
-
-<xs:complexType name="albumType">
- <xs:complexContent>
- <xs:extension base="cat:itemType">
- <xs:sequence>
- <xs:element name="artist" type="xs:string"/>
- </xs:sequence>
- <xs:attribute name="formats" type="cat:formatsType" use="required"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:simpleType name="formatsType">
- <xs:list itemType="cat:formatType"/>
-</xs:simpleType>
-
-<xs:simpleType name="formatType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="CD"/>
- <xs:enumeration value="MiniDisc"/>
- <xs:enumeration value="tape"/>
- <xs:enumeration value="vinyl"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType mixed="true" name="description">
- <xs:sequence>
- <xs:any maxOccurs="unbounded" minOccurs="0" namespace="http://www.w3.org/1999/xhtml" processContents="lax"/>
- </xs:sequence>
- <xs:attribute ref="xml:lang"/>
-</xs:complexType>
-
-<xs:complexType name="price">
- <xs:simpleContent>
- <xs:extension base="cat:monetaryAmount">
- <xs:attribute default="USD" name="currency" type="cat:currencyType"/>
- </xs:extension>
- </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="currencyType">
- <xs:restriction base="xs:token">
- <xs:pattern value="[A-Z]{3}"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="monetaryAmount">
- <xs:restriction base="xs:decimal">
- <xs:fractionDigits value="3"/>
- <xs:pattern value="\d+\.(\d{2})?"/>
- </xs:restriction>
-</xs:simpleType>
-
-</xs:schema>
diff --git a/tests/org.eclipse.jet.tests/data/jetast.ecore b/tests/org.eclipse.jet.tests/data/jetast.ecore
deleted file mode 100644
index 7003325..0000000
--- a/tests/org.eclipse.jet.tests/data/jetast.ecore
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="jetast"
- nsURI="http:///org/eclipse/emf/jet2/compile/jetast.ecore" nsPrefix="org.eclipse.emf.jet2.compile.jetast">
- <eClassifiers xsi:type="ecore:EClass" name="JET2AST"/>
- <eClassifiers xsi:type="ecore:EClass" name="JET2ASTElement" abstract="true">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="line" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="start" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="end" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ast" eType="#//JET2AST"
- containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//JET2ASTElement"
- containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Comment" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="commentStart" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="commentEnd" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="comment" eType="#//JavaCharArray"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="JavaElement" abstract="true" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaStart" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaEnd" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaContent" eType="#//JavaCharArray"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="JET2Declaration" eSuperTypes="#//JavaElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="JET2Expression" eSuperTypes="#//JavaElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="JET2Scriptlet" eSuperTypes="#//JavaElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="JET2CompilationUnit" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="fileName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaOutputPackage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaOutputClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="errors" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- changeable="false" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="warnings" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- changeable="false" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="problems" upperBound="-1"
- eType="#//Problem" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="bodyElements" upperBound="-1"
- eType="#//JET2ASTElement" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Problem">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="originatingFileName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="lineNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="start" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="end" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="msgArgs" eType="#//ObjectArray"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="severity" eType="#//Severity"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="#//ProblemId"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="Severity">
- <eLiterals name="ERROR"/>
- <eLiterals name="WARNING" value="1"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="ProblemId">
- <eLiterals name="MissingXmlStartTag"/>
- <eLiterals name="MissingXmlEndTag" value="1"/>
- <eLiterals name="MissingRequiredAttribute" value="2"/>
- <eLiterals name="DuplicateXMLNamespacePrefix" value="3"/>
- <eLiterals name="UnknownTagLibrary" value="4"/>
- <eLiterals name="UnknownAttributeInTag" value="5"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="JET2Directive" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
- eType="#//Attribute" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="TextElement" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" eType="#//JavaCharArray"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="XMLElement" abstract="true" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="tagDefinition" eType="#//TagDefinition"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="XMLEmptyElement" eSuperTypes="#//XMLElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="XMLBodyElement" eSuperTypes="#//XMLElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="endTagStart" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="endTagEnd" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
- eType="#//Attribute" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="bodyElements" upperBound="-1"
- eType="#//JET2ASTElement" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Attribute" eSuperTypes="#//JET2ASTElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="nameStart" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="nameEnd" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueStart" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueEnd" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="equalsOffset" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="JavaCharArray" instanceClassName="char[]"/>
- <eClassifiers xsi:type="ecore:EDataType" name="ObjectArray" instanceClassName="Object[]"/>
- <eClassifiers xsi:type="ecore:EDataType" name="TagDefinition" instanceClassName="org.eclipse.emf.jet2.taglib.TagDefinition"/>
-</ecore:EPackage>
diff --git a/tests/org.eclipse.jet.tests/data/library.xml b/tests/org.eclipse.jet.tests/data/library.xml
deleted file mode 100644
index 12e1c14..0000000
--- a/tests/org.eclipse.jet.tests/data/library.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:root xmlns:beans="http://www.example.org/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/beans beans.xsd ">
- <project name="test.beans">
- <beanModel basePackage="org.example" name="Library">
- <bean name="Library">
- <attribute kind="FIELD" name="name" type="String" name-with_hyphen="hello"/>
- <attribute kind="FIELD" name="yearFounded" type="int"/>
- <attribute kind="DERIVED" name="yearsOpen" type="int"/>
- <attribute kind="LIST" name="books" type="Book"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Book">
- <attribute kind="FIELD" name="title" type="String"/>
- <attribute kind="FIELD" name="pages" type="int"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Author">
- <attribute kind="FIELD" name="name" type="String">
- <doc>doc for Author.name</doc>
- </attribute>
- <attribute kind="LIST" name="books" type="Book"/>
- </bean>
- </beanModel>
- </project>
-</beans:root>
diff --git a/tests/org.eclipse.jet.tests/data/library.xml.indisguise b/tests/org.eclipse.jet.tests/data/library.xml.indisguise
deleted file mode 100644
index bd34f57..0000000
--- a/tests/org.eclipse.jet.tests/data/library.xml.indisguise
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:root xmlns:beans="http://www.example.org/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/beans beans.xsd ">
- <project name="test.beans">
- <beanModel basePackage="org.example" name="Library">
- <bean name="Library">
- <attribute kind="FIELD" name="name" type="String"/>
- <attribute kind="FIELD" name="yearFounded" type="int"/>
- <attribute kind="DERIVED" name="yearsOpen" type="int"/>
- <attribute kind="LIST" name="books" type="Book"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Book">
- <attribute kind="FIELD" name="title" type="String"/>
- <attribute kind="FIELD" name="pages" type="int"/>
- <attribute kind="LIST" name="authors" type="Author"/>
- </bean>
- <bean name="Author">
- <attribute kind="FIELD" name="name" type="String">
- <doc>doc for Author.name</doc>
- </attribute>
- <attribute kind="LIST" name="books" type="Book"/>
- </bean>
- </beanModel>
- </project>
-</beans:root>
diff --git a/tests/org.eclipse.jet.tests/data/lineinfo.jet b/tests/org.eclipse.jet.tests/data/lineinfo.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/lineinfo.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/lineinfo.jet.expected.txt b/tests/org.eclipse.jet.tests/data/lineinfo.jet.expected.txt
deleted file mode 100644
index 4fecfd7..0000000
--- a/tests/org.eclipse.jet.tests/data/lineinfo.jet.expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-1:69:<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-2:48:"isAllUpper", "nl", "other", "tokenize", "upper"
-3:0:
-4:58:<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-5:34:<test:other>some text</test:other>
-6:29:<test:isAllUpper var="token">
-7:18:</test:isAllUpper>
-8:38:<test:upper>foo</test:upper><test:nl/>
-9:13:<test:other/>
-10:16:</test:tokenize>
diff --git a/tests/org.eclipse.jet.tests/data/newproject.nolocation.xml b/tests/org.eclipse.jet.tests/data/newproject.nolocation.xml
deleted file mode 100644
index 28ae5f1..0000000
--- a/tests/org.eclipse.jet.tests/data/newproject.nolocation.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<p:newProjectModel xmlns:p="org.eclipse.jet.transforms.newproject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <project name="test3.foo.bar"/> <!-- HELLO -->
-</p:newProjectModel>
diff --git a/tests/org.eclipse.jet.tests/data/newproject.xml b/tests/org.eclipse.jet.tests/data/newproject.xml
deleted file mode 100644
index 08c4b03..0000000
--- a/tests/org.eclipse.jet.tests/data/newproject.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<p:newProjectModel xmlns:p="org.eclipse.jet.transforms.newproject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="org.eclipse.jet.transforms.newproject newproject.xsd ">
- <project name="test3.foo.bar"/> <!-- HELLO -->
-</p:newProjectModel>
diff --git a/tests/org.eclipse.jet.tests/data/newproject.xsd b/tests/org.eclipse.jet.tests/data/newproject.xsd
deleted file mode 100644
index 55c11d1..0000000
--- a/tests/org.eclipse.jet.tests/data/newproject.xsd
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="org.eclipse.jet.transforms.newproject" xmlns="org.eclipse.jet.transforms.newproject">
-
- <xsd:element name="newProjectModel" type="newProjectModel"></xsd:element>
-
- <xsd:complexType name="newProjectModel">
- <xsd:sequence minOccurs="1">
- <xsd:element name="project" type="project" minOccurs="1"
- maxOccurs="1">
- </xsd:element>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="project">
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
- <xsd:attribute name="bundleName" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- The display name of the resulting JET project. If
- not specified, this defaults to the value specified
- in the 'name' parameter.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="bundleSymbolicName" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- The id of the JET project. If not specified, this
- defaults to the name of the project.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="bundleVersion" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- The initial version number of the project. If not
- specified, this defaults to 1.0.0.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="bundleVendor" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- The Vendor of the JET Project. If not specified,
- this defaults to the empty string.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="binDir" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- The directory which will contain binary (compiled)
- Java classes. If not specified, the default is
- 'bin'.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="jet2javaDir" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>The directory into which Java source files corresponding to JET templates will be written. The default is 'jet2java'.</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="templatesDir" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>The directory to which initial tempates will be written. The default if 'templates'.</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="templateLoader" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>The fully qualified Java Class name of the template loader class. The default is 'org.eclipse.jet.compiled._jet_transformation'.</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="startTemplate" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation>The path of the start template. This path is relative the the tempates directory specified by templatesDir. The default is 'main.jet'.</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other"></xsd:anyAttribute>
- </xsd:complexType>
-</xsd:schema> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/plain.xml b/tests/org.eclipse.jet.tests/data/plain.xml
deleted file mode 100644
index 254246d..0000000
--- a/tests/org.eclipse.jet.tests/data/plain.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Root1>
- <beanModel1 basePackage="org.example" name="Library">
- <bean1 name="Library">
- <attribute1 kind="FIELD" name="name" type="String"/>
- <attribute1 kind="FIELD" name="yearFounded" type="int"/>
- <attribute1 kind="DERIVED" name="yearsOpen" type="int"/>
- <attribute1 kind="LIST" name="books" type="Book"/>
- <attribute1 kind="LIST" name="authors" type="Author"/>
- </bean1>
- <bean1 name="Book">
- <attribute1 kind="FIELD" name="title" type="String"/>
- <attribute1 kind="FIELD" name="pages" type="int"/>
- <attribute1 kind="LIST" name="author" type="Author"/>
- </bean1>
- <bean1 name="Author">
- <attribute1 kind="FIELD" name="name" type="String"/>
- <attribute1 kind="LIST" name="books" type="Book"/>
- </bean1>
- </beanModel1>
-</Root1> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/sample.dataaccess b/tests/org.eclipse.jet.tests/data/sample.dataaccess
deleted file mode 100644
index 1a7865b..0000000
--- a/tests/org.eclipse.jet.tests/data/sample.dataaccess
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataAccess:Employee xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:dataAccess="http:///dataAccess.ecore" name="Bob Smith" address="123 Main St" employeeNumber="12345">
- <customers name="Sam Brown" address="55 Bank St">
- <orders orderNumber="101" date="2005-12-15T00:00:00.000-0500" quantity="25"/>
- <orders orderNumber="13" date="2005-11-15T00:00:00.000-0500" quantity="55"/>
- </customers>
- <customers name="Tim Safari" address="18 Elephant Rd">
- <orders orderNumber="77" date="2005-11-20T00:00:00.000-0500" quantity="3"/>
- </customers>
-</dataAccess:Employee>
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/changedTemplates/simple.v2.input.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/changedTemplates/simple.v2.input.jet
deleted file mode 100644
index 3681ee5..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/changedTemplates/simple.v2.input.jet
+++ /dev/null
@@ -1,11 +0,0 @@
-<%@jet class="ChangedInput"%>
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java
deleted file mode 100644
index b0a469b..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class _jet_simplev2input implements JET2Template {
- private static final String _jetns_test = "org.eclipse.jet.tests.TestLibrary"; //$NON-NLS-1$
-
- public _jet_simplev2input() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static final TagInfo _td_test_tokenize_4_1 = new TagInfo("test:tokenize", //$NON-NLS-1$
- 4, 1,
- new String[] {
- "string", //$NON-NLS-1$
- "sep", //$NON-NLS-1$
- "var", //$NON-NLS-1$
- },
- new String[] {
- "a,b,c,d,e,f,g", //$NON-NLS-1$
- ",", //$NON-NLS-1$
- "token", //$NON-NLS-1$
- } );
- private static final TagInfo _td_test_other_5_1 = new TagInfo("test:other", //$NON-NLS-1$
- 5, 1,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_isAllUpper_6_1 = new TagInfo("test:isAllUpper", //$NON-NLS-1$
- 6, 1,
- new String[] {
- "var", //$NON-NLS-1$
- },
- new String[] {
- "token", //$NON-NLS-1$
- } );
- private static final TagInfo _td_test_upper_8_1 = new TagInfo("test:upper", //$NON-NLS-1$
- 8, 1,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_nl_8_29 = new TagInfo("test:nl", //$NON-NLS-1$
- 8, 29,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_other_9_1 = new TagInfo("test:other", //$NON-NLS-1$
- 9, 1,
- new String[] {
- },
- new String[] {
- } );
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("\"isAllUpper\", \"nl\", \"other\", \"tokenize\", \"upper\""); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- RuntimeTagElement _jettag_test_tokenize_4_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "tokenize", "test:tokenize", _td_test_tokenize_4_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_tokenize_4_1.setRuntimeParent(null);
- _jettag_test_tokenize_4_1.setTagInfo(_td_test_tokenize_4_1);
- _jettag_test_tokenize_4_1.doStart(context, out);
- while (_jettag_test_tokenize_4_1.okToProcessBody()) {
- RuntimeTagElement _jettag_test_other_5_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _td_test_other_5_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_5_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_5_1.setTagInfo(_td_test_other_5_1);
- _jettag_test_other_5_1.doStart(context, out);
- while (_jettag_test_other_5_1.okToProcessBody()) {
- out.write("some text"); //$NON-NLS-1$
- _jettag_test_other_5_1.handleBodyContent(out);
- }
- _jettag_test_other_5_1.doEnd();
- out.write(NL);
- RuntimeTagElement _jettag_test_isAllUpper_6_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "isAllUpper", "test:isAllUpper", _td_test_isAllUpper_6_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_isAllUpper_6_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_isAllUpper_6_1.setTagInfo(_td_test_isAllUpper_6_1);
- _jettag_test_isAllUpper_6_1.doStart(context, out);
- while (_jettag_test_isAllUpper_6_1.okToProcessBody()) {
- _jettag_test_isAllUpper_6_1.handleBodyContent(out);
- }
- _jettag_test_isAllUpper_6_1.doEnd();
- RuntimeTagElement _jettag_test_upper_8_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "upper", "test:upper", _td_test_upper_8_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_upper_8_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_upper_8_1.setTagInfo(_td_test_upper_8_1);
- _jettag_test_upper_8_1.doStart(context, out);
- JET2Writer _jettag_test_upper_8_1_saved_out = out;
- while (_jettag_test_upper_8_1.okToProcessBody()) {
- out = out.newNestedContentWriter();
- out.write("foo"); //$NON-NLS-1$
- _jettag_test_upper_8_1.handleBodyContent(out);
- }
- out = _jettag_test_upper_8_1_saved_out;
- _jettag_test_upper_8_1.doEnd();
- RuntimeTagElement _jettag_test_nl_8_29 = context.getTagFactory().createRuntimeTag(_jetns_test, "nl", "test:nl", _td_test_nl_8_29); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_nl_8_29.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_nl_8_29.setTagInfo(_td_test_nl_8_29);
- _jettag_test_nl_8_29.doStart(context, out);
- _jettag_test_nl_8_29.doEnd();
- out.write(NL);
- RuntimeTagElement _jettag_test_other_9_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _td_test_other_9_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_9_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_9_1.setTagInfo(_td_test_other_9_1);
- _jettag_test_other_9_1.doStart(context, out);
- _jettag_test_other_9_1.doEnd();
- _jettag_test_tokenize_4_1.handleBodyContent(out);
- }
- _jettag_test_tokenize_4_1.doEnd();
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java
deleted file mode 100644
index 7cb9a2a..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jet.JET2TemplateLoader;
-import org.eclipse.jet.JET2TemplateLoaderExtension;
-import org.eclipse.jet.JET2Template;
-
-public class TemplateLoaderClass implements JET2TemplateLoader, JET2TemplateLoaderExtension {
-
- private static final class TemplateFactoryMethod {
-
- private final String templatePath;
- private final String templateClass;
-
- public TemplateFactoryMethod(String templatePath, String templateClass) {
- this.templatePath = templatePath;
- this.templateClass = templateClass;
-
- }
-
- public String getTemplateClass() {
- return this.templateClass;
- }
-
- public String getTemplatePath() {
- return this.templatePath;
- }
-
- public JET2Template newTemplate() {
- JET2Template template = null;
- try {
- template = (JET2Template) Class.forName(this.templateClass).newInstance();
- } catch (InstantiationException e) {
- // ignore
- } catch (IllegalAccessException e) {
- // ignore
- } catch (ClassNotFoundException e) {
- // ignore
- }
- return template;
- }
-
-
- }
-
- private Map pathToFactoryMap = null;
-
- private JET2TemplateLoader delegate = null;
-
- public TemplateLoaderClass() {
- super();
- }
-
- public JET2Template getTemplate(String templatePath) {
- if(this.pathToFactoryMap == null) {
- initPathToFactoryMap();
- }
- TemplateFactoryMethod factory = (TemplateFactoryMethod)this.pathToFactoryMap.get(templatePath);
- return factory == null ? this.delegate == null ? null : this.delegate.getTemplate(templatePath) : factory.newTemplate();
- }
-
- private void addTemplate(String templatePath, String templateClass) {
- this.pathToFactoryMap.put(templatePath,
- new TemplateFactoryMethod(templatePath, templateClass));
- }
-
- private void initPathToFactoryMap() {
- this.pathToFactoryMap = new HashMap(2);
- addTemplate("simple.v2.input.jet", "org.eclipse.jet.compiled._jet_simplev2input" ); //$NON-NLS-1$ //$NON-NLS-2$
- addTemplate("simple.v2.input2.jet", "org.eclipse.jet.compiled._jet_simplev2input2" ); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void setDelegateLoader(JET2TemplateLoader loader) {
- this.delegate = loader;
- }
-
- public JET2TemplateLoader getDelegateLoader() {
- return this.delegate;
- }
-}
-
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat
deleted file mode 100644
index 23c0af8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2
deleted file mode 100644
index 0ff28f8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat2
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3
deleted file mode 100644
index 8ecde48..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat3
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4
deleted file mode 100644
index 768f2a8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat4
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet
deleted file mode 100644
index e77b527..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-This template uses a predefined tag library:
-
-<c:get select="$useMe/@attr"/>
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java
deleted file mode 100644
index 4757149..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-
-public class _jet_simplev2usePredefTagLibs implements JET2Template {
-
- public _jet_simplev2usePredefTagLibs() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("This template uses a predefined tag library:"); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- out.write("<c:get select=\"$useMe/@attr\"/>"); //$NON-NLS-1$
- out.write(NL);
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java
deleted file mode 100644
index bb5ad30..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class _jet_simplev2usePredefTagLibs implements JET2Template {
- private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
-
- public _jet_simplev2usePredefTagLibs() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static final TagInfo _td_c_get_3_1 = new TagInfo("c:get", //$NON-NLS-1$
- 3, 1,
- new String[] {
- "select", //$NON-NLS-1$
- },
- new String[] {
- "$useMe/@attr", //$NON-NLS-1$
- } );
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("This template uses a predefined tag library:"); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- RuntimeTagElement _jettag_c_get_3_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_c_get_3_1.setRuntimeParent(null);
- _jettag_c_get_3_1.setTagInfo(_td_c_get_3_1);
- _jettag_c_get_3_1.doStart(context, out);
- _jettag_c_get_3_1.doEnd();
- out.write(NL);
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/taglibs.jet b/tests/org.eclipse.jet.tests/data/taglibs.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/taglibs.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.astdump.expected b/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.astdump.expected
deleted file mode 100644
index b99d6d3..0000000
--- a/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.astdump.expected
+++ /dev/null
@@ -1,41 +0,0 @@
-<directive name="taglib" line="1" col="1">
- <attribute name="id">org.eclipse.jet.tests.TestLibrary</attribute>
- <attribute name="prefix">test</attribute>
-</directive>
-<data>"isAllUpper", "nl", "other", "tokenize", "upper"
-
-</data>
-<tag name="test:tokenize" line="4" col="1">
- <attribute name="sep">,</attribute>
- <attribute name="var">token</attribute>
- <attribute name="string">a,b,c,d,e,f,g</attribute>
- <content>
- <data></data>
- <tag name="test:other" line="5" col="1">
- <content>
- <data>some text</data>
- </content>
- </tag>
- <data>
-</data>
- <tag name="test:isAllUpper" line="6" col="1">
- <attribute name="var">token</attribute>
- <content>
- <data></data>
- </content>
- </tag>
- <data></data>
- <tag name="test:upper" line="8" col="1">
- <content>
- <data>foo</data>
- </content>
- </tag>
- <tag name="test:nl" line="8" col="29">
- </tag>
- <data>
-</data>
- <tag name="test:other" line="9" col="1">
- </tag>
- <data></data>
- </content>
-</tag>
diff --git a/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.expected.java b/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.expected.java
deleted file mode 100644
index 7e4b77e..0000000
--- a/tests/org.eclipse.jet.tests/data/taglibs.jet.JETASTParser.expected.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class X implements JET2Template {
- public static final String _jetns_test = "org.eclipse.jet.tests.TestLibrary"; //$NON-NLS-1$
-
- public X() {
- super();
- }
-
- public void generate(final JET2Context context, JET2Writer out) {
- final TagInfo _jettd_test_tokenize_4_1 = new TagInfo("test:tokenize", //$NON-NLS-1$
- 4, 1,
- new String[] {
- "sep", //$NON-NLS-1$
- "var", //$NON-NLS-1$
- "string", //$NON-NLS-1$
- },
- new String[] {
- ",", //$NON-NLS-1$
- "token", //$NON-NLS-1$
- "a,b,c,d,e,f,g", //$NON-NLS-1$
- } );
- final TagInfo _jettd_test_other_5_1 = new TagInfo("test:other", //$NON-NLS-1$
- 5, 1,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_isAllUpper_6_1 = new TagInfo("test:isAllUpper", //$NON-NLS-1$
- 6, 1,
- new String[] {
- "var", //$NON-NLS-1$
- },
- new String[] {
- "token", //$NON-NLS-1$
- } );
- final TagInfo _jettd_test_upper_8_1 = new TagInfo("test:upper", //$NON-NLS-1$
- 8, 1,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_nl_8_29 = new TagInfo("test:nl", //$NON-NLS-1$
- 8, 29,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_other_9_1 = new TagInfo("test:other", //$NON-NLS-1$
- 9, 1,
- new String[] {
- },
- new String[] {
- } );
- out.write( "\"isAllUpper\", \"nl\", \"other\", \"tokenize\", \"upper\"\r\n\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_tokenize_4_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "tokenize", "test:tokenize", _jettd_test_tokenize_4_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_tokenize_4_1.setRuntimeParent(null);
- _jettag_test_tokenize_4_1.setTagInfo(_jettd_test_tokenize_4_1);
- _jettag_test_tokenize_4_1.doStart(context, out);
- while (_jettag_test_tokenize_4_1.okToProcessBody()) {
- RuntimeTagElement _jettag_test_other_5_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _jettd_test_other_5_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_5_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_5_1.setTagInfo(_jettd_test_other_5_1);
- _jettag_test_other_5_1.doStart(context, out);
- while (_jettag_test_other_5_1.okToProcessBody()) {
- out.write( "some text" ); //$NON-NLS-1$
- _jettag_test_other_5_1.handleBodyContent(out);
- }
- _jettag_test_other_5_1.doEnd();
- out.write( "\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_isAllUpper_6_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "isAllUpper", "test:isAllUpper", _jettd_test_isAllUpper_6_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_isAllUpper_6_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_isAllUpper_6_1.setTagInfo(_jettd_test_isAllUpper_6_1);
- _jettag_test_isAllUpper_6_1.doStart(context, out);
- while (_jettag_test_isAllUpper_6_1.okToProcessBody()) {
- _jettag_test_isAllUpper_6_1.handleBodyContent(out);
- }
- _jettag_test_isAllUpper_6_1.doEnd();
- RuntimeTagElement _jettag_test_upper_8_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "upper", "test:upper", _jettd_test_upper_8_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_upper_8_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_upper_8_1.setTagInfo(_jettd_test_upper_8_1);
- _jettag_test_upper_8_1.doStart(context, out);
- JET2Writer _jettag_test_upper_8_1_saved_out = out;
- while (_jettag_test_upper_8_1.okToProcessBody()) {
- out = out.newNestedContentWriter();
- out.write( "foo" ); //$NON-NLS-1$
- _jettag_test_upper_8_1.handleBodyContent(out);
- }
- out = _jettag_test_upper_8_1_saved_out;
- _jettag_test_upper_8_1.doEnd();
- RuntimeTagElement _jettag_test_nl_8_29 = context.getTagFactory().createRuntimeTag(_jetns_test, "nl", "test:nl", _jettd_test_nl_8_29); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_nl_8_29.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_nl_8_29.setTagInfo(_jettd_test_nl_8_29);
- _jettag_test_nl_8_29.doStart(context, out);
- _jettag_test_nl_8_29.doEnd();
- out.write( "\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_other_9_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _jettd_test_other_9_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_9_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_9_1.setTagInfo(_jettd_test_other_9_1);
- _jettag_test_other_9_1.doStart(context, out);
- _jettag_test_other_9_1.doEnd();
- _jettag_test_tokenize_4_1.handleBodyContent(out);
- }
- _jettag_test_tokenize_4_1.doEnd();
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/data/taglibs.jet.astdump.expected b/tests/org.eclipse.jet.tests/data/taglibs.jet.astdump.expected
deleted file mode 100644
index 459e7ce..0000000
--- a/tests/org.eclipse.jet.tests/data/taglibs.jet.astdump.expected
+++ /dev/null
@@ -1,46 +0,0 @@
-<directive name="taglib" line="1" col="1">
- <attribute name="id">org.eclipse.jet.tests.TestLibrary</attribute>
- <attribute name="prefix">test</attribute>
-</directive>
-<data>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-</data>
-<tag name="test:tokenize" line="4" col="1">
- <attribute name="string">a,b,c,d,e,f,g</attribute>
- <attribute name="sep">,</attribute>
- <attribute name="var">token</attribute>
- <content>
- <data>
-</data>
- <tag name="test:other" line="5" col="1">
- <content>
- <data>some text</data>
- </content>
- </tag>
- <data>
-</data>
- <tag name="test:isAllUpper" line="6" col="1">
- <attribute name="var">token</attribute>
- <content>
- <data>
-</data>
- </content>
- </tag>
- <data>
-</data>
- <tag name="test:upper" line="8" col="1">
- <content>
- <data>foo</data>
- </content>
- </tag>
- <tag name="test:nl" line="8" col="29">
- </tag>
- <data>
-</data>
- <tag name="test:other" line="9" col="1">
- </tag>
- <data>
-</data>
- </content>
-</tag>
diff --git a/tests/org.eclipse.jet.tests/data/taglibs.jet.expected.java b/tests/org.eclipse.jet.tests/data/taglibs.jet.expected.java
deleted file mode 100644
index 2209083..0000000
--- a/tests/org.eclipse.jet.tests/data/taglibs.jet.expected.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class X implements JET2Template {
- public static final String _jetns_test = "org.eclipse.jet.tests.TestLibrary"; //$NON-NLS-1$
-
- public X() {
- super();
- }
-
- public void generate(final JET2Context context, JET2Writer out) {
- final TagInfo _jettd_test_tokenize_4_1 = new TagInfo("test:tokenize", //$NON-NLS-1$
- 4, 1,
- new String[] {
- "string", //$NON-NLS-1$
- "sep", //$NON-NLS-1$
- "var", //$NON-NLS-1$
- },
- new String[] {
- "a,b,c,d,e,f,g", //$NON-NLS-1$
- ",", //$NON-NLS-1$
- "token", //$NON-NLS-1$
- } );
- final TagInfo _jettd_test_other_5_1 = new TagInfo("test:other", //$NON-NLS-1$
- 5, 1,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_isAllUpper_6_1 = new TagInfo("test:isAllUpper", //$NON-NLS-1$
- 6, 1,
- new String[] {
- "var", //$NON-NLS-1$
- },
- new String[] {
- "token", //$NON-NLS-1$
- } );
- final TagInfo _jettd_test_upper_8_1 = new TagInfo("test:upper", //$NON-NLS-1$
- 8, 1,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_nl_8_29 = new TagInfo("test:nl", //$NON-NLS-1$
- 8, 29,
- new String[] {
- },
- new String[] {
- } );
- final TagInfo _jettd_test_other_9_1 = new TagInfo("test:other", //$NON-NLS-1$
- 9, 1,
- new String[] {
- },
- new String[] {
- } );
- out.write( "\"isAllUpper\", \"nl\", \"other\", \"tokenize\", \"upper\"\r\n\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_tokenize_4_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "tokenize", "test:tokenize", _jettd_test_tokenize_4_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_tokenize_4_1.setRuntimeParent(null);
- _jettag_test_tokenize_4_1.setTagInfo(_jettd_test_tokenize_4_1);
- _jettag_test_tokenize_4_1.doStart(context, out);
- while (_jettag_test_tokenize_4_1.okToProcessBody()) {
- RuntimeTagElement _jettag_test_other_5_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _jettd_test_other_5_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_5_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_5_1.setTagInfo(_jettd_test_other_5_1);
- _jettag_test_other_5_1.doStart(context, out);
- while (_jettag_test_other_5_1.okToProcessBody()) {
- out.write( "some text" ); //$NON-NLS-1$
- _jettag_test_other_5_1.handleBodyContent(out);
- }
- _jettag_test_other_5_1.doEnd();
- out.write( "\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_isAllUpper_6_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "isAllUpper", "test:isAllUpper", _jettd_test_isAllUpper_6_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_isAllUpper_6_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_isAllUpper_6_1.setTagInfo(_jettd_test_isAllUpper_6_1);
- _jettag_test_isAllUpper_6_1.doStart(context, out);
- while (_jettag_test_isAllUpper_6_1.okToProcessBody()) {
- _jettag_test_isAllUpper_6_1.handleBodyContent(out);
- }
- _jettag_test_isAllUpper_6_1.doEnd();
- RuntimeTagElement _jettag_test_upper_8_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "upper", "test:upper", _jettd_test_upper_8_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_upper_8_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_upper_8_1.setTagInfo(_jettd_test_upper_8_1);
- _jettag_test_upper_8_1.doStart(context, out);
- JET2Writer _jettag_test_upper_8_1_saved_out = out;
- while (_jettag_test_upper_8_1.okToProcessBody()) {
- out = out.newNestedContentWriter();
- out.write( "foo" ); //$NON-NLS-1$
- _jettag_test_upper_8_1.handleBodyContent(out);
- }
- out = _jettag_test_upper_8_1_saved_out;
- _jettag_test_upper_8_1.doEnd();
- RuntimeTagElement _jettag_test_nl_8_29 = context.getTagFactory().createRuntimeTag(_jetns_test, "nl", "test:nl", _jettd_test_nl_8_29); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_nl_8_29.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_nl_8_29.setTagInfo(_jettd_test_nl_8_29);
- _jettag_test_nl_8_29.doStart(context, out);
- _jettag_test_nl_8_29.doEnd();
- out.write( "\r\n" ); //$NON-NLS-1$
- RuntimeTagElement _jettag_test_other_9_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _jettd_test_other_9_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_9_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_9_1.setTagInfo(_jettd_test_other_9_1);
- _jettag_test_other_9_1.doStart(context, out);
- _jettag_test_other_9_1.doEnd();
- _jettag_test_tokenize_4_1.handleBodyContent(out);
- }
- _jettag_test_tokenize_4_1.doEnd();
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/data/textTrimmingTests.jet b/tests/org.eclipse.jet.tests/data/textTrimmingTests.jet
deleted file mode 100644
index 1570482..0000000
--- a/tests/org.eclipse.jet.tests/data/textTrimmingTests.jet
+++ /dev/null
@@ -1,70 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="c"%>
-<%-- This template is used to verify text trimming rules. It is used by TextTrimmingTexts.java --%>
-
-<%-- text stripping around start/end tags that support stripping (e.g. c:iterate) --%>
-test 001
-<c:iterate select="foo" var="bar">
- some text with four spaces after
-</c:iterate>
-test 001
-
-<%-- text stripping around start/end tags that support stripping (e.g. c:iterate)
- with leading and trailing whitepace --%>
-test 002
- <c:iterate select="foo" var="bar">
- some text with four spaces after
- </c:iterate>
-test 002
-
-<%-- text stripping around start/end tags that support stripping (e.g. c:iterate)
- with multi-line tags --%>
-test 003
- <c:iterate
- select="foo"
- var="bar"
- >
- some text with four spaces after
- </c:iterate
- >
-test 003
-
-<%-- text stripping on directives --%>
-test 004
- <%@taglib id="org.eclipse.jet.workspaceTags" prefix="ws"%>
-test 004
-
-<%-- text stripping on scriptlet --%>
-test 005
- <%
- int x = 3;
-%>
-test 005
-
-<%-- text stripping on declarations --%>
-test 006
- <%!
- public int square(int arg) {
- return arg * arg;
- }
-%>
-test 006
-
-<%-- text stripping on empytags that supports stripping --%>
-test 007
- <c:include template="templates/foo.jet"/>
-test 007
-
-<%-- text stripping on empytags that does not support stripping --%>
-test 008
- <c:get select="templates/foo.jet"/>
-test 008
-
-<%-- text stripping on comments --%>
-test 009
- <%-- a comment --%>
-test 009
-
-<%-- text stripping an expression --%>
-test 010
- <%= x %>
-test 010
diff --git a/tests/org.eclipse.jet.tests/data/unclosedComment.jet b/tests/org.eclipse.jet.tests/data/unclosedComment.jet
deleted file mode 100644
index ba01d6f..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedComment.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%-- String x = "Hello World!"; -%>
diff --git a/tests/org.eclipse.jet.tests/data/unclosedDeclaration.jet b/tests/org.eclipse.jet.tests/data/unclosedDeclaration.jet
deleted file mode 100644
index a12518f..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedDeclaration.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%! public void foo() {} >
diff --git a/tests/org.eclipse.jet.tests/data/unclosedDirective.jet b/tests/org.eclipse.jet.tests/data/unclosedDirective.jet
deleted file mode 100644
index c822dec..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedDirective.jet
+++ /dev/null
@@ -1 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/unclosedExpression.jet b/tests/org.eclipse.jet.tests/data/unclosedExpression.jet
deleted file mode 100644
index b67abe9..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedExpression.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<%= "Hello World!" >
diff --git a/tests/org.eclipse.jet.tests/data/unclosedScriplet.jet b/tests/org.eclipse.jet.tests/data/unclosedScriplet.jet
deleted file mode 100644
index dd654a9..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedScriplet.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<% String x = "Hello World!"; >
diff --git a/tests/org.eclipse.jet.tests/data/unclosedXMLEnd.jet b/tests/org.eclipse.jet.tests/data/unclosedXMLEnd.jet
deleted file mode 100644
index 08f095f..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedXMLEnd.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-</test:include
diff --git a/tests/org.eclipse.jet.tests/data/unclosedXMLStart.jet b/tests/org.eclipse.jet.tests/data/unclosedXMLStart.jet
deleted file mode 100644
index 31f3ccf..0000000
--- a/tests/org.eclipse.jet.tests/data/unclosedXMLStart.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
-
-<test:include template="foo"
diff --git a/tests/org.eclipse.jet.tests/data/xmlEndWithAttributes.jet b/tests/org.eclipse.jet.tests/data/xmlEndWithAttributes.jet
deleted file mode 100644
index a614208..0000000
--- a/tests/org.eclipse.jet.tests/data/xmlEndWithAttributes.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-</test:start attr="value">
diff --git a/tests/org.eclipse.jet.tests/data/xmlStartWithoutEnd.jet b/tests/org.eclipse.jet.tests/data/xmlStartWithoutEnd.jet
deleted file mode 100644
index 54760f5..0000000
--- a/tests/org.eclipse.jet.tests/data/xmlStartWithoutEnd.jet
+++ /dev/null
@@ -1,8 +0,0 @@
-<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
-
-<test:start attr="value">
-
-<test:start2 attr="two">
-
-</test:start>
-</test:start2> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/model/dataAccess.ecore b/tests/org.eclipse.jet.tests/model/dataAccess.ecore
deleted file mode 100644
index 70725f8..0000000
--- a/tests/org.eclipse.jet.tests/model/dataAccess.ecore
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="dataAccess"
- nsURI="http:///dataAccess.ecore" nsPrefix="dataAccess">
- <eClassifiers xsi:type="ecore:EClass" name="Customer" eSuperTypes="#//Person">
- <eStructuralFeatures xsi:type="ecore:EReference" name="orders" upperBound="-1"
- eType="#//Order" containment="true" resolveProxies="false"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
- <eStructuralFeatures xsi:type="ecore:EReference" name="customers" upperBound="-1"
- eType="#//Customer" containment="true" resolveProxies="false"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="employeeNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Order">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="orderNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/tests/org.eclipse.jet.tests/model/dataAccess.genmodel b/tests/org.eclipse.jet.tests/model/dataAccess.genmodel
deleted file mode 100644
index 583bb81..0000000
--- a/tests/org.eclipse.jet.tests/model/dataAccess.genmodel
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.test.jet2/src"
- modelPluginID="zzz.dataAccess" modelName="DataAccess" importerID="org.eclipse.emf.importer.ecore">
- <foreignModel>../../analysis/dataAccess.ecore</foreignModel>
- <genPackages prefix="DataAccess" disposableProviderFactory="true" ecorePackage="dataAccess.ecore#/">
- <genClasses ecoreClass="dataAccess.ecore#//Customer">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dataAccess.ecore#//Customer/orders"/>
- </genClasses>
- <genClasses ecoreClass="dataAccess.ecore#//Employee">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dataAccess.ecore#//Employee/customers"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Employee/employeeNumber"/>
- </genClasses>
- <genClasses ecoreClass="dataAccess.ecore#//Order">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Order/orderNumber"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Order/date"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Order/quantity"/>
- </genClasses>
- <genClasses ecoreClass="dataAccess.ecore#//Person">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Person/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dataAccess.ecore#//Person/address"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/tests/org.eclipse.jet.tests/plugin.properties b/tests/org.eclipse.jet.tests/plugin.properties
deleted file mode 100644
index ce9fddf..0000000
--- a/tests/org.eclipse.jet.tests/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# <copyright>
-# </copyright>
-#
-# $Id$
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = JET JUnit Tests (Incubation)
-providerName = Eclipse.org
diff --git a/tests/org.eclipse.jet.tests/plugin.xml b/tests/org.eclipse.jet.tests/plugin.xml
deleted file mode 100644
index 7a12008..0000000
--- a/tests/org.eclipse.jet.tests/plugin.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.jet.tagLibraries">
- <tagLibrary
- id="TestLibrary"
- name="Test Library">
- <functionTag
- class="org.eclipse.emf.test.jet2.testTags.UpperTagElement"
- name="upper"/>
- <iteratingTag
- class="org.eclipse.emf.test.jet2.testTags.TokenizeTagElement"
- name="tokenize">
- <attribute
- name="string"
- use="required"/>
- <attribute
- name="sep"
- use="required"/>
- <attribute
- name="var"
- use="required"/>
- </iteratingTag>
- <conditionalTag
- class="org.eclipse.emf.test.jet2.testTags.IsAllUpperTagElement"
- name="isAllUpper">
- <attribute
- name="var"
- use="required"/>
- </conditionalTag>
- <emptyTag
- class="org.eclipse.emf.test.jet2.testTags.NLTagElement"
- name="nl"/>
- <otherTag
- class="org.eclipse.emf.test.jet2.testTags.OtherTagElement"
- name="other"/>
- </tagLibrary>
- </extension>
- <extension
- point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http:///dataAccess.ecore"
- class = "dataAccess.DataAccessPackage"
- genModel = "model/dataAccess.genmodel" />
- </extension>
-
-</plugin>
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/Customer.java b/tests/org.eclipse.jet.tests/src/dataAccess/Customer.java
deleted file mode 100644
index fe93ddf..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/Customer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Customer</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link dataAccess.Customer#getOrders <em>Orders</em>}</li>
- * </ul>
- * </p>
- *
- * @see dataAccess.DataAccessPackage#getCustomer()
- * @model
- * @generated
- */
-public interface Customer extends Person {
- /**
- * Returns the value of the '<em><b>Orders</b></em>' containment reference list.
- * The list contents are of type {@link dataAccess.Order}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Orders</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Orders</em>' containment reference list.
- * @see dataAccess.DataAccessPackage#getCustomer_Orders()
- * @model type="dataAccess.Order" containment="true" resolveProxies="false"
- * @generated
- */
- EList getOrders();
-
-} // Customer
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessFactory.java b/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessFactory.java
deleted file mode 100644
index 8a8059e..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see dataAccess.DataAccessPackage
- * @generated
- */
-public interface DataAccessFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- DataAccessFactory eINSTANCE = dataAccess.impl.DataAccessFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Customer</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Customer</em>'.
- * @generated
- */
- Customer createCustomer();
-
- /**
- * Returns a new object of class '<em>Employee</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Employee</em>'.
- * @generated
- */
- Employee createEmployee();
-
- /**
- * Returns a new object of class '<em>Order</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Order</em>'.
- * @generated
- */
- Order createOrder();
-
- /**
- * Returns a new object of class '<em>Person</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Person</em>'.
- * @generated
- */
- Person createPerson();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- DataAccessPackage getDataAccessPackage();
-
-} //DataAccessFactory
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessPackage.java b/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessPackage.java
deleted file mode 100644
index 3fbc798..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/DataAccessPackage.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see dataAccess.DataAccessFactory
- * @model kind="package"
- * @generated
- */
-public interface DataAccessPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "dataAccess";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http:///dataAccess.ecore";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "dataAccess";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- DataAccessPackage eINSTANCE = dataAccess.impl.DataAccessPackageImpl.init();
-
- /**
- * The meta object id for the '{@link dataAccess.impl.PersonImpl <em>Person</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.PersonImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getPerson()
- * @generated
- */
- int PERSON = 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PERSON__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PERSON__ADDRESS = 1;
-
- /**
- * The number of structural features of the '<em>Person</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PERSON_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link dataAccess.impl.CustomerImpl <em>Customer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.CustomerImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getCustomer()
- * @generated
- */
- int CUSTOMER = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CUSTOMER__NAME = PERSON__NAME;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CUSTOMER__ADDRESS = PERSON__ADDRESS;
-
- /**
- * The feature id for the '<em><b>Orders</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CUSTOMER__ORDERS = PERSON_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Customer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CUSTOMER_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link dataAccess.impl.EmployeeImpl <em>Employee</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.EmployeeImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getEmployee()
- * @generated
- */
- int EMPLOYEE = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EMPLOYEE__NAME = PERSON__NAME;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EMPLOYEE__ADDRESS = PERSON__ADDRESS;
-
- /**
- * The feature id for the '<em><b>Customers</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EMPLOYEE__CUSTOMERS = PERSON_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Employee Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EMPLOYEE__EMPLOYEE_NUMBER = PERSON_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Employee</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EMPLOYEE_FEATURE_COUNT = PERSON_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link dataAccess.impl.OrderImpl <em>Order</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.OrderImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getOrder()
- * @generated
- */
- int ORDER = 2;
-
- /**
- * The feature id for the '<em><b>Order Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ORDER__ORDER_NUMBER = 0;
-
- /**
- * The feature id for the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ORDER__DATE = 1;
-
- /**
- * The feature id for the '<em><b>Quantity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ORDER__QUANTITY = 2;
-
- /**
- * The number of structural features of the '<em>Order</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ORDER_FEATURE_COUNT = 3;
-
-
- /**
- * Returns the meta object for class '{@link dataAccess.Customer <em>Customer</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Customer</em>'.
- * @see dataAccess.Customer
- * @generated
- */
- EClass getCustomer();
-
- /**
- * Returns the meta object for the containment reference list '{@link dataAccess.Customer#getOrders <em>Orders</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Orders</em>'.
- * @see dataAccess.Customer#getOrders()
- * @see #getCustomer()
- * @generated
- */
- EReference getCustomer_Orders();
-
- /**
- * Returns the meta object for class '{@link dataAccess.Employee <em>Employee</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Employee</em>'.
- * @see dataAccess.Employee
- * @generated
- */
- EClass getEmployee();
-
- /**
- * Returns the meta object for the containment reference list '{@link dataAccess.Employee#getCustomers <em>Customers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Customers</em>'.
- * @see dataAccess.Employee#getCustomers()
- * @see #getEmployee()
- * @generated
- */
- EReference getEmployee_Customers();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Employee#getEmployeeNumber <em>Employee Number</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Employee Number</em>'.
- * @see dataAccess.Employee#getEmployeeNumber()
- * @see #getEmployee()
- * @generated
- */
- EAttribute getEmployee_EmployeeNumber();
-
- /**
- * Returns the meta object for class '{@link dataAccess.Order <em>Order</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Order</em>'.
- * @see dataAccess.Order
- * @generated
- */
- EClass getOrder();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Order#getOrderNumber <em>Order Number</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Order Number</em>'.
- * @see dataAccess.Order#getOrderNumber()
- * @see #getOrder()
- * @generated
- */
- EAttribute getOrder_OrderNumber();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Order#getDate <em>Date</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Date</em>'.
- * @see dataAccess.Order#getDate()
- * @see #getOrder()
- * @generated
- */
- EAttribute getOrder_Date();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Order#getQuantity <em>Quantity</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Quantity</em>'.
- * @see dataAccess.Order#getQuantity()
- * @see #getOrder()
- * @generated
- */
- EAttribute getOrder_Quantity();
-
- /**
- * Returns the meta object for class '{@link dataAccess.Person <em>Person</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Person</em>'.
- * @see dataAccess.Person
- * @generated
- */
- EClass getPerson();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Person#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see dataAccess.Person#getName()
- * @see #getPerson()
- * @generated
- */
- EAttribute getPerson_Name();
-
- /**
- * Returns the meta object for the attribute '{@link dataAccess.Person#getAddress <em>Address</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Address</em>'.
- * @see dataAccess.Person#getAddress()
- * @see #getPerson()
- * @generated
- */
- EAttribute getPerson_Address();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- DataAccessFactory getDataAccessFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link dataAccess.impl.CustomerImpl <em>Customer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.CustomerImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getCustomer()
- * @generated
- */
- EClass CUSTOMER = eINSTANCE.getCustomer();
-
- /**
- * The meta object literal for the '<em><b>Orders</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference CUSTOMER__ORDERS = eINSTANCE.getCustomer_Orders();
-
- /**
- * The meta object literal for the '{@link dataAccess.impl.EmployeeImpl <em>Employee</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.EmployeeImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getEmployee()
- * @generated
- */
- EClass EMPLOYEE = eINSTANCE.getEmployee();
-
- /**
- * The meta object literal for the '<em><b>Customers</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EMPLOYEE__CUSTOMERS = eINSTANCE.getEmployee_Customers();
-
- /**
- * The meta object literal for the '<em><b>Employee Number</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute EMPLOYEE__EMPLOYEE_NUMBER = eINSTANCE.getEmployee_EmployeeNumber();
-
- /**
- * The meta object literal for the '{@link dataAccess.impl.OrderImpl <em>Order</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.OrderImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getOrder()
- * @generated
- */
- EClass ORDER = eINSTANCE.getOrder();
-
- /**
- * The meta object literal for the '<em><b>Order Number</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ORDER__ORDER_NUMBER = eINSTANCE.getOrder_OrderNumber();
-
- /**
- * The meta object literal for the '<em><b>Date</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ORDER__DATE = eINSTANCE.getOrder_Date();
-
- /**
- * The meta object literal for the '<em><b>Quantity</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ORDER__QUANTITY = eINSTANCE.getOrder_Quantity();
-
- /**
- * The meta object literal for the '{@link dataAccess.impl.PersonImpl <em>Person</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see dataAccess.impl.PersonImpl
- * @see dataAccess.impl.DataAccessPackageImpl#getPerson()
- * @generated
- */
- EClass PERSON = eINSTANCE.getPerson();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PERSON__NAME = eINSTANCE.getPerson_Name();
-
- /**
- * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PERSON__ADDRESS = eINSTANCE.getPerson_Address();
-
- }
-
-} //DataAccessPackage
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/Employee.java b/tests/org.eclipse.jet.tests/src/dataAccess/Employee.java
deleted file mode 100644
index fb499c5..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/Employee.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Employee</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link dataAccess.Employee#getCustomers <em>Customers</em>}</li>
- * <li>{@link dataAccess.Employee#getEmployeeNumber <em>Employee Number</em>}</li>
- * </ul>
- * </p>
- *
- * @see dataAccess.DataAccessPackage#getEmployee()
- * @model
- * @generated
- */
-public interface Employee extends Person {
- /**
- * Returns the value of the '<em><b>Customers</b></em>' containment reference list.
- * The list contents are of type {@link dataAccess.Customer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Customers</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Customers</em>' containment reference list.
- * @see dataAccess.DataAccessPackage#getEmployee_Customers()
- * @model type="dataAccess.Customer" containment="true" resolveProxies="false"
- * @generated
- */
- EList getCustomers();
-
- /**
- * Returns the value of the '<em><b>Employee Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Employee Number</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Employee Number</em>' attribute.
- * @see #setEmployeeNumber(int)
- * @see dataAccess.DataAccessPackage#getEmployee_EmployeeNumber()
- * @model
- * @generated
- */
- int getEmployeeNumber();
-
- /**
- * Sets the value of the '{@link dataAccess.Employee#getEmployeeNumber <em>Employee Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Employee Number</em>' attribute.
- * @see #getEmployeeNumber()
- * @generated
- */
- void setEmployeeNumber(int value);
-
-} // Employee
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/Order.java b/tests/org.eclipse.jet.tests/src/dataAccess/Order.java
deleted file mode 100644
index f705a7d..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/Order.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import java.util.Date;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Order</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link dataAccess.Order#getOrderNumber <em>Order Number</em>}</li>
- * <li>{@link dataAccess.Order#getDate <em>Date</em>}</li>
- * <li>{@link dataAccess.Order#getQuantity <em>Quantity</em>}</li>
- * </ul>
- * </p>
- *
- * @see dataAccess.DataAccessPackage#getOrder()
- * @model
- * @generated
- */
-public interface Order extends EObject {
- /**
- * Returns the value of the '<em><b>Order Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order Number</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order Number</em>' attribute.
- * @see #setOrderNumber(int)
- * @see dataAccess.DataAccessPackage#getOrder_OrderNumber()
- * @model
- * @generated
- */
- int getOrderNumber();
-
- /**
- * Sets the value of the '{@link dataAccess.Order#getOrderNumber <em>Order Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order Number</em>' attribute.
- * @see #getOrderNumber()
- * @generated
- */
- void setOrderNumber(int value);
-
- /**
- * Returns the value of the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Date</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Date</em>' attribute.
- * @see #setDate(Date)
- * @see dataAccess.DataAccessPackage#getOrder_Date()
- * @model
- * @generated
- */
- Date getDate();
-
- /**
- * Sets the value of the '{@link dataAccess.Order#getDate <em>Date</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Date</em>' attribute.
- * @see #getDate()
- * @generated
- */
- void setDate(Date value);
-
- /**
- * Returns the value of the '<em><b>Quantity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Quantity</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Quantity</em>' attribute.
- * @see #setQuantity(int)
- * @see dataAccess.DataAccessPackage#getOrder_Quantity()
- * @model
- * @generated
- */
- int getQuantity();
-
- /**
- * Sets the value of the '{@link dataAccess.Order#getQuantity <em>Quantity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Quantity</em>' attribute.
- * @see #getQuantity()
- * @generated
- */
- void setQuantity(int value);
-
-} // Order
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/Person.java b/tests/org.eclipse.jet.tests/src/dataAccess/Person.java
deleted file mode 100644
index ca85dc4..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/Person.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Person</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link dataAccess.Person#getName <em>Name</em>}</li>
- * <li>{@link dataAccess.Person#getAddress <em>Address</em>}</li>
- * </ul>
- * </p>
- *
- * @see dataAccess.DataAccessPackage#getPerson()
- * @model
- * @generated
- */
-public interface Person extends EObject {
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see dataAccess.DataAccessPackage#getPerson_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link dataAccess.Person#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Address</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Address</em>' attribute.
- * @see #setAddress(String)
- * @see dataAccess.DataAccessPackage#getPerson_Address()
- * @model
- * @generated
- */
- String getAddress();
-
- /**
- * Sets the value of the '{@link dataAccess.Person#getAddress <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Address</em>' attribute.
- * @see #getAddress()
- * @generated
- */
- void setAddress(String value);
-
-} // Person
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/CustomerImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/CustomerImpl.java
deleted file mode 100644
index 39219ee..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/CustomerImpl.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.Customer;
-import dataAccess.DataAccessPackage;
-import dataAccess.Order;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Customer</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link dataAccess.impl.CustomerImpl#getOrders <em>Orders</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class CustomerImpl extends PersonImpl implements Customer {
- /**
- * The cached value of the '{@link #getOrders() <em>Orders</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrders()
- * @generated
- * @ordered
- */
- protected EList orders = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected CustomerImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return DataAccessPackage.Literals.CUSTOMER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getOrders() {
- if (orders == null) {
- orders = new EObjectContainmentEList(Order.class, this, DataAccessPackage.CUSTOMER__ORDERS);
- }
- return orders;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DataAccessPackage.CUSTOMER__ORDERS:
- return ((InternalEList)getOrders()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DataAccessPackage.CUSTOMER__ORDERS:
- return getOrders();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DataAccessPackage.CUSTOMER__ORDERS:
- getOrders().clear();
- getOrders().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case DataAccessPackage.CUSTOMER__ORDERS:
- getOrders().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DataAccessPackage.CUSTOMER__ORDERS:
- return orders != null && !orders.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //CustomerImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessFactoryImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessFactoryImpl.java
deleted file mode 100644
index 579e852..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessFactoryImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.*;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class DataAccessFactoryImpl extends EFactoryImpl implements DataAccessFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static DataAccessFactory init() {
- try {
- DataAccessFactory theDataAccessFactory = (DataAccessFactory)EPackage.Registry.INSTANCE.getEFactory("http:///dataAccess.ecore");
- if (theDataAccessFactory != null) {
- return theDataAccessFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new DataAccessFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DataAccessFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case DataAccessPackage.CUSTOMER: return createCustomer();
- case DataAccessPackage.EMPLOYEE: return createEmployee();
- case DataAccessPackage.ORDER: return createOrder();
- case DataAccessPackage.PERSON: return createPerson();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Customer createCustomer() {
- CustomerImpl customer = new CustomerImpl();
- return customer;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Employee createEmployee() {
- EmployeeImpl employee = new EmployeeImpl();
- return employee;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Order createOrder() {
- OrderImpl order = new OrderImpl();
- return order;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Person createPerson() {
- PersonImpl person = new PersonImpl();
- return person;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DataAccessPackage getDataAccessPackage() {
- return (DataAccessPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- public static DataAccessPackage getPackage() {
- return DataAccessPackage.eINSTANCE;
- }
-
-} //DataAccessFactoryImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessPackageImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessPackageImpl.java
deleted file mode 100644
index 03d9bec..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/DataAccessPackageImpl.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.Customer;
-import dataAccess.DataAccessFactory;
-import dataAccess.DataAccessPackage;
-import dataAccess.Employee;
-import dataAccess.Order;
-import dataAccess.Person;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class DataAccessPackageImpl extends EPackageImpl implements DataAccessPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass customerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass employeeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass orderEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass personEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see dataAccess.DataAccessPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private DataAccessPackageImpl() {
- super(eNS_URI, DataAccessFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static DataAccessPackage init() {
- if (isInited) return (DataAccessPackage)EPackage.Registry.INSTANCE.getEPackage(DataAccessPackage.eNS_URI);
-
- // Obtain or create and register package
- DataAccessPackageImpl theDataAccessPackage = (DataAccessPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DataAccessPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DataAccessPackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theDataAccessPackage.createPackageContents();
-
- // Initialize created meta-data
- theDataAccessPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theDataAccessPackage.freeze();
-
- return theDataAccessPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getCustomer() {
- return customerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getCustomer_Orders() {
- return (EReference)customerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getEmployee() {
- return employeeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getEmployee_Customers() {
- return (EReference)employeeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEmployee_EmployeeNumber() {
- return (EAttribute)employeeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getOrder() {
- return orderEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getOrder_OrderNumber() {
- return (EAttribute)orderEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getOrder_Date() {
- return (EAttribute)orderEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getOrder_Quantity() {
- return (EAttribute)orderEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getPerson() {
- return personEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPerson_Name() {
- return (EAttribute)personEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPerson_Address() {
- return (EAttribute)personEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DataAccessFactory getDataAccessFactory() {
- return (DataAccessFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- customerEClass = createEClass(CUSTOMER);
- createEReference(customerEClass, CUSTOMER__ORDERS);
-
- employeeEClass = createEClass(EMPLOYEE);
- createEReference(employeeEClass, EMPLOYEE__CUSTOMERS);
- createEAttribute(employeeEClass, EMPLOYEE__EMPLOYEE_NUMBER);
-
- orderEClass = createEClass(ORDER);
- createEAttribute(orderEClass, ORDER__ORDER_NUMBER);
- createEAttribute(orderEClass, ORDER__DATE);
- createEAttribute(orderEClass, ORDER__QUANTITY);
-
- personEClass = createEClass(PERSON);
- createEAttribute(personEClass, PERSON__NAME);
- createEAttribute(personEClass, PERSON__ADDRESS);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Add supertypes to classes
- customerEClass.getESuperTypes().add(this.getPerson());
- employeeEClass.getESuperTypes().add(this.getPerson());
-
- // Initialize classes and features; add operations and parameters
- initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCustomer_Orders(), this.getOrder(), null, "orders", null, 0, -1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(employeeEClass, Employee.class, "Employee", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEmployee_Customers(), this.getCustomer(), null, "customers", null, 0, -1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEmployee_EmployeeNumber(), ecorePackage.getEInt(), "employeeNumber", null, 0, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(orderEClass, Order.class, "Order", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getOrder_OrderNumber(), ecorePackage.getEInt(), "orderNumber", null, 0, 1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getOrder_Quantity(), ecorePackage.getEInt(), "quantity", null, 0, 1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPerson_Name(), ecorePackage.getEString(), "name", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPerson_Address(), ecorePackage.getEString(), "address", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //DataAccessPackageImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/EmployeeImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/EmployeeImpl.java
deleted file mode 100644
index bcedc36..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/EmployeeImpl.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.Customer;
-import dataAccess.DataAccessPackage;
-import dataAccess.Employee;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Employee</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link dataAccess.impl.EmployeeImpl#getCustomers <em>Customers</em>}</li>
- * <li>{@link dataAccess.impl.EmployeeImpl#getEmployeeNumber <em>Employee Number</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class EmployeeImpl extends PersonImpl implements Employee {
- /**
- * The cached value of the '{@link #getCustomers() <em>Customers</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCustomers()
- * @generated
- * @ordered
- */
- protected EList customers = null;
-
- /**
- * The default value of the '{@link #getEmployeeNumber() <em>Employee Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEmployeeNumber()
- * @generated
- * @ordered
- */
- protected static final int EMPLOYEE_NUMBER_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getEmployeeNumber() <em>Employee Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEmployeeNumber()
- * @generated
- * @ordered
- */
- protected int employeeNumber = EMPLOYEE_NUMBER_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EmployeeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return DataAccessPackage.Literals.EMPLOYEE;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getCustomers() {
- if (customers == null) {
- customers = new EObjectContainmentEList(Customer.class, this, DataAccessPackage.EMPLOYEE__CUSTOMERS);
- }
- return customers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getEmployeeNumber() {
- return employeeNumber;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEmployeeNumber(int newEmployeeNumber) {
- int oldEmployeeNumber = employeeNumber;
- employeeNumber = newEmployeeNumber;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.EMPLOYEE__EMPLOYEE_NUMBER, oldEmployeeNumber, employeeNumber));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DataAccessPackage.EMPLOYEE__CUSTOMERS:
- return ((InternalEList)getCustomers()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DataAccessPackage.EMPLOYEE__CUSTOMERS:
- return getCustomers();
- case DataAccessPackage.EMPLOYEE__EMPLOYEE_NUMBER:
- return new Integer(getEmployeeNumber());
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DataAccessPackage.EMPLOYEE__CUSTOMERS:
- getCustomers().clear();
- getCustomers().addAll((Collection)newValue);
- return;
- case DataAccessPackage.EMPLOYEE__EMPLOYEE_NUMBER:
- setEmployeeNumber(((Integer)newValue).intValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case DataAccessPackage.EMPLOYEE__CUSTOMERS:
- getCustomers().clear();
- return;
- case DataAccessPackage.EMPLOYEE__EMPLOYEE_NUMBER:
- setEmployeeNumber(EMPLOYEE_NUMBER_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DataAccessPackage.EMPLOYEE__CUSTOMERS:
- return customers != null && !customers.isEmpty();
- case DataAccessPackage.EMPLOYEE__EMPLOYEE_NUMBER:
- return employeeNumber != EMPLOYEE_NUMBER_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (employeeNumber: ");
- result.append(employeeNumber);
- result.append(')');
- return result.toString();
- }
-
-} //EmployeeImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/OrderImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/OrderImpl.java
deleted file mode 100644
index 95c473f..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/OrderImpl.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.DataAccessPackage;
-import dataAccess.Order;
-
-import java.util.Date;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Order</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link dataAccess.impl.OrderImpl#getOrderNumber <em>Order Number</em>}</li>
- * <li>{@link dataAccess.impl.OrderImpl#getDate <em>Date</em>}</li>
- * <li>{@link dataAccess.impl.OrderImpl#getQuantity <em>Quantity</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class OrderImpl extends EObjectImpl implements Order {
- /**
- * The default value of the '{@link #getOrderNumber() <em>Order Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderNumber()
- * @generated
- * @ordered
- */
- protected static final int ORDER_NUMBER_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getOrderNumber() <em>Order Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderNumber()
- * @generated
- * @ordered
- */
- protected int orderNumber = ORDER_NUMBER_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected static final Date DATE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected Date date = DATE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuantity()
- * @generated
- * @ordered
- */
- protected static final int QUANTITY_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuantity()
- * @generated
- * @ordered
- */
- protected int quantity = QUANTITY_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected OrderImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return DataAccessPackage.Literals.ORDER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getOrderNumber() {
- return orderNumber;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOrderNumber(int newOrderNumber) {
- int oldOrderNumber = orderNumber;
- orderNumber = newOrderNumber;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.ORDER__ORDER_NUMBER, oldOrderNumber, orderNumber));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDate(Date newDate) {
- Date oldDate = date;
- date = newDate;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.ORDER__DATE, oldDate, date));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getQuantity() {
- return quantity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setQuantity(int newQuantity) {
- int oldQuantity = quantity;
- quantity = newQuantity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.ORDER__QUANTITY, oldQuantity, quantity));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DataAccessPackage.ORDER__ORDER_NUMBER:
- return new Integer(getOrderNumber());
- case DataAccessPackage.ORDER__DATE:
- return getDate();
- case DataAccessPackage.ORDER__QUANTITY:
- return new Integer(getQuantity());
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DataAccessPackage.ORDER__ORDER_NUMBER:
- setOrderNumber(((Integer)newValue).intValue());
- return;
- case DataAccessPackage.ORDER__DATE:
- setDate((Date)newValue);
- return;
- case DataAccessPackage.ORDER__QUANTITY:
- setQuantity(((Integer)newValue).intValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case DataAccessPackage.ORDER__ORDER_NUMBER:
- setOrderNumber(ORDER_NUMBER_EDEFAULT);
- return;
- case DataAccessPackage.ORDER__DATE:
- setDate(DATE_EDEFAULT);
- return;
- case DataAccessPackage.ORDER__QUANTITY:
- setQuantity(QUANTITY_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DataAccessPackage.ORDER__ORDER_NUMBER:
- return orderNumber != ORDER_NUMBER_EDEFAULT;
- case DataAccessPackage.ORDER__DATE:
- return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
- case DataAccessPackage.ORDER__QUANTITY:
- return quantity != QUANTITY_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (orderNumber: ");
- result.append(orderNumber);
- result.append(", date: ");
- result.append(date);
- result.append(", quantity: ");
- result.append(quantity);
- result.append(')');
- return result.toString();
- }
-
-} //OrderImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/impl/PersonImpl.java b/tests/org.eclipse.jet.tests/src/dataAccess/impl/PersonImpl.java
deleted file mode 100644
index 9bb175b..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/impl/PersonImpl.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.impl;
-
-import dataAccess.DataAccessPackage;
-import dataAccess.Person;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Person</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link dataAccess.impl.PersonImpl#getName <em>Name</em>}</li>
- * <li>{@link dataAccess.impl.PersonImpl#getAddress <em>Address</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PersonImpl extends EObjectImpl implements Person {
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected static final String ADDRESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected String address = ADDRESS_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PersonImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return DataAccessPackage.Literals.PERSON;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.PERSON__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAddress(String newAddress) {
- String oldAddress = address;
- address = newAddress;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DataAccessPackage.PERSON__ADDRESS, oldAddress, address));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DataAccessPackage.PERSON__NAME:
- return getName();
- case DataAccessPackage.PERSON__ADDRESS:
- return getAddress();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DataAccessPackage.PERSON__NAME:
- setName((String)newValue);
- return;
- case DataAccessPackage.PERSON__ADDRESS:
- setAddress((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case DataAccessPackage.PERSON__NAME:
- setName(NAME_EDEFAULT);
- return;
- case DataAccessPackage.PERSON__ADDRESS:
- setAddress(ADDRESS_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DataAccessPackage.PERSON__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DataAccessPackage.PERSON__ADDRESS:
- return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", address: ");
- result.append(address);
- result.append(')');
- return result.toString();
- }
-
-} //PersonImpl
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessAdapterFactory.java b/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessAdapterFactory.java
deleted file mode 100644
index 4ebb4e4..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessAdapterFactory.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.util;
-
-import dataAccess.*;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see dataAccess.DataAccessPackage
- * @generated
- */
-public class DataAccessAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static DataAccessPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DataAccessAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = DataAccessPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DataAccessSwitch modelSwitch =
- new DataAccessSwitch() {
- public Object caseCustomer(Customer object) {
- return createCustomerAdapter();
- }
- public Object caseEmployee(Employee object) {
- return createEmployeeAdapter();
- }
- public Object caseOrder(Order object) {
- return createOrderAdapter();
- }
- public Object casePerson(Person object) {
- return createPersonAdapter();
- }
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter)modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link dataAccess.Customer <em>Customer</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see dataAccess.Customer
- * @generated
- */
- public Adapter createCustomerAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link dataAccess.Employee <em>Employee</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see dataAccess.Employee
- * @generated
- */
- public Adapter createEmployeeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link dataAccess.Order <em>Order</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see dataAccess.Order
- * @generated
- */
- public Adapter createOrderAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link dataAccess.Person <em>Person</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see dataAccess.Person
- * @generated
- */
- public Adapter createPersonAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //DataAccessAdapterFactory
diff --git a/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessSwitch.java b/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessSwitch.java
deleted file mode 100644
index 95a0779..0000000
--- a/tests/org.eclipse.jet.tests/src/dataAccess/util/DataAccessSwitch.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package dataAccess.util;
-
-import dataAccess.*;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see dataAccess.DataAccessPackage
- * @generated
- */
-public class DataAccessSwitch {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static DataAccessPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DataAccessSwitch() {
- if (modelPackage == null) {
- modelPackage = DataAccessPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public Object doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case DataAccessPackage.CUSTOMER: {
- Customer customer = (Customer)theEObject;
- Object result = caseCustomer(customer);
- if (result == null) result = casePerson(customer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DataAccessPackage.EMPLOYEE: {
- Employee employee = (Employee)theEObject;
- Object result = caseEmployee(employee);
- if (result == null) result = casePerson(employee);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DataAccessPackage.ORDER: {
- Order order = (Order)theEObject;
- Object result = caseOrder(order);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DataAccessPackage.PERSON: {
- Person person = (Person)theEObject;
- Object result = casePerson(person);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Customer</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Customer</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseCustomer(Customer object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Employee</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Employee</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEmployee(Employee object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Order</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Order</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseOrder(Order object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Person</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Person</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object casePerson(Person object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //DataAccessSwitch
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllSuites.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllSuites.java
deleted file mode 100644
index 75ae7b0..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllSuites.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllSuites extends TestSuite
-{
- private static Test[] suites = new Test []{
- org.eclipse.jet.tests.AllTests.suite(),
- };
-
- public static Test suite()
- {
- return new AllSuites("JET Build JUnit Test Suite");
- }
-
- public AllSuites()
- {
- super();
- populateSuite();
- }
-
- public AllSuites(Class theClass)
- {
- super(theClass);
- populateSuite();
- }
-
- public AllSuites(String name)
- {
- super(name);
- populateSuite();
- }
-
- protected void populateSuite()
- {
- for (int i = 0; i < suites.length; i++)
- {
- addTest(suites[i]);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java
deleted file mode 100644
index 6445e93..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.jet.tests;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jet.tests");
- suite.addTest(org.eclipse.jet.tests.compiler.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.xpath.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.xpath.functions.extras.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.model.load.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.taglib.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.taglib.control.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.taglib.workspace.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.taglib.java.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.taglib.format.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.runtime.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.parser.resources.AllTests.suite());
- //$JUnit-BEGIN$
-
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/FileUtils.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/FileUtils.java
deleted file mode 100644
index 69af4fb..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/FileUtils.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.filebuffers.manipulation.ConvertLineDelimitersOperation;
-import org.eclipse.core.filebuffers.manipulation.FileBufferOperationRunner;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * File utilities for Unit tests getting expected results from the JUnit project.
- *
- */
-public class FileUtils {
-
- /**
- *
- *
- */
- private FileUtils() {
- // prevent instantiation.
- }
-
- /**
- * Resolve a URL to a location string (file system absolute path).
- * @param urlString a URL string, possibly using the platform:/ format.
- * @return an absolute file system path corresponding to <code>urlString</code>
- * @throws IOException if an IO error occurs
- * @throws MalformedURLException if urlString is an invalid URL
- */
- public static String resolveURLToLocationString(String urlString) throws IOException, MalformedURLException {
- String fileName = Platform.resolve(new URL(urlString)).getFile();
- return fileName;
- }
-
- /**
- * Return the file contents as a string. This method also converts the file's line
- * separator to the current system's line separator if <code>convertNewLines</code> is <code>true</code>.
- * @param urlString a URL string, possibly using the platform:/ format.
- * @param convertNewLines Convert the file line separators to the system line separator.
- * @return the file contents
- * @throws IOException if an IO error occurs
- * @throws MalformedURLException if urlString is an invalid URL
- * @throws CoreException if an error occurs reading the file.
- */
- public static String getFileContents(String urlString, boolean convertNewLines) throws MalformedURLException, IOException, CoreException {
-
- final ITextFileBufferManager textBufferMgr = FileBuffers.getTextFileBufferManager();
- String fileName = resolveURLToLocationString(urlString);
-
- final IPath path = new Path(fileName);
- textBufferMgr.connect(path, new NullProgressMonitor());
- final ITextFileBuffer textFileBuffer = textBufferMgr.getTextFileBuffer(path);
-
- if(convertNewLines) {
- new FileBufferOperationRunner(textBufferMgr, null)
- .execute(
- new IPath[] { path },
- new ConvertLineDelimitersOperation(System.getProperty("line.separator")),
- new NullProgressMonitor());
- }
-
- final String result = textFileBuffer.getDocument().get();
- textBufferMgr.disconnect(path, new NullProgressMonitor());
- return result;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java
deleted file mode 100644
index 631c78c..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.jet.tests.compiler;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.compiler");
- //$JUnit-BEGIN$
- suite.addTestSuite(TestJETParser.class);
- suite.addTestSuite(TestSimplifiedCompiler.class);
- suite.addTestSuite(TestJET2Parser.class);
- suite.addTest(TextTrimmingTests.suite());
- suite.addTest(TestCompilationHelper.suite());
- suite.addTestSuite(LineInfoTests.class);
-//$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/LineInfoTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/LineInfoTests.java
deleted file mode 100644
index 8e3885c..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/LineInfoTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.jet.tests.compiler;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.parser.LineInfo;
-import org.eclipse.jet.tests.FileUtils;
-
-public class LineInfoTests extends TestCase {
-
- /*
- * Test method for 'org.eclipse.jet.internal.parser.LineInfo.calculateLines(char[])'
- */
- public void testCalculateLines() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/lineinfo.jet";
- final String fileContents = FileUtils.getFileContents(urlString, false);
-
- final LineInfo[] lineInfo = LineInfo.calculateLines(fileContents.toCharArray());
- final String NL = System.getProperty("line.separator");
-
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < lineInfo.length; i++) {
- result.append(i + 1).append(":").append(lineInfo[i].getEnd() - lineInfo[i].getStart()).append(':')
- .append(fileContents.substring(lineInfo[i].getStart(), lineInfo[i].getEnd())).append(NL);
- }
-
- final String expectedContents = FileUtils.getFileContents(urlString + ".expected.txt", true);
- assertEquals(expectedContents, result.toString());
-
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.parser.LineInfo.getLineInfo(LineInfo[], int)'
- */
- public void testGetLineInfo() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/lineinfo.jet";
- final String fileContents = FileUtils.getFileContents(urlString, false);
-
- final LineInfo[] lineInfo = LineInfo.calculateLines(fileContents.toCharArray());
-
- try {
- LineInfo.getLineInfo(lineInfo, -1);
- fail();
- } catch(IllegalArgumentException e) {
- // success
- }
-
-
- final LineInfo startInfo = LineInfo.getLineInfo(lineInfo, 0);
- assertEquals(lineInfo[0], startInfo);
- assertEquals(0, startInfo.getStart());
-
- final LineInfo liInNL = LineInfo.getLineInfo(lineInfo, lineInfo[0].getEnd());
- assertEquals(lineInfo[0], liInNL);
-
- final int lastcharOffset = lineInfo[lineInfo.length - 1].getEnd() - 1;
- final LineInfo endInfo = LineInfo.getLineInfo(lineInfo, lastcharOffset);
- assertEquals(lineInfo[lineInfo.length - 1], endInfo);
-
- final int strOffset = fileContents.indexOf("a,b,c,d,e,f,g"); // this is on line 4, col 24
- final LineInfo strLineInfo = LineInfo.getLineInfo(lineInfo, strOffset);
- assertEquals(lineInfo[3], strLineInfo);
- assertTrue("in [start, end)", strLineInfo.getStart() <= strOffset && strOffset < strLineInfo.getEnd());
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestCompilationHelper.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestCompilationHelper.java
deleted file mode 100644
index 963a59b..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestCompilationHelper.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.compiler;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.core.parser.ast.JETASTVisitor;
-import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
-import org.eclipse.jet.core.parser.ast.JavaDeclaration;
-import org.eclipse.jet.core.parser.ast.JavaElement;
-import org.eclipse.jet.core.parser.ast.JavaExpression;
-import org.eclipse.jet.core.parser.ast.JavaScriptlet;
-import org.eclipse.jet.internal.compiler.CompilationHelper;
-import org.eclipse.jet.tests.FileUtils;
-import org.eclipse.jface.text.Position;
-
-/**
- * @author pelder
- *
- */
-public class TestCompilationHelper extends TestCase {
-
- private static final String TEST_PLUGIN_BASE_URL = "platform:/plugin/org.eclipse.jet.tests/data/";
- private static final String TEST_PROJECT_NAME = TestCompilationHelper.class.getName() + " Tests";
- protected static IProject project;
- private CompilationHelper helper;
-
- public static Test suite() {
- TestSetup setup = new TestSetup(new TestSuite(TestCompilationHelper.class)) {
- protected void setUp() throws Exception {
- setUpAllTests();
- }
-
- protected void tearDown() throws Exception {
- tearDownAllTests();
- }
- };
-
- return setup;
- }
-
- protected static void tearDownAllTests() {
- // TODO Auto-generated method stub
-
- }
-
- protected static void setUpAllTests() {
- String newProjectModel = "<newProjectModel>" +
- "<project" +
- " name=\"" + TEST_PROJECT_NAME + "\"" +
- "/>" +
- "</newProjectModel>";
-
- IStatus status = JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject", newProjectModel, new NullProgressMonitor());
- assertTrue("setUpAllTests", status.isOK());
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }}, new NullProgressMonitor());
- } catch (CoreException e) {
- fail(e.getMessage());
- }
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TEST_PROJECT_NAME);
- assertTrue("Test project exists", project.exists());
-
- }
-
- protected void setUp() throws Exception {
- helper = new CompilationHelper(project);
- }
-
- public void testGetAST() {
- JETCompilationUnit ast = helper.getAST("templates/main.jet");
-
- assertNotNull(ast);
- assertFalse(ast.hasErrors() && ast.hasWarnings());
- }
-
- public void testGetASTFromSource() throws MalformedURLException, IOException, CoreException {
- String source = FileUtils.getFileContents(TEST_PLUGIN_BASE_URL + "simplifiedCompiler/templates/simple.v2.input.jet", true);
- JETCompilationUnit ast = helper.getASTFromSource(source);
-
- assertNotNull(ast);
- assertFalse(ast.hasErrors() && ast.hasWarnings());
- }
-
- public void testJavaCode() throws MalformedURLException, IOException, CoreException {
- String source = FileUtils.getFileContents(TEST_PLUGIN_BASE_URL + "simplifiedCompiler/templates/simple.v2.input.jet", true);
- JETCompilationUnit ast = helper.getASTFromSource(source);
-
- assertNotNull(ast);
- ast.setOutputJavaClassName("_jet_simplev2input");
- assertFalse(ast.hasErrors() && ast.hasWarnings());
-
- String code = helper.getJavaCode(ast);
- String expectedCode = FileUtils.getFileContents(TEST_PLUGIN_BASE_URL + "simplifiedCompiler/templates/simple.v2.input.jet.expected.java", true);
- assertEquals(expectedCode, code);
- }
-
- public void testJavaCode_ast_map() throws MalformedURLException, IOException, CoreException {
- String source = FileUtils.getFileContents(TEST_PLUGIN_BASE_URL + "alljet2.jet", true);
- JETCompilationUnit ast = helper.getASTFromSource(source);
-
- assertNotNull(ast);
- assertFalse(ast.hasErrors() && ast.hasWarnings());
-
- final Map elementPositions = new HashMap();
- final String code = helper.getJavaCode(ast, elementPositions);
- String expectedCode = FileUtils.getFileContents(TEST_PLUGIN_BASE_URL + "alljet2.jet.expected.java", true);
- assertEquals(expectedCode, code);
-
- ast.accept(new JETASTVisitor() {
- public boolean visit(JavaDeclaration declaration) {
- checkJavaElement(declaration);
-
- return true;
- }
-
- public boolean visit(JavaExpression expression) {
- checkJavaElement(expression);
-
- return true;
- }
-
- public boolean visit(JavaScriptlet scriptlet) {
- checkJavaElement(scriptlet);
-
- return true;
- }
-
- /**
- * @param element
- */
- private void checkJavaElement(JavaElement element) {
- Position position = (Position) elementPositions.get(element);
-
- assertEquals(element.getJavaContent(), code.substring(position.offset, position.offset + position.length));
- }
- });
-
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJET2Parser.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJET2Parser.java
deleted file mode 100644
index f239946..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJET2Parser.java
+++ /dev/null
@@ -1,478 +0,0 @@
-package org.eclipse.jet.tests.compiler;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.compiler.Comment;
-import org.eclipse.jet.compiler.JET2ASTVisitor;
-import org.eclipse.jet.compiler.JET2CompilationUnit;
-import org.eclipse.jet.compiler.JET2Declaration;
-import org.eclipse.jet.compiler.JET2Directive;
-import org.eclipse.jet.compiler.JET2Expression;
-import org.eclipse.jet.compiler.JET2Scriptlet;
-import org.eclipse.jet.compiler.Problem;
-import org.eclipse.jet.compiler.TextElement;
-import org.eclipse.jet.compiler.XMLBodyElement;
-import org.eclipse.jet.compiler.XMLBodyElementEnd;
-import org.eclipse.jet.compiler.XMLEmptyElement;
-import org.eclipse.jet.core.compiler.JETCompilerOptions;
-import org.eclipse.jet.core.parser.IProblem;
-import org.eclipse.jet.core.parser.ProblemSeverity;
-import org.eclipse.jet.internal.compiler.TemplateRunner;
-import org.eclipse.jet.internal.core.NewLineUtil;
-import org.eclipse.jet.taglib.TagLibraryReference;
-import org.eclipse.jet.tests.FileUtils;
-
-public class TestJET2Parser extends TestCase {
-
- /**
- * @author pelder
- *
- */
- public static class DumpAST implements JET2ASTVisitor {
-
- private final StringBuffer buffer = new StringBuffer();
- private int indent = 0;
- private final String NL = System.getProperty("line.separator");
-
- private void doIndent() {
- for(int i = 0; i < indent; i++) {
- buffer.append(" ");
- }
- }
-
- public String getLog() {
- return NewLineUtil.setLineTerminator(buffer, NL);
- }
-
-
- /**
- *
- */
- public DumpAST() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2CompilationUnit)
- */
- public void visit(JET2CompilationUnit compilationUnit) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#endVisit(org.eclipse.jet.compiler.JET2CompilationUnit)
- */
- public void endVisit(JET2CompilationUnit compilationUnit) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Declaration)
- */
- public void visit(JET2Declaration declaration) {
- doIndent();
- buffer.append("<declaration line=\"" + declaration.getLine() + "\" col=\"" + declaration.getColumn() + "\">");
- buffer.append(declaration.getJavaContent());
- buffer.append("</declaration>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Directive)
- */
- public void visit(JET2Directive directive) {
- doIndent();
- buffer.append("<directive name=\"" + directive.getName() + "\" line=\"" + directive.getLine() + "\" col=\"" + directive.getColumn() + "\">").append(NL);
- indent++;
- for (Iterator i = directive.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">");
- buffer.append(entry.getValue()).append("</attribute>").append(NL);
-
- }
- indent--;
- doIndent();
- buffer.append("</directive>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Expression)
- */
- public void visit(JET2Expression expression) {
- doIndent();
- buffer.append("<expression line=\"" + expression.getLine() + "\" col=\"" + expression.getColumn() + "\">");
- buffer.append(expression.getJavaContent());
- buffer.append("</expression>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.JET2Scriptlet)
- */
- public void visit(JET2Scriptlet scriptlet) {
- doIndent();
- buffer.append("<scriptlet line=\"" + scriptlet.getLine() + "\" col=\"" + scriptlet.getColumn() + "\">");
- buffer.append(scriptlet.getJavaContent());
- buffer.append("</scriptlet>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.TextElement)
- */
- public void visit(TextElement text) {
- doIndent();
- buffer.append("<data>").append(text.getRawText()).append("</data>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.XMLEmptyElement)
- */
- public void visit(XMLEmptyElement xmlEmptyElement) {
- doIndent();
- buffer.append("<tag name=\"" + xmlEmptyElement.getName() + "\" line=\"" + xmlEmptyElement.getLine() + "\" col=\"" + xmlEmptyElement.getColumn() + "\">").append(NL);
- indent++;
- for (Iterator i = xmlEmptyElement.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL);
- }
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#visit(org.eclipse.jet.compiler.XMLBodyElement)
- */
- public void visit(XMLBodyElement xmlBodyElement) {
- doIndent();
- buffer.append("<tag name=\"" + xmlBodyElement.getName() + "\" line=\"" + xmlBodyElement.getLine() + "\" col=\"" + xmlBodyElement.getColumn() + "\">").append(NL);
- indent++;
- for (Iterator i = xmlBodyElement.getAttributes().entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL);
- }
- doIndent();
- buffer.append("<content>").append(NL);
- indent++;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jet.compiler.JET2ASTVisitor#endVisit(org.eclipse.jet.compiler.XMLBodyElement)
- */
- public void endVisit(XMLBodyElement xmlBodyElement) {
- indent--;
- doIndent();
- buffer.append("</content>").append(NL);
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL);
- }
-
- public void visit(Comment comment) {
- doIndent();
- buffer.append("<comment line=\"" + comment.getLine() + "\" col=\"" + comment.getColumn() + "\">");
- buffer.append(comment.getCommentText());
- buffer.append("</comment>").append(NL);
- }
-
- public void visit(XMLBodyElementEnd xmlBodyElementEnd) {
- // do nothing
-
- }
-
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- }
- private FileInputStream getFileContentsAsStream(String urlString) throws IOException, MalformedURLException, FileNotFoundException {
- String fileName = FileUtils.resolveURLToLocationString(urlString);
- FileInputStream inputStream = new FileInputStream(new File(fileName));
- return inputStream;
- }
-
- /*
- * Test method for 'org.eclipse.jet.compiler.JET2Parser.compile(String, InputStream, String)'
- */
- public void testCompile() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/taglibs.jet";
-
- InputStream is = getFileContentsAsStream(urlString);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- DumpAST astDumper = new DumpAST();
- cu.accept(astDumper);
-
- assertEquals(FileUtils.getFileContents(urlString + ".astdump.expected", true), astDumper.getLog());
-
- }
-
- public void testCompilationUnit_getTagLibraryReferences() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/taglibs.jet";
-
- InputStream is = getFileContentsAsStream(urlString);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- final TagLibraryReference[] tlRefs = cu.getTagLibraryReferences();
- assertNotNull(tlRefs);
- assertEquals(1, tlRefs.length);
- assertEquals("test", tlRefs[0].getPrefix());
- assertEquals("org.eclipse.jet.tests.TestLibrary", tlRefs[0].getTagLibraryId());
- }
-
- public void testCodeGen() throws Exception {
- // HACK: Disabling this test on Unix/Linux/Mac until uniform treatment of
- // line separators in generated code is handled.
- if(System.getProperty("line.separator").length() != 2) {
- return;
- }
-
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/taglibs.jet";
-
- InputStream is = getFileContentsAsStream(urlString);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- cu.setOutputJavaPackage(JETCompilerOptions.DEFAULT_COMPILED_TEMPLATE_PACKAGE);
- cu.setOutputJavaClassName("X");
-
- String result = new TemplateRunner().generate("templates/jet2java.jet", Collections.singletonMap("cu", cu));
-
- assertEquals(FileUtils.getFileContents(urlString + ".expected.java", true), result);
-
- }
-
- public void testXMLStartAsEmpty_bug147714() throws MalformedURLException, FileNotFoundException, IOException {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/bug147714.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 3, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 8, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.MissingXmlEndTag, problems[0].getId());
-
- assertEquals("Problem 2 line number", 8, problems[1].getLineNumber());
- assertEquals("Problem 2 severity", ProblemSeverity.ERROR, problems[1].getProblemSeverity());
- assertEquals("Problem 2 id", IProblem.TagCannotHaveContent, problems[1].getId());
-
- assertEquals("Problem 2 line number", 10, problems[2].getLineNumber());
- assertEquals("Problem 2 severity", ProblemSeverity.WARNING, problems[2].getProblemSeverity());
- assertEquals("Problem 2 id", IProblem.TagInterpretedAsEmptyTag, problems[2].getId());
-
-
- }
-
- public void testUnclosedCommnetErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedComment.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId());
-
- }
-
- public void testUnclosedDeclarationErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedDeclaration.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId());
-
- }
-
- public void testUnclosedDirectiveErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedDirective.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 1, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId());
-
- }
-
- public void testUnclosedExpressionErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedExpression.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId());
-
- }
-
- public void testUnclosedScriptletErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedScriplet.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId());
-
- }
-
- public void testUnclosedXMLEndErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedXMLEnd.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId());
-
- }
-
- public void testUnclosedXMLStartErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/unclosedXMLStart.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertEquals("Number of problems", 1, problems.length);
-
-
- // This assertions correspond to comments in bug147714.jet
- assertEquals("Problem 1 line number", 3, problems[0].getLineNumber());
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.UnterminatedXMLTag, problems[0].getId());
-
- }
-
- /**
- * @param cu
- * @return
- */
- private Problem[] getSortedProblems(JET2CompilationUnit cu) {
- List problems = new ArrayList(cu.getProblems());
- // problems are not guaranteed to be in line order (should they)
- Collections.sort(problems, new Comparator() {
-
- public int compare(Object arg0, Object arg1) {
- Problem p0 = (Problem) arg0;
- Problem p1 = (Problem) arg1;
- int lineCompare = p0.getLineNumber() - p1.getLineNumber();
- if(lineCompare == 0) {
- return p0.getColOffset() - p1.getColOffset();
- } else {
- return lineCompare;
- }
- }});
-
- Problem[] problem = (Problem[]) problems.toArray(new Problem[problems.size()]);
- return problem;
- }
-
- public void testAttributeParsingErrors() throws Exception {
- String url = "platform:/plugin/org.eclipse.jet.tests/data/attributeParsingErrors.jet";
-
- InputStream is = getFileContentsAsStream(url);
-
- JET2CompilationUnit cu = new JET2CompilationUnit();
- cu.parse(is, "UTF-8");
-
- Problem[] problems = getSortedProblems(cu);
-
- assertTrue("At least one problem", problems.length > 0);
-
- assertEquals("Problem 1 severity", ProblemSeverity.ERROR, problems[0].getProblemSeverity());
- assertEquals("Problem 1 id", IProblem.JETException, problems[0].getId());
- assertEquals("Problem 1 line number", 4, problems[0].getLineNumber());
-
-
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJETParser.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJETParser.java
deleted file mode 100644
index a680374..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestJETParser.java
+++ /dev/null
@@ -1,370 +0,0 @@
-package org.eclipse.jet.tests.compiler;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.parser.IProblem;
-import org.eclipse.jet.core.parser.ProblemSeverity;
-import org.eclipse.jet.internal.core.NewLineUtil;
-import org.eclipse.jet.internal.core.parser.jasper.CommentElementDelegate;
-import org.eclipse.jet.internal.core.parser.jasper.DeclarationElementDelegate;
-import org.eclipse.jet.internal.core.parser.jasper.JETCoreElement;
-import org.eclipse.jet.internal.core.parser.jasper.JETException;
-import org.eclipse.jet.internal.core.parser.jasper.JETMark;
-import org.eclipse.jet.internal.core.parser.jasper.JETParseEventListener2;
-import org.eclipse.jet.internal.core.parser.jasper.JETParser;
-import org.eclipse.jet.internal.core.parser.jasper.JETReader;
-import org.eclipse.jet.internal.core.parser.jasper.XMLElementDelegate;
-import org.eclipse.jet.tests.FileUtils;
-
-public class TestJETParser extends TestCase {
-
-
- private static class SavedProblem {
-
- private final ProblemSeverity severity;
- private final int problemId;
- private final String message;
- private final Object[] msgArgs;
- private final int start;
- private final int end;
- private final int line;
-
- public SavedProblem(ProblemSeverity severity, int problemId, String message, Object[] msgArgs, int start, int end, int line) {
- this.severity = severity;
- this.problemId = problemId;
- this.message = message;
- this.msgArgs = msgArgs;
- this.start = start;
- this.end = end;
- this.line = line;
- }
-
- /**
- * @return Returns the end.
- */
- public final int getEnd() {
- return end;
- }
-
- /**
- * @return Returns the line.
- */
- public final int getLine() {
- return line;
- }
-
- /**
- * @return Returns the message.
- */
- public final String getMessage() {
- return message;
- }
-
- /**
- * @return Returns the msgArgs.
- */
- public final Object[] getMsgArgs() {
- return msgArgs;
- }
-
- /**
- * @return Returns the problemId.
- */
- public final int getProblemId() {
- return problemId;
- }
-
- /**
- * @return Returns the severity.
- */
- public final ProblemSeverity getSeverity() {
- return severity;
- }
-
- /**
- * @return Returns the start.
- */
- public final int getStart() {
- return start;
- }
-
- }
-
- private static class AllJET2SyntaxListener implements JETParseEventListener2 {
-
- private final StringBuffer buffer = new StringBuffer();
- private int indent = 0;
- private final String NL = System.getProperty("line.separator");
- private final JETReader reader;
- private final List problems = new ArrayList();
-
-
- public AllJET2SyntaxListener(JETReader reader) {
- this.reader = reader;
- }
-
- public void beginPageProcessing() throws JETException {
- doIndent();
- buffer.append("<jet2>").append(NL);
- indent++;
- }
-
- private void doIndent() {
- for(int i = 0; i < indent; i++) {
- buffer.append(" ");
- }
- }
-
- public void endPageProcessing() throws JETException {
-// doIndent();
-// buffer.append("</jet2>").append(NL);
- }
-
- public String getLog() {
- return NewLineUtil.setLineTerminator(buffer, NL);
- }
-
- public void handleCharData(char[] chars) throws JETException {
- doIndent();
- buffer.append("<data>").append(chars).append("</data>").append(NL);
- }
-
- public void handleComment(JETMark start, JETMark stop) {
- doIndent();
- buffer.append("<comment start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">");
- buffer.append(reader.getChars(start,stop));
- buffer.append("</comment>").append(NL);
-
- }
-
- public void handleDeclaration(JETMark start, JETMark stop) {
- doIndent();
- buffer.append("<declaration start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">");
- buffer.append(reader.getChars(start,stop));
- buffer.append("</declaration>").append(NL);
-
- }
-
- public void handleDirective(String directive, JETMark start,
- JETMark stop, Map attributes) throws JETException {
- doIndent();
- buffer.append("<directive name=\"" + directive + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL);
- indent++;
- for (Iterator i = attributes.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">");
- buffer.append(entry.getValue()).append("</attribute>").append(NL);
-
- }
- indent--;
- doIndent();
- buffer.append("</directive>").append(NL);
- }
-
- public void handleExpression(JETMark start, JETMark stop, Map attributes)
- throws JETException {
- doIndent();
- buffer.append("<expression start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">");
- buffer.append(reader.getChars(start,stop));
- buffer.append("</expression>").append(NL);
- }
-
- public void handleScriptlet(JETMark start, JETMark stop, Map attributes)
- throws JETException {
- doIndent();
- buffer.append("<scriptlet start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">");
- buffer.append(reader.getChars(start,stop));
- buffer.append("</scriptlet>").append(NL);
- }
-
- public void handleXMLEmptyTag(String tagName, JETMark start, JETMark stop, Map attributeMap) {
- doIndent();
- buffer.append("<tag name=\"" + tagName + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL);
- indent++;
- for (Iterator i = attributeMap.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL);
- }
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL);
- }
-
- public void handleXMLEndTag(String tagName, JETMark start, JETMark stop) {
- indent--;
- doIndent();
- buffer.append("</content>").append(NL);
- indent--;
- doIndent();
- buffer.append("</tag>").append(NL);
- }
-
- public void handleXMLStartTag(String tagName, JETMark start, JETMark stop, Map attributeMap) {
- doIndent();
- buffer.append("<tag name=\"" + tagName + "\" start=\"" + start.toShortString() + "\" stop=\"" + stop.toShortString() + "\">").append(NL);
- indent++;
- for (Iterator i = attributeMap.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- doIndent();
- buffer.append("<attribute name=\"" + entry.getKey() + "\">" + entry.getValue() + "</attribute>").append(NL);
- }
- doIndent();
- buffer.append("<content>").append(NL);
- indent++;
- }
-
- public boolean isKnownTag(String tagName) {
- return tagName.startsWith("test:");
- }
-
- /**
- * @return Returns the problems.
- */
- public final List getProblems() {
- return problems;
- }
-
- public void recordProblem(ProblemSeverity severity, int problemId, String message, Object[] msgArgs, int start, int end, int line, int colOffset) {
- problems.add(new SavedProblem(severity, problemId, message, msgArgs, start, end, line));
-
- }
-
- public boolean isKnownInvalidTagName(String tagName) {
- // TODO Auto-generated method stub
- return false;
- }
- }
-
- private AllJET2SyntaxListener doJET2Parse(String urlString) throws IOException, MalformedURLException, FileNotFoundException, JETException {
- String fileName = FileUtils.resolveURLToLocationString(urlString);
-
- FileInputStream inputStream = new FileInputStream(new File(fileName));
- JETReader reader = new JETReader(urlString, inputStream, "UTF8");
- AllJET2SyntaxListener listener = new AllJET2SyntaxListener(reader);
- JETParser.Directive directive = new JETParser.Directive();
- directive.getDirectives().add("jet");
- directive.getDirectives().add("taglib");
-
- JETCoreElement[] coreElements = new JETCoreElement[] {
- directive,
- new JETParser.Expression(),
- new CommentElementDelegate(),
- new DeclarationElementDelegate(),
- new JETParser.Scriptlet(),
- new XMLElementDelegate(),
- };
- JETParser parser = new JETParser(reader, listener, coreElements);
-
- parser.parse();
- return listener;
- }
-
- private void doUnclosedElementTest(String urlString, String openChars, int expectedProblemId) throws IOException, MalformedURLException, FileNotFoundException, JETException {
- final AllJET2SyntaxListener listener = doJET2Parse(urlString);
- final List problems = listener.getProblems();
- assertEquals(1, problems.size());
- SavedProblem problem = (SavedProblem) problems.get(0);
- assertEquals(ProblemSeverity.ERROR, problem.getSeverity());
- assertEquals(expectedProblemId, problem.getProblemId());
- }
-
- public void testAllJET2Syntax() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/alljet2.jet";
- AllJET2SyntaxListener listener = doJET2Parse(urlString);
-
- assertEquals(FileUtils.getFileContents(urlString + ".expected", true), listener.getLog());
- }
-
- public void testUnclosedComment() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedComment.jet";
- String openChars = "<%--";
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
-
-
- }
-
- public void testUnclosedDeclaration() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedDeclaration.jet";
- String openChars = "<%!";
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testUnclosedDirective() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedDirective.jet";
- String openChars = "<%@";
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedExpression() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedExpression.jet";
- String openChars = "<%=";
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedScriptlet() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedScriplet.jet";
- String openChars = "<%";
-
- try {
- doUnclosedElementTest(urlString, openChars, 0);
- fail();
- } catch(JETException e) {
- // success.
- }
- }
-
- public void testUnclosedXMLStart() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedXMLStart.jet";
- String openChars = "<";
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testUnclosedXMLEnd() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/unclosedXMLEnd.jet";
- String openChars = "</";
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- public void testXMLEndWithAttributes() throws Exception {
- String urlString = "platform:/plugin/org.eclipse.jet.tests/data/xmlEndWithAttributes.jet";
- String openChars = "</";
-
- doUnclosedElementTest(urlString, openChars, IProblem.UnterminatedXMLTag);
- }
-
- // this error is not detected by the parser, but by post parse processing.
-// public void testXMLStartWithoutEnd() throws Exception {
-// String urlString = "platform:/plugin/org.eclipse.jet.tests/data/xmlStartWithoutEnd.jet";
-// String openChars = "<test:start>";
-//
-// doUnclosedElementTest(urlString, openChars, Problem.MissingXmlEndTag);
-// }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestSimplifiedCompiler.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestSimplifiedCompiler.java
deleted file mode 100644
index dca5dec..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TestSimplifiedCompiler.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.compiler;
-
-import java.io.Serializable;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.core.compiler.JETCompilerOptions;
-import org.eclipse.jet.core.parser.ITagLibraryResolver;
-import org.eclipse.jet.core.parser.ast.JETAST;
-import org.eclipse.jet.internal.compiler.SimplifiedCompiler;
-import org.eclipse.jet.internal.core.compiler.ICompilerOutput;
-import org.eclipse.jet.internal.core.compiler.IJETCompiler;
-import org.eclipse.jet.internal.core.compiler.IJETCompiler.CompileResult;
-import org.eclipse.jet.taglib.TagLibrary;
-import org.eclipse.jet.taglib.TagLibraryManager;
-import org.eclipse.jet.tests.FileUtils;
-
-/**
- * Test {@link SimplifiedCompiler}
- *
- */
-public class TestSimplifiedCompiler extends TestCase {
-
- private URI baseLocation;
- private URI changedBaseLocation;
- private CompilerOutput compilerOutput;
-
- private static final class CompilerOutput implements ICompilerOutput {
-
- private String code;
- private String encoding;
- private String outputFilePath;
- private String removeOutputFilePath;
-
- public String getCode() {
- return code;
- }
-
- public String getEncoding() {
- return encoding;
- }
-
- public void removeOutput(String outputFilePath) {
- removeOutputFilePath = outputFilePath;
- }
-
- public void writeOutput(String outputFilePath, String contents, String encoding) {
- this.outputFilePath = outputFilePath;
- this.code = contents;
- this.encoding = encoding;
-
- }
-
- public String getOutputFilePath() {
- return outputFilePath;
- }
-
- public String getRemoveOutputFilePath() {
- return removeOutputFilePath;
- }
-
- public void recordProblems(String templatePath, List problems) {
- // TODO Auto-generated method stub
-
- }
-
- public void preCompile(String templatePath) {
- // TODO Auto-generated method stub
-
- }
-
- }
-
- private static final class TagLibraryResolver implements ITagLibraryResolver {
-
- public TagLibrary getLibrary(String tagLibraryID) {
- return TagLibraryManager.getInstance().getTagLibrary(tagLibraryID);
- }
-
- }
- protected void setUp() throws Exception {
- super.setUp();
-
- baseLocation = new URI("platform:/plugin/org.eclipse.jet.tests/data/simplifiedCompiler/templates/");
- changedBaseLocation = new URI("platform:/plugin/org.eclipse.jet.tests/data/simplifiedCompiler/changedTemplates/");
- compilerOutput = new CompilerOutput();
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)}.
- * @throws Exception
- */
- public void testCompile() throws Exception {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .tagLibraryResolver(new TagLibraryResolver())
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.OK, result);
-
- final String expectedJavaCode = FileUtils.getFileContents(baseLocation.resolve(templatePath + ".expected.java").toString(), true);
-
- assertEquals(expectedJavaCode, compilerOutput.getCode());
- assertEquals("UTF-8", compilerOutput.getEncoding());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)} in the
- * case where a template path with unknown extension is passed.
- */
- public void testCompile_unknownExtension() {
- // default compiler knows only the JET extension
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "template.with.unknown.extension";
-
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.IGNORED, result);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)} in the
- * case where tag libraries are predefined.
- * @throws Exception
- */
- public void testCompile_predefinedTagLibraries() throws Exception {
- Map predefinedTagLibraries = new HashMap();
- predefinedTagLibraries.put("c", "org.eclipse.jet.controlTags");
- predefinedTagLibraries.put("f", "org.eclipse.jet.formatTags");
- // test a number of extensions, including those with leading/trailing blanks
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .predefinedTagLibraries(predefinedTagLibraries)
- .tagLibraryResolver(new TagLibraryResolver())
- .build();
-
- final String templatePath = "simple.v2.usePredefTagLibs.jet";
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.OK, result);
-
- final String expectedJavaCode = FileUtils.getFileContents(baseLocation.resolve(templatePath + ".predefs.expected.java").toString(), true);
-
- assertEquals(expectedJavaCode, compilerOutput.getCode());
- assertEquals("UTF-8", compilerOutput.getEncoding());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)} in the
- * case where no tag libraries are predefined.
- * @throws Exception
- */
- public void testCompile_noPredefinedTagLibraries() throws Exception {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "simple.v2.usePredefTagLibs.jet";
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.OK, result);
-
- final String expectedJavaCode = FileUtils.getFileContents(baseLocation.resolve(templatePath + ".nopredefs.expected.java").toString(), true);
-
- assertEquals(expectedJavaCode, compilerOutput.getCode());
- assertEquals("UTF-8", compilerOutput.getEncoding());
-
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)} in the
- * case more than one template extension is defined
- */
- public void testCompile_multipleExtensions() {
- Map options = new HashMap(JETCompilerOptions.getDefaultCompilerOptions());
- // test a number of extensions, including those with leading/trailing blanks
- options.put(JETCompilerOptions.OPTION_TEMPLATE_EXT, "pat, pat2 ,pat3,pat4");
- // default compiler knows only the JET extension
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .options(options)
- .build();
-
- Object cu;
- cu = compiler.compile("simple.v2.pat");
- assertNotNull("simple.v2.pat", cu);
- compiler.compile("simple.v2.pat2");
- assertNotNull("simple.v2.pat2", cu);
- compiler.compile("simple.v2.pat3");
- assertNotNull("simple.v2.pat3", cu);
- compiler.compile("simple.v2.pat4");
- assertNotNull("simple.v2.pat4", cu);
-
- }
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#finish()}.
- * @throws Exception
- */
- public void testFinish() throws Exception {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .templateLoaderFQN("org.eclipse.jet.compiled.TemplateLoaderClass")
- .build();
-
- final String templatePath1 = "simple.v2.input.jet";
- compiler.compile(templatePath1);
- final String templatePath2 = "simple.v2.input2.jet";
- compiler.compile(templatePath2);
-
- compiler.finish();
- assertEquals("org/eclipse/jet/compiled/TemplateLoaderClass.java", compilerOutput.getOutputFilePath());
- final String expectedJavaCode = FileUtils.getFileContents(baseLocation.resolve("simple.v2.loader.expected.java").toString(), true);
- assertEquals("code", expectedJavaCode, compilerOutput.getCode());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#compile(java.lang.String)} in the
- * case where an output class is changed in successive compiles of a template
- */
- public void testCompile_withOuputClassNameChange() {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(
- JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- compiler.compile(templatePath);
-
- final String outputFilePath = compilerOutput.getOutputFilePath();
-
- assertNull(compilerOutput.getRemoveOutputFilePath());
-
- Serializable memento = compiler.getMemento();
-
- compiler = new SimplifiedCompiler.Builder(
- JETAST.JET_SPEC_V2, changedBaseLocation, compilerOutput)
- .savedState(memento)
- .build();
- compiler.compile(templatePath);
-
- assertEquals(outputFilePath, compilerOutput.getRemoveOutputFilePath());
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#clean()}
- */
- public void testClean() {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .templateLoaderFQN("org.eclipse.jet.compiled.TemplateLoaderClass")
- .build();
-
- final String templatePath1 = "simple.v2.input.jet";
- compiler.compile(templatePath1);
- final String templatePath2 = "simple.v2.input2.jet";
- compiler.compile(templatePath2);
-
- compiler.finish();
-
- Serializable memento = compiler.getMemento();
-
- final Set removedFiles = new HashSet();
- IJETCompiler compiler2 = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation,
- new ICompilerOutput() {
-
- public void removeOutput(String outputFilePath) {
- removedFiles.add(outputFilePath);
- }
-
- public void writeOutput(String outputFilePath, String contents, String encoding) {
- // TODO Auto-generated method stub
-
- }
-
- public void recordProblems(String templatePath, List problems) {
- // TODO Auto-generated method stub
-
- }
-
- public void preCompile(String templatePath) {
- // TODO Auto-generated method stub
-
- }})
- .templateLoaderFQN("org.eclipse.jet.compiled.TemplateLoaderClass")
- .savedState(memento)
- .build();
-
- compiler2.clean();
-
- String expectedOutputPaths[] = new String[] {
- "org/eclipse/jet/compiled/_jet_simplev2input.java",
- "org/eclipse/jet/compiled/_jet_simplev2input2.java",
- "org/eclipse/jet/compiled/TemplateLoaderClass.java",
- };
-
- assertEquals(expectedOutputPaths.length, removedFiles.size());
- for (int i = 0; i < expectedOutputPaths.length; i++) {
- assertTrue("removedFiles contains " + expectedOutputPaths[i], removedFiles.contains(expectedOutputPaths[i]));
- }
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#remove()}
- */
- public void testRemove() {
- // this is essentially the testCompiler_withOutputNameChange test, but
- // we run remove instead of the second compile
- IJETCompiler compiler = new SimplifiedCompiler.Builder(
- JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- compiler.compile(templatePath);
-
- final String outputFilePath = compilerOutput.getOutputFilePath();
-
- assertNull(compilerOutput.getRemoveOutputFilePath());
-
- Serializable memento = compiler.getMemento();
-
- compiler = new SimplifiedCompiler.Builder(
- JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .savedState(memento)
- .build();
- compiler.removeTemplate(templatePath);
-
- assertEquals(outputFilePath, compilerOutput.getRemoveOutputFilePath());
-
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#getTagLibaryDependencies()}
- */
- public void testGetTagLibaryDependencies_none() {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "simple.v2.usePredefTagLibs.jet";
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.OK, result);
-
- final String[] dependencies = compiler.getTagLibaryDependencies();
- assertEquals(0, dependencies.length);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#getTagLibaryDependencies()}
- */
- public void testGetTagLibaryDependencies_one() {
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- final CompileResult result = compiler.compile(templatePath);
-
- assertEquals(CompileResult.OK, result);
-
- final String[] dependencies = compiler.getTagLibaryDependencies();
- assertEquals(1, dependencies.length);
- assertEquals("org.eclipse.jet.tests.TestLibrary", dependencies[0]);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#getTagLibaryDependencies()}
- */
- public void testGetTagLibaryDependencies_many() {
- Map predefinedTagLibraries = new HashMap();
- predefinedTagLibraries.put("c", "org.eclipse.jet.controlTags");
- predefinedTagLibraries.put("f", "org.eclipse.jet.formatTags");
- // test a number of extensions, including those with leading/trailing blanks
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .predefinedTagLibraries(predefinedTagLibraries)
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- final CompileResult result = compiler.compile(templatePath);
- assertEquals(CompileResult.OK, result);
-
- final String[] dependencies = compiler.getTagLibaryDependencies();
- final Set depSet = new HashSet(Arrays.asList(dependencies));
- assertEquals(3, depSet.size());
- assertTrue("org.eclipse.jet.controlTags", depSet.contains("org.eclipse.jet.controlTags"));
- assertTrue("org.eclipse.jet.formatTags", depSet.contains("org.eclipse.jet.formatTags"));
- assertTrue("org.eclipse.jet.tests.TestLibrary", depSet.contains("org.eclipse.jet.tests.TestLibrary"));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.compiler.SimplifiedCompiler#getTagLibaryDependencies()}
- */
- public void testGetTagLibaryDependencies_afterStateSave() {
- Map predefinedTagLibraries = new HashMap();
- predefinedTagLibraries.put("c", "org.eclipse.jet.controlTags");
- predefinedTagLibraries.put("f", "org.eclipse.jet.formatTags");
- // test a number of extensions, including those with leading/trailing blanks
- IJETCompiler compiler = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .predefinedTagLibraries(predefinedTagLibraries)
- .build();
-
- final String templatePath = "simple.v2.input.jet";
- final CompileResult result = compiler.compile(templatePath);
- assertEquals(CompileResult.OK, result);
-
- final Serializable memento = compiler.getMemento();
-
- IJETCompiler compiler2 = new SimplifiedCompiler.Builder(JETAST.JET_SPEC_V2, baseLocation, compilerOutput)
- .predefinedTagLibraries(predefinedTagLibraries)
- .savedState(memento)
- .build();
-
-
- final String[] dependencies = compiler2.getTagLibaryDependencies();
- final Set depSet = new HashSet(Arrays.asList(dependencies));
- assertEquals(3, depSet.size());
- assertTrue("org.eclipse.jet.controlTags", depSet.contains("org.eclipse.jet.controlTags"));
- assertTrue("org.eclipse.jet.formatTags", depSet.contains("org.eclipse.jet.formatTags"));
- assertTrue("org.eclipse.jet.tests.TestLibrary", depSet.contains("org.eclipse.jet.tests.TestLibrary"));
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TextTrimmingTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TextTrimmingTests.java
deleted file mode 100644
index f6e6b44..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/TextTrimmingTests.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package org.eclipse.jet.tests.compiler;
-
-import java.net.URI;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.jet.core.parser.DefaultTemplateResolver;
-import org.eclipse.jet.core.parser.ITagLibraryResolver;
-import org.eclipse.jet.core.parser.ast.JETAST;
-import org.eclipse.jet.core.parser.ast.JETASTParser;
-import org.eclipse.jet.core.parser.ast.JETASTVisitor;
-import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
-import org.eclipse.jet.core.parser.ast.TextElement;
-import org.eclipse.jet.internal.parser.LineInfo;
-import org.eclipse.jet.taglib.TagLibrary;
-import org.eclipse.jet.taglib.TagLibraryManager;
-
-public class TextTrimmingTests extends TestCase {
-
- private final static class TagLibraryResolver implements ITagLibraryResolver {
-
- public TagLibrary getLibrary(String tagLibraryID) {
- return TagLibraryManager.getInstance().getTagLibrary(tagLibraryID);
- }
-
- }
- private static JETCompilationUnit cu;
- /**
- * Wrap this suite in a TestSetup so that we can do one-time setup
- * @return a wrapped TestSetup wrapped suite.
- */
- public static Test suite() {
- TestSetup setup = new TestSetup(new TestSuite(TextTrimmingTests.class)) {
- protected void setUp() throws Exception {
- setUpAllTests();
- }
-
- protected void tearDown() throws Exception {
- tearDownAllTests();
- }
- };
-
- return setup;
- }
-
- private static void setUpAllTests() throws Exception {
- final URI baseLocation = new URI("platform:/plugin/org.eclipse.jet.tests/data/");
- final String templatePath = "textTrimmingTests.jet";
-
- cu = (JETCompilationUnit) new JETASTParser.Builder(JETAST.JET_SPEC_V2)
- .templateResolver(new DefaultTemplateResolver.Builder(baseLocation).build())
- .tagLibraryResolver(new TagLibraryResolver())
- .build()
- .parse(templatePath);
-
- assertFalse("Errors in test template", cu.hasErrors());
-
- }
-
- private static void tearDownAllTests() {
- // nothing to do
- }
-
-
- private String[] getLines(TextElement text, boolean strip) {
- char[] chars = strip ? text.getText() : text.getRawText();
- LineInfo[] lineInfos = LineInfo.calculateLines(chars);
- String[] lines = new String[lineInfos.length];
- for (int i = 0; i < lineInfos.length; i++) {
- lines[i] = new String(chars, lineInfos[i].getStart(), lineInfos[i].getEnd() - lineInfos[i].getStart()) + lineInfos[i].getDelimiter();
- }
- return lines;
- }
-
- private String[] getTextLinesInRange(JETCompilationUnit cu, final String testMarker, final boolean strip) {
- final StringBuffer linesBuffer = new StringBuffer();
- cu.accept(new JETASTVisitor() {
- private boolean rangeStarted = false;
- private boolean rangeEnded = false;
-
- public boolean visit(TextElement text) {
- if(rangeEnded) return true;
-
- String lines[] = getLines(text, strip);
- int i = 0;
- for (; i < lines.length && !rangeStarted; i++) {
- if(lines[i].startsWith(testMarker)) {
- rangeStarted = true;
- linesBuffer.append(lines[i]);
- }
- }
-
- for(; i < lines.length && rangeStarted && !rangeEnded; i++) {
- linesBuffer.append(lines[i]);
- if(lines[i].startsWith(testMarker)) {
- rangeEnded = true;
- }
- }
- return true;
- }
- });
- final LineInfo[] lineInfos = LineInfo.calculateLines(linesBuffer.toString().toCharArray());
- String[] lines = new String[lineInfos.length];
- for (int i = 0; i < lineInfos.length; i++) {
- lines[i] = linesBuffer.substring(lineInfos[i].getStart(), lineInfos[i].getEnd());
- }
- return lines;
- }
-
- public void testStartEndTagStripping() {
- final String TEST_CASE = "test 001";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(5, unstrippedText.length);
-
- assertEquals(3, strippedText.length);
- }
-
- public void testStartEndTagStripping2() {
- final String TEST_CASE = "test 002";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(5, unstrippedText.length);
-
- assertEquals(3, strippedText.length);
-
- }
-
- public void testStartEndTagStripping3() {
- final String TEST_CASE = "test 003";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(5, unstrippedText.length);
-
- assertEquals(3, strippedText.length);
-
- }
-
- public void testDirectiveStripping() {
- final String TEST_CASE = "test 004";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(2, strippedText.length);
-
- }
-
- public void testScriptletStripping() {
- final String TEST_CASE = "test 005";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(2, strippedText.length);
-
- }
-
- public void testDeclarationStripping() {
- final String TEST_CASE = "test 006";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(2, strippedText.length);
-
- }
-
- public void testEmptyTagStripping_supportsRemove() {
- final String TEST_CASE = "test 007";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(2, strippedText.length);
-
- }
-
-
- public void testEmptyTagStripping_noRemove() {
- final String TEST_CASE = "test 008";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(3, strippedText.length);
-
- }
-
- public void testCommentStripping() {
- final String TEST_CASE = "test 009";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(2, strippedText.length);
-
- }
-
- public void testExpressionStripping() {
- final String TEST_CASE = "test 010";
- String[] unstrippedText = getTextLinesInRange(cu, TEST_CASE, false);
- String[] strippedText = getTextLinesInRange(cu, TEST_CASE, true);
-
- assertEquals(3, unstrippedText.length);
-
- assertEquals(3, strippedText.length);
-
- }
-
-
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/AllTests.java
deleted file mode 100644
index 465fb9e..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/AllTests.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.jet.tests.model.load;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.model.load");
- //$JUnit-BEGIN$
- suite.addTestSuite(WorkspaceContextTests.class);
- suite.addTestSuite(TestXMLDocumentLoads.class);
- suite.addTestSuite(EmfModelLoaderTests.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/EmfModelLoaderTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/EmfModelLoaderTests.java
deleted file mode 100644
index 220e838..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/EmfModelLoaderTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.eclipse.jet.tests.model.load;
-
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xml.type.XMLTypeDocumentRoot;
-import org.eclipse.jet.internal.runtime.model.EMFModelLoader;
-import org.eclipse.jet.runtime.model.IModelLoader;
-
-public class EmfModelLoaderTests extends TestCase {
-
- private IModelLoader emfLoader;
- private URL baseURL;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- emfLoader = new EMFModelLoader();
- baseURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/");
- }
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.EMFModelLoader.load(URL)'
- */
- public void testLoad_generic_xml() throws Exception {
- final Object model = emfLoader.load(new URL(baseURL, "DOMInspector.xml"));
-
- assertNotNull("Loaded model is null", model);
-
- assertTrue("instanceof XmlDocumentRoot", model instanceof XMLTypeDocumentRoot);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.EMFModelLoader.load(URL)'
- */
- public void testLoad_xsd() throws Exception {
- final Object model = emfLoader.load(new URL(baseURL, "library.xml"));
-
- assertNotNull("Loaded model is null", model);
-
- assertTrue("instanceof EObject", model instanceof EObject);
- assertEquals("DocumentRoot", ((EObject)model).eClass().getName());
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.EMFModelLoader.load(URL)'
- */
- public void testLoad_ecore() throws Exception {
- final Object model = emfLoader.load(new URL(baseURL, "sample.dataaccess"));
-
- assertNotNull("Loaded model is null", model);
-
- assertTrue("instanceof Resource", model instanceof Resource);
- Resource resource = (Resource) model;
- EObject first = (EObject) resource.getContents().get(0);
- assertEquals("Employee", first.eClass().getName());
- }
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.EMFModelLoader.loadFromString(String)'
- */
- public void testLoadFromString() throws Exception {
- String document = "<root><a><b/><b/></a><a><c/></a></root>";
- final Object model = emfLoader.loadFromString(document, "xml");
-
- assertNotNull("Loaded model is null", model);
-
- assertTrue("instanceof XmlDocumentRoot", model instanceof XMLTypeDocumentRoot);
- }
-
- public void testLoad_URL_String() throws Exception {
- final Object model = emfLoader.load(new URL(baseURL, "library.xml.indisguise"), "xml");
-
- assertNotNull("Loaded model is null", model);
-
- assertTrue("instanceof EObject", model instanceof EObject);
- assertEquals("DocumentRoot", ((EObject)model).eClass().getName());
- }
-
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/TestXMLDocumentLoads.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/TestXMLDocumentLoads.java
deleted file mode 100644
index 52cf8b0..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/TestXMLDocumentLoads.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.jet.tests.model.load;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jet.internal.runtime.model.EMFXMLModelLoader;
-
-public class TestXMLDocumentLoads extends TestCase {
-
-
- private EMFXMLModelLoader loader;
-
- protected void setUp() throws Exception {
- // TODO Auto-generated method stub
- super.setUp();
-
- loader = new EMFXMLModelLoader();
- }
-
- /**
- * This test verifies the the XML Model loader does not put dynamically loaded
- * XSD packages in the the default package registry. This is especially important
- * for XSD schemas without a target namespace.
- * @throws IOException
- */
- public void testPlainXML() throws IOException {
- final int pkgRegSz = EPackage.Registry.INSTANCE.size();
-
- URL plainURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/plain.xml");
-
- final Object plainModel1 = loader.load(plainURL);
- assertNotNull(plainModel1);
-
- assertEquals(pkgRegSz, EPackage.Registry.INSTANCE.size());
-
- final Object plainModel2 = loader.load(plainURL);
- assertNotNull(plainModel2);
-
- assertEquals(pkgRegSz, EPackage.Registry.INSTANCE.size());
- }
-
- /**
- * This test verifies the the XML Model loader does not put dynamically loaded
- * XSD packages in the the default package registry. This is especially important
- * for XSD schemas without a target namespace.
- * @throws IOException
- */
- public void testXML_knownSchema_schemaLocation() throws IOException {
- final int pkgRegSz = EPackage.Registry.INSTANCE.size();
-
- URL newProjectURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/newproject.xml");
- final Object newProjectModel = loader.load(newProjectURL);
- assertNotNull(newProjectModel);
-
- assertEquals(pkgRegSz, EPackage.Registry.INSTANCE.size());
- }
-
- /**
- * This test verifies the the XML Model loader does not put dynamically loaded
- * XSD packages in the the default package registry. This is especially important
- * for XSD schemas without a target namespace.
- * @throws IOException
- */
- public void testXML_knownSchema_noNamespaceSchemaLocation() throws IOException {
- final int pkgRegSz = EPackage.Registry.INSTANCE.size();
-
- URL beanModelURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/beanModel.xml");
- final Object beanModel = loader.load(beanModelURL);
- assertNotNull(beanModel);
-
- assertEquals(pkgRegSz, EPackage.Registry.INSTANCE.size());
- }
-
- /**
- * This test verifies the the XML Model loader does not put dynamically loaded
- * XSD packages in the the default package registry. This is especially important
- * for XSD schemas without a target namespace.
- * @throws IOException
- */
- public void testXML_unknownSchema() throws IOException {
- final int pkgRegSz = EPackage.Registry.INSTANCE.size();
-
- URL newProjectURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/newproject.nolocation.xml");
- final Object newProjectModel = loader.load(newProjectURL);
- assertNotNull(newProjectModel);
-
- assertEquals(pkgRegSz, EPackage.Registry.INSTANCE.size());
- }
-
- /**
- * This test verifies the the XML Model loader does not put dynamically loaded
- * XSD packages in the the default package registry. This is especially important
- * for XSD schemas without a target namespace.
- * @throws MalformedURLException
- */
- public void testXML_missingSchema_noNamespace() throws MalformedURLException {
- try {
- URL beanModelURL = new URL("platform:/plugin/org.eclipse.jet.tests/data/beanModel.badlocation.xml");
- loader.load(beanModelURL);
- fail();
- } catch (MalformedURLException e) {
- throw e;
- } catch (IOException e) {
- // success
- }
- }
-
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/WorkspaceContextTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/WorkspaceContextTests.java
deleted file mode 100644
index a6b8471..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/model/load/WorkspaceContextTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.jet.tests.model.load;
-
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.runtime.model.WorkspaceLoadContext;
-import org.eclipse.jet.runtime.model.ILoadContext;
-
-public class WorkspaceContextTests extends TestCase {
-
- private ILoadContext definedContext;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- definedContext = new WorkspaceLoadContext();
- }
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.WorkspaceLoadContext.getName()'
- */
- public void testGetName() {
- final String name = definedContext.getName();
-
- assertEquals("workspace", name);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.runtime.model.WorkspaceLoadContext.getContextUrl()'
- */
- public void testGetContextUrl() {
- final URL contextUrl = definedContext.getContextUrl();
-
- assertEquals("platform:/resource/", contextUrl.toExternalForm());
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/AllTests.java
deleted file mode 100644
index 515e2c8..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/AllTests.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.jet.tests.parser.resources;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.parser.resources");
- //$JUnit-BEGIN$
- suite.addTest(ResourceTemplateInputTest.suite());
- suite.addTest(WorkspaceTemplateResolverBuilderTest.suite());
- suite.addTest(WorkspaceTemplateResolverHelperFactoryTest.suite());
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/ResourceTemplateInputTest.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/ResourceTemplateInputTest.java
deleted file mode 100644
index 6b84bd2..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/ResourceTemplateInputTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.parser.resources;
-
-import java.io.Reader;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.core.parser.ITemplateInput;
-import org.eclipse.jet.core.parser.TemplateInputException;
-import org.eclipse.jet.internal.parser.resources.ResourceTemplateInput;
-
-/**
- * @author pelder
- *
- */
-public class ResourceTemplateInputTest extends TestCase {
-
- protected static IProject project;
-
- public static Test suite() {
- TestSetup setup = new TestSetup(new TestSuite(ResourceTemplateInputTest.class)) {
- protected void setUp() throws Exception {
- setUpAllTests();
- }
-
- protected void tearDown() throws Exception {
- tearDownAllTests();
- }
- };
-
- return setup;
- }
-
- protected static void setUpAllTests() {
- String newProjectModel = "<newProjectModel>" +
- "<project" +
- " name=\"" + TEST_PROJECT_NAME + "\"" +
- "/>" +
- "</newProjectModel>";
-
- IStatus status = JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject", newProjectModel, new NullProgressMonitor());
- assertTrue("setUpAllTests", status.isOK());
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }}, new NullProgressMonitor());
- } catch (CoreException e) {
- fail(e.getMessage());
- }
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TEST_PROJECT_NAME);
- assertTrue("Test project exists", project.exists());
-
- }
-
- protected static void tearDownAllTests() {
- // TODO Auto-generated method stub
-
- }
-
- protected ITemplateInput templateInput;
- private static final String TEST_PROJECT_NAME = "org.eclipse.jet.tests.resources.ResourceTemplateInput Tests";
-
- protected void setUp() throws Exception {
- super.setUp();
-
- IFile templateFile = project.getFile("templates/main.jet");
- templateInput = new ResourceTemplateInput(templateFile);
- }
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.ResourceTemplateInput#ResourceTemplateInput(org.eclipse.core.resources.IFile)}.
- */
- public void testResourceTemplateInput() {
-
- assertNotNull(templateInput);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.ResourceTemplateInput#getBaseLocation()}.
- * @throws URISyntaxException
- */
- public void testGetBaseLocation() throws URISyntaxException {
- URI baseLocation = templateInput.getBaseLocation();
-
- assertEquals(new URI("platform", "/resource/" + TEST_PROJECT_NAME + "/", null), baseLocation);
-
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.ResourceTemplateInput#getReader()}.
- * @throws TemplateInputException
- */
- public void testGetReader() throws TemplateInputException {
- Reader reader = templateInput.getReader();
- assertNotNull(reader);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.ResourceTemplateInput#getTemplatePath()}.
- */
- public void testGetTemplatePath() {
- String templatePath = templateInput.getTemplatePath();
-
- assertEquals("templates/main.jet", templatePath);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.ResourceTemplateInput#getEncoding()}.
- * @throws TemplateInputException
- * @throws CoreException
- */
- public void testGetEncoding() throws TemplateInputException, CoreException {
- String encoding = templateInput.getEncoding();
- assertEquals(project.getFile(templateInput.getTemplatePath()).getCharset(), encoding);
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverBuilderTest.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverBuilderTest.java
deleted file mode 100644
index ac609f1..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverBuilderTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.parser.resources;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.core.parser.ITemplateResolver;
-import org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverBuilder;
-
-/**
- * @author pelder
- *
- */
-public class WorkspaceTemplateResolverBuilderTest extends TestCase {
-
- private static final String TEST_PROJECT_NAME = "org.eclipse.jet.tests.parser.Workspace Template Resover Builder Test";
- protected static IProject project;
-
- public static Test suite() {
- TestSetup setup = new TestSetup(new TestSuite(WorkspaceTemplateResolverBuilderTest.class)) {
- protected void setUp() throws Exception {
- setUpAllTests();
- }
-
- protected void tearDown() throws Exception {
- tearDownAllTests();
- }
- };
-
- return setup;
- }
-
- protected static void tearDownAllTests() {
- // TODO Auto-generated method stub
-
- }
-
- protected static void setUpAllTests() {
- String newProjectModel = "<newProjectModel>" +
- "<project" +
- " name=\"" + TEST_PROJECT_NAME + "\"" +
- "/>" +
- "</newProjectModel>";
-
- IStatus status = JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject", newProjectModel, new NullProgressMonitor());
- assertTrue("setUpAllTests", status.isOK());
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }}, new NullProgressMonitor());
- } catch (CoreException e) {
- fail(e.getMessage());
- }
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TEST_PROJECT_NAME);
- assertTrue("Test project exists", project.exists());
-
- }
-
- private WorkspaceTemplateResolverBuilder builder;
- protected void setUp() throws Exception {
- super.setUp();
-
- builder = new WorkspaceTemplateResolverBuilder(project);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverBuilder#WorkspaceTemplateResolverBuilder(org.eclipse.core.resources.IProject)}.
- * @throws URISyntaxException
- */
- public void testWorkspaceTemplateResolverBuilder() throws URISyntaxException {
- assertNotNull(builder);
- ITemplateResolver templateResolver = builder.build();
-
- URI[] baseLocations = templateResolver.getBaseLocations();
- assertEquals(1, baseLocations.length);
- assertEquals(new URI("platform", "/resource/" + TEST_PROJECT_NAME + "/", null), baseLocations[0]);
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverBuilder#addAltBaseLocations(java.net.URI[])}.
- * @throws URISyntaxException
- */
- public void testAddAltBaseLocations() throws URISyntaxException {
- builder.addAltBaseLocations(new URI[] {
- new URI("file", "/c:/usr/altLocation/", null), });
-
- ITemplateResolver templateResolver = builder.build();
-
- URI[] baseLocations = templateResolver.getBaseLocations();
- assertEquals(2, baseLocations.length);
- assertEquals(new URI("file", "/c:/usr/altLocation/", null), baseLocations[1]);
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverHelperFactoryTest.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverHelperFactoryTest.java
deleted file mode 100644
index 8ac4153..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/parser/resources/WorkspaceTemplateResolverHelperFactoryTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.parser.resources;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.core.parser.ITemplateResolverHelper;
-import org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverHelperFactory;
-
-/**
- * @author pelder
- *
- */
-public class WorkspaceTemplateResolverHelperFactoryTest extends TestCase {
-
- private static final String TEST_PROJECT_NAME = "org.eclipse.jet.tests.parser.Workspace Template Resover Helper Factory Test";
- protected static IProject project;
-
- public static Test suite() {
- TestSetup setup = new TestSetup(new TestSuite(WorkspaceTemplateResolverHelperFactoryTest.class)) {
- protected void setUp() throws Exception {
- setUpAllTests();
- }
-
- protected void tearDown() throws Exception {
- tearDownAllTests();
- }
- };
-
- return setup;
- }
-
- protected static void tearDownAllTests() {
- // TODO Auto-generated method stub
-
- }
-
- protected static void setUpAllTests() {
- String newProjectModel = "<newProjectModel>" +
- "<project" +
- " name=\"" + TEST_PROJECT_NAME + "\"" +
- "/>" +
- "</newProjectModel>";
-
- IStatus status = JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject", newProjectModel, new NullProgressMonitor());
- assertTrue("setUpAllTests", status.isOK());
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }}, new NullProgressMonitor());
- } catch (CoreException e) {
- fail(e.getMessage());
- }
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TEST_PROJECT_NAME);
- assertTrue("Test project exists", project.exists());
-
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverHelperFactory#getTemplateResolverHelper(java.net.URI)}.
- * @throws URISyntaxException
- */
- public void testGetTemplateResolverHelper_project_platformURI() throws URISyntaxException {
-
- URI baseLocation = new URI("platform", "/resource/" + project.getName() + "/", null);
- ITemplateResolverHelper templateResolverHelper = WorkspaceTemplateResolverHelperFactory.getInstance().getTemplateResolverHelper(baseLocation);
- String templatePath = "templates/main.jet";
- assertTrue("template Exists", templateResolverHelper.inputExists(templatePath));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverHelperFactory#getTemplateResolverHelper(java.net.URI)}.
- * @throws URISyntaxException
- */
- public void testGetTemplateResolverHelper_folder_platformURI() throws URISyntaxException {
-
- URI baseLocation = new URI("platform", "/resource/" + project.getName() + "/templates/", null);
- ITemplateResolverHelper templateResolverHelper = WorkspaceTemplateResolverHelperFactory.getInstance().getTemplateResolverHelper(baseLocation);
- String templatePath = "main.jet";
- assertTrue("template Exists", templateResolverHelper.inputExists(templatePath));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverHelperFactory#getTemplateResolverHelper(java.net.URI)}.
- * @throws URISyntaxException
- */
- public void testGetTemplateResolverHelper_project_fileURI() throws URISyntaxException {
-
- URI baseLocation = project.getLocationURI();
- ITemplateResolverHelper templateResolverHelper = WorkspaceTemplateResolverHelperFactory.getInstance().getTemplateResolverHelper(baseLocation);
- String templatePath = "templates/main.jet";
- assertTrue("template Exists", templateResolverHelper.inputExists(templatePath));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.parser.resources.WorkspaceTemplateResolverHelperFactory#getTemplateResolverHelper(java.net.URI)}.
- * @throws URISyntaxException
- */
- public void testGetTemplateResolverHelper_folder_fileURI() throws URISyntaxException {
-
- URI baseLocation = project.getFolder("templates").getLocationURI();
- ITemplateResolverHelper templateResolverHelper = WorkspaceTemplateResolverHelperFactory.getInstance().getTemplateResolverHelper(baseLocation);
- String templatePath = "main.jet";
- assertTrue("template Exists", templateResolverHelper.inputExists(templatePath));
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/AllTests.java
deleted file mode 100644
index 1b5c8a9..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/AllTests.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.jet.tests.runtime;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.runtime");
- //$JUnit-BEGIN$
- suite.addTestSuite(TestBundleLoading.class);
- suite.addTestSuite(TestBundleJarUtil.class);
- suite.addTestSuite(TestBundleDescriptions.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleDescriptions.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleDescriptions.java
deleted file mode 100644
index 67d2751..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleDescriptions.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.jet.tests.runtime;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.taglib.TagLibraryReference;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-
-public class TestBundleDescriptions extends TestCase {
-
- public void testGetProjectDescription()
- {
- final IStatus result = JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject",
- "<newProjectModel><project name=\"foo.bar\"/></newProjectModel>",
- new NullProgressMonitor());
-
- assertTrue(result.isOK());
-
- final IJETBundleDescriptor desc = JET2Platform.getProjectDescription("foo.bar");
- assertNotNull(desc);
- assertEquals("foo.bar", desc.getId());
- assertEquals("foo.bar", desc.getName());
- final TagLibraryReference[] tlRefs = desc.getTagLibraryReferences();
- assertNotNull(tlRefs);
- assertEquals(4, tlRefs.length);
- assertEquals("c", tlRefs[0].getPrefix());
- assertEquals("java", tlRefs[1].getPrefix());
- assertEquals("f", tlRefs[2].getPrefix());
- assertEquals("ws", tlRefs[3].getPrefix());
- assertEquals("org.eclipse.jet.controlTags", tlRefs[0].getTagLibraryId());
- assertEquals("org.eclipse.jet.javaTags", tlRefs[1].getTagLibraryId());
- assertEquals("org.eclipse.jet.formatTags", tlRefs[2].getTagLibraryId());
- assertEquals("org.eclipse.jet.workspaceTags", tlRefs[3].getTagLibraryId());
- assertTrue(tlRefs[0].isAutoImport());
- assertTrue(tlRefs[1].isAutoImport());
- assertTrue(tlRefs[2].isAutoImport());
- assertFalse(tlRefs[3].isAutoImport());
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleJarUtil.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleJarUtil.java
deleted file mode 100644
index 0eaf172..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleJarUtil.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.jet.tests.runtime;
-
-import org.eclipse.jet.internal.runtime.BundleJarInfo;
-
-import junit.framework.TestCase;
-
-public class TestBundleJarUtil extends TestCase {
-
- private BundleJarInfo complexBJU;
- private BundleJarInfo simpleBJU;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- complexBJU = BundleJarInfo.createBundleJarInfo("a.b.c_1.2.3.x_yz_4.5.6.a_b_c.jar");
- simpleBJU = BundleJarInfo.createBundleJarInfo("a.b.c_1.2.3.jar");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetBundleSymbolicName_complex() {
- assertEquals("a.b.c_1.2.3.x_yz", complexBJU.getBundleSymbolicName());
- }
-
- public void testGetVersion_complex() {
- assertEquals("4.5.6.a_b_c", complexBJU.getVersion());
- }
-
- public void testGetJarName_complex() {
- assertEquals("a.b.c_1.2.3.x_yz_4.5.6.a_b_c.jar", complexBJU.getJarName());
- }
-
- public void testGetBundleSymbolicName_simple() {
- assertEquals("a.b.c", simpleBJU.getBundleSymbolicName());
- }
-
- public void testGetVersion_simple() {
- assertEquals("1.2.3", simpleBJU.getVersion());
- }
-
- public void testGetJarName_simple() {
- assertEquals("a.b.c_1.2.3.jar", simpleBJU.getJarName());
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleLoading.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleLoading.java
deleted file mode 100644
index c333464..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestBundleLoading.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.jet.tests.runtime;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2TemplateLoader;
-import org.eclipse.jet.taglib.TagLibraryReference;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-import org.eclipse.jet.transform.IJETBundleManager;
-import org.eclipse.jet.transform.IJETRunnable;
-
-public class TestBundleLoading extends TestCase {
-
- public void testLoadSimpleBundle() throws Exception {
- final IJETBundleManager bundleManager = JET2Platform.getJETBundleManager();
- final boolean[] executed = new boolean[1];
- executed[0] = false;
- bundleManager.run("org.eclipse.jet.transforms.newproject", new IJETRunnable() {
-
- public void run(IJETBundleDescriptor descriptor, JET2TemplateLoader templateLoader, IProgressMonitor monitor) {
- executed[0] = true;
- final JET2Template template = templateLoader.getTemplate(descriptor.getMainTemplate());
- assertNotNull(template);
-
- }}, new NullProgressMonitor());
-
- assertTrue("executed", executed[0]);
- }
-
- public void testGetBundles() throws Exception {
- String projectName = getClass().getName() + ".testGetBundles";
- String source = "<newProjectModel><project name=\"" + projectName
- + "\"/></newProjectModel>";
- JET2Platform.runTransformOnString("org.eclipse.jet.transforms.newproject", source,
- new NullProgressMonitor());
-
- IJETBundleManager mgr = JET2Platform.getJETBundleManager();
-
- final IJETBundleDescriptor[] all = mgr.getAllJETBundleDescriptors();
- assertNotNull(all);
- assertTrue(all.length > 0);
-
- IJETBundleDescriptor myDescriptor = null;
- for (int i = 0; i < all.length; i++) {
- if (all[i].getId().equals(projectName)) {
- myDescriptor = all[i];
- break;
- }
- }
- assertNotNull(myDescriptor);
- assertEquals(projectName, myDescriptor.getId());
- }
-
- public void testGetDescriptionForProject() {
- String projectName = getClass().getName() + ".getDescriptionForProject";
- String source = "<newProjectModel><project name=\"" + projectName
- + "\"/></newProjectModel>";
- JET2Platform.runTransformOnString(
- "org.eclipse.jet.transforms.newproject", source,
- new NullProgressMonitor());
- IJETBundleManager mgr = JET2Platform.getJETBundleManager();
- final IJETBundleDescriptor descriptor = mgr
- .getDescriptorForProject(projectName);
- assertNotNull(descriptor);
- final TagLibraryReference[] tlrefs = descriptor
- .getTagLibraryReferences();
- assertEquals(4, tlrefs.length);
- assertEquals("c", tlrefs[0].getPrefix());
- assertEquals("java", tlrefs[1].getPrefix());
- assertEquals("f", tlrefs[2].getPrefix());
- assertEquals("ws", tlrefs[3].getPrefix());
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestDirectoryBundleProvider.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestDirectoryBundleProvider.java
deleted file mode 100644
index d532460..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/runtime/TestDirectoryBundleProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests.runtime;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.runtime.DirectoryBundleProvider;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-
-/**
- * @author pelder
- *
- */
-public class TestDirectoryBundleProvider extends TestCase {
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetAllJETBundleIds() throws Exception {
- // FIXME: Tests are specific to one development environment/machine
- DirectoryBundleProvider dbp = new DirectoryBundleProvider("c:/temp/plugins");
-
- final Set ids = dbp.getAllJETBundleIds();
-
-// assertEquals(1, ids.size());
- assertTrue("contains gp02.generator.pattern", ids.contains("gp02.generator.pattern"));
- assertFalse("does not contain org.eclipse.jet.doc", ids.contains("org.eclipse.jet.doc"));
- }
-
- public void testGetDescriptor() throws Exception {
- // FIXME: Tests are specific to one development environment/machine
- DirectoryBundleProvider dbp = new DirectoryBundleProvider("c:/temp/plugins");
-
- final IJETBundleDescriptor descriptor = dbp.getDescriptor("gp02.generator.pattern");
- assertNotNull("Descriptor", descriptor);
- assertEquals("gp02.generator.pattern", descriptor.getId());
- }
-
- public void testGetAllJETBundleDescriptors() throws Exception {
- // FIXME: Tests are specific to one development environment/machine
- DirectoryBundleProvider dbp = new DirectoryBundleProvider("c:/temp/plugins");
-
- final Collection col = dbp.getAllJETBundleDescriptors();
-
- for (Iterator i = col.iterator(); i.hasNext();) {
- IJETBundleDescriptor descriptor = (IJETBundleDescriptor) i.next();
- if(descriptor.getId().equals("gp02.generator.pattern")) {
- return;
- }
- }
- fail("gp02.generator.pattern not found");
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/AllTests.java
deleted file mode 100644
index 21f8f54..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.taglib;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jet.tests.taglib");
- //$JUnit-BEGIN$
- suite.addTestSuite(TagLibraryDataFactoryTests.class);
- suite.addTestSuite(TestTagLibManager.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TagLibraryDataFactoryTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TagLibraryDataFactoryTests.java
deleted file mode 100644
index 3fe82d9..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TagLibraryDataFactoryTests.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.jet.tests.taglib;
-
-import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.InvalidRegistryObjectException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jet.internal.JETActivatorWrapper;
-import org.eclipse.jet.internal.extensionpoints.TagLibraryDataFactory;
-import org.eclipse.jet.taglib.TagAttributeDefinition;
-import org.eclipse.jet.taglib.TagDefinition;
-import org.eclipse.jet.taglib.TagLibrary;
-
-public class TagLibraryDataFactoryTests extends TestCase {
-
- /*
- * Test method for 'org.eclipse.jet.internal.extensionpoints.TagLibraryDataFactory.createTagLibrary(String, IConfigurationElement)'
- */
- public void testCreateTagLibraryStringIConfigurationElement() {
-
- final TagLibrary tagLibrary = getControlTagLibrary();
-
- assertNotNull("TagLibrary instance", tagLibrary);
- assertEquals("c", tagLibrary.getDefaultPrefix());
- assertEquals("org.eclipse.jet.controlTags", tagLibrary.getLibraryId());
- assertTrue("<c:get> found", tagLibrary.hasTag("get"));
- }
-
- /**
- * @return
- * @throws InvalidRegistryObjectException
- */
- private TagLibrary getControlTagLibrary() throws InvalidRegistryObjectException {
- IConfigurationElement element = null;
- final IExtension[] extensions = Platform.getExtensionRegistry().getExtensions("org.eclipse.jet");
- for (int i = 0; i < extensions.length; i++) {
- if("org.eclipse.jet.tagLibraries".equals(extensions[i].getExtensionPointUniqueIdentifier())) {
- element = extensions[i].getConfigurationElements()[0]; // the first tag library
- }
- }
- assertNotNull("Setup failure", element);
- final TagLibrary tagLibrary = TagLibraryDataFactory.INSTANCE.createTagLibrary("org.eclipse.jet", element);
- return tagLibrary;
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.extensionpoints.TagLibraryDataFactory.createTagLibraries(String, Object)'
- */
- public void testCreateTagLibraries() throws Exception {
- final TagLibrary tagLibrary = getControlTagLibrary();
-
- URL pluginURL = new URL("platform:/plugin/org.eclipse.jet/plugin.xml");
- Object pluginDocRoot = JETActivatorWrapper.INSTANCE.getLoaderManager().getLoader(pluginURL.toExternalForm(), null, null).load(pluginURL);
- assertNotNull("setup failure: doc root is null", pluginDocRoot);
-
- final TagLibrary[] libraries = TagLibraryDataFactory.INSTANCE.createTagLibraries("org.eclipse.jet", pluginDocRoot);
- assertNotNull("libraries not null", libraries);
- assertTrue("libraries.length > 0", libraries.length > 0);
-
- assertEquals(tagLibrary.getDefaultPrefix(), libraries[0].getDefaultPrefix());
- assertEquals(tagLibrary.getLibraryId(), libraries[0].getLibraryId());
- assertEquals(tagLibrary.getLibraryName(), libraries[0].getLibraryName());
- final String[] tagNames = tagLibrary.getTagNames();
- assertEquals(tagNames.length, libraries[0].getTagNames().length);
-
- for (int i = 0; i < tagNames.length; i++) {
- TagDefinition xtd = tagLibrary.getTagDefinition(tagNames[i]);
- TagDefinition ptd = libraries[0].getTagDefinition(tagNames[i]);
- assertNotNull(tagNames[i] + ": xtd", xtd);
- assertNotNull(tagNames[i] + ": ptd", ptd);
- assertEquals(tagNames[i], xtd.isContentAllowed(), ptd.isContentAllowed());
- assertEquals(tagNames[i], xtd.isDeprecated(), ptd.isDeprecated());
- assertEquals(tagNames[i], xtd.isEmptyTagAllowed(), ptd.isEmptyTagAllowed());
- assertEquals(tagNames[i], xtd.removeWhenContainingLineIsEmpty(), ptd.removeWhenContainingLineIsEmpty());
- assertEquals(tagNames[i], xtd.requiresNewWriter(), ptd.requiresNewWriter());
- assertEquals(tagNames[i], xtd.getDescription(), ptd.getDescription());
- assertEquals(tagNames[i], xtd.getKind(), ptd.getKind());
- assertEquals(tagNames[i], xtd.getName(), ptd.getName());
-
- final List xtdAttrs = xtd.getAttributeDefinitions();
- final List ptdAttrs = ptd.getAttributeDefinitions();
- assertNotNull(tagNames[i] + ": xtdAttrs", xtdAttrs);
- assertNotNull(tagNames[i] + ": ptdAttrs", ptdAttrs);
- assertEquals(xtdAttrs.size(), ptdAttrs.size());
-
- for (Iterator j = xtdAttrs.iterator(), k = ptdAttrs.iterator(); j.hasNext();) {
- TagAttributeDefinition xtad = (TagAttributeDefinition) j.next();
- TagAttributeDefinition ptad = (TagAttributeDefinition) k.next();
- final String attrName = xtad.getName();
- assertEquals(tagNames[i], attrName, ptad.getName());
- assertEquals(tagNames[i] + ":" + attrName, xtad.getDescription(), ptad.getDescription());
- assertEquals(tagNames[i] + ":" + attrName, xtad.isDeprecated(), ptad.isDeprecated());
- assertEquals(tagNames[i] + ":" + attrName, xtad.isRequired(), ptad.isRequired());
- assertEquals(tagNames[i] + ":" + attrName, xtad.getType(), ptad.getType());
- }
- }
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TestTagLibManager.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TestTagLibManager.java
deleted file mode 100644
index b118c60..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/TestTagLibManager.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.jet.tests.taglib;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.internal.taglib.InternalTagLibManager;
-import org.eclipse.jet.taglib.TagLibrary;
-
-public class TestTagLibManager extends TestCase {
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.InternalTagLibManager.getTagLibrary(String)'
- */
- public void testGetTagLibrary() {
- InternalTagLibManager manager = new InternalTagLibManager();
- manager.startup();
- try {
- String libraryId = "org.eclipse.jet.tests.TestLibrary";
- TagLibrary tagLibrary = manager.getTagLibrary(libraryId);
- assertNotNull(tagLibrary);
- assertEquals(libraryId, tagLibrary.getLibraryId());
- } finally {
- manager.shutdown();
- }
- }
-
- public void testGetTagLibrary_invalidId() {
- InternalTagLibManager manager = new InternalTagLibManager();
- manager.startup();
- try {
- String libraryId = "org.eclipse.jet.tests.TestLibrary-invalid";
- TagLibrary tagLibrary = manager.getTagLibrary(libraryId);
- assertNull(tagLibrary);
- } finally {
- manager.shutdown();
- }
- }
-
- public void testTagLibrary_getTagsNames() {
- InternalTagLibManager manager = new InternalTagLibManager();
- manager.startup();
- try {
- String libraryId = "org.eclipse.jet.tests.TestLibrary";
- String[] expectedTagNames = new String[] {
- "isAllUpper", "nl", "other", "tokenize", "upper",
- };
- TagLibrary tagLibrary = manager.getTagLibrary(libraryId);
- assertNotNull(tagLibrary);
- String[] tagNames = tagLibrary.getTagNames();
- assertEquals(5, tagNames.length);
- for (int i = 0; i < tagNames.length; i++) {
- assertEquals(expectedTagNames[i], tagNames[i]);
- }
- } finally {
- manager.shutdown();
- }
-
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/AllTests.java
deleted file mode 100644
index f426e2c..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.taglib.control;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.taglib.control");
- //$JUnit-BEGIN$
- suite.addTestSuite(LoadTagTests.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/LoadTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/LoadTagTests.java
deleted file mode 100644
index fe941f8..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/control/LoadTagTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.jet.tests.taglib.control;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.BufferedJET2Writer;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.XPathContextExtender;
-import org.eclipse.jet.internal.taglib.control.LoadTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-import org.eclipse.jet.transform.TransformContextExtender;
-
-public class LoadTagTests extends TestCase {
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.control.LoadTag.doAction(TagInfo, JET2Context, JET2Writer)'
- */
- public void testDoAction() throws JET2TagException, CoreException {
-
- final String id = "org.eclipse.jet.transforms.newproject";
- JET2Context context = new JET2Context((Object)null);
- TransformContextExtender tce = new TransformContextExtender(context);
-
- final IJETBundleDescriptor descriptor = JET2Platform.getJETBundleManager().getDescriptor(id);
- tce.setBundleDescriptor(descriptor);
-
- LoadTag tag = new LoadTag();
- TagInfo td = new TagInfo("", 1, 1,
- new String[] { "url", "var", "type" },
- new String[] { "templates/project/sample.xml.jet", "root", "xml" });
- tag.setTagInfo(td);
- tag.setContext(context);
- tag.setParent(null);
-
- BufferedJET2Writer out = new BodyContentWriter();
-
- tag.doAction(td, context, out);
-
- assertEquals("", out.getContent());
- final Object loadedDocument = XPathContextExtender.getInstance(context).resolveVariable("root");
- assertNotNull("loaded document", loadedDocument);
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java
deleted file mode 100644
index 055c1af..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.taglib.format");
- //$JUnit-BEGIN$
- suite.addTestSuite(UuidTagTests.class);
- suite.addTestSuite(LowerCaseTagTests.class);
- suite.addTestSuite(FormatNowTagTests.class);
- suite.addTestSuite(UpperCaseTagTests.class);
- suite.addTestSuite(FormatContextExtenderTests.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java
deleted file mode 100644
index cb3ce9c..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.internal.taglib.format.FormatContextExtender;
-
-import junit.framework.TestCase;
-
-public class FormatContextExtenderTests extends TestCase {
-
- private FormatContextExtender fce;
-
- protected void setUp() throws Exception {
- super.setUp();
- fce = FormatContextExtender.getInstance(new JET2Context(null));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.FormatContextExtender.getMilliseconds()'
- */
- public void testGetMilliseconds() {
- final long ms1 = fce.getMilliseconds();
- assertTrue("positive", ms1 > 0);
- final long ms2 = fce.getMilliseconds();
- assertTrue(ms2 > ms1);
-
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.FormatContextExtender.getUnique()'
- */
- public void testGetUnique() {
- final int unique1 = fce.getUnique();
- assertEquals(1, unique1);
- final int unique2 = fce.getUnique();
- assertEquals(unique1 + 1, unique2);
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java
deleted file mode 100644
index 1bee89d..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import java.util.Calendar;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.BufferedJET2Writer;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.internal.taglib.format.FormatNowTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class FormatNowTagTests extends TestCase {
-
- private BufferedJET2Writer out;
- private FormatNowTag tag;
- private TagInfo tagInfo;
- private JET2Context context;
-
- protected void setUp() throws Exception {
- super.setUp();
- this.out = new BodyContentWriter();
- this.tag = new FormatNowTag();
- context = new JET2Context(null);
- tag.setContext(context);
- tag.setOut(out);
- tag.setParent(null);
- tagInfo = new TagInfo("f:formatNow", 1, 1,
- new String[] {
- "pattern"
- },
- new String[] {
- "yyyy.MM.dd.HH.mm"
- });
- tag.setTagInfo(tagInfo);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.FormatNowTag.doAction(TagInfo, JET2Context, JET2Writer)'
- */
- public void testDoAction() throws JET2TagException {
- final Calendar now = Calendar.getInstance();
- tag.doAction(tagInfo, context, out);
-
- String formatted = out.getContent();
- final String[] parts = formatted.split("\\.");
- assertNotNull(parts);
- assertEquals(5, parts.length);
- assertEquals(now.get(Calendar.YEAR), Integer.parseInt(parts[0]));
- assertEquals(now.get(Calendar.MONTH) + 1, Integer.parseInt(parts[1]));
- assertEquals(now.get(Calendar.DAY_OF_MONTH), Integer.parseInt(parts[2]));
- assertEquals(now.get(Calendar.HOUR_OF_DAY), Integer.parseInt(parts[3]));
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/LowerCaseTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/LowerCaseTagTests.java
deleted file mode 100644
index 24226fc..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/LowerCaseTagTests.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import java.text.MessageFormat;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.internal.l10n.JET2Messages;
-import org.eclipse.jet.internal.taglib.format.LowerCaseTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class LowerCaseTagTests extends TestCase {
-
- private BodyContentWriter out;
- private LowerCaseTag lowerCaseTag;
- private JET2Context context;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- out = new BodyContentWriter();
- lowerCaseTag = new LowerCaseTag();
- lowerCaseTag.setParent(null);
- lowerCaseTag.setOut(out);
- context = new JET2Context(null);
- lowerCaseTag.setContext(context);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_noAttrs() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {}, new String[] {});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("test", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset"}, new String[] {"1"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("Test", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset"}, new String[] {"5"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("TEST", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_negativeOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset"}, new String[] {"-1"});
- lowerCaseTag.setTagInfo(tagInfo);
-
-
- try {
- lowerCaseTag.doFunction(tagInfo, context, "TEST");
- fail("Excepted JET2TagException");
- } catch (JET2TagException e) {
- String expected = MessageFormat.format(JET2Messages.AnyTag_AttributeMustBeInteger, new Object[] {"offset"});
- assertEquals(expected, e.getMessage());
- }
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_negativeLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"length"}, new String[] {"-1"});
- lowerCaseTag.setTagInfo(tagInfo);
-
-
- try {
- lowerCaseTag.doFunction(tagInfo, context, "TEST");
- fail("Excepted JET2TagException");
- } catch (JET2TagException e) {
- String expected = MessageFormat.format(JET2Messages.AnyTag_AttributeMustBeInteger, new Object[] {"length"});
- assertEquals(expected, e.getMessage());
- }
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_zeroOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset"}, new String[] {"0"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("test", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"length"}, new String[] {"2"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("teST", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"length"}, new String[] {"5"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("test", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_zeroLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"length"}, new String[] {"0"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("TEST", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset", "length"}, new String[] {"1", "2"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("TesT", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength_rearBoundary() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset", "length"}, new String[] {"3", "1"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("TESt", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength_frontBoundary() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset", "length"}, new String[] {"0", "1"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("tEST", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset", "length"}, new String[] {"1", "4"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("Test", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigOffset_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:lc", 1, 1, new String[] {"offset", "length"}, new String[] {"4", "4"});
- lowerCaseTag.setTagInfo(tagInfo);
-
- final String result = lowerCaseTag.doFunction(tagInfo, context, "TEST");
-
- assertEquals("TEST", result);
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UpperCaseTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UpperCaseTagTests.java
deleted file mode 100644
index f34c34c..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UpperCaseTagTests.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import java.text.MessageFormat;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.internal.l10n.JET2Messages;
-import org.eclipse.jet.internal.taglib.format.UpperCaseTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class UpperCaseTagTests extends TestCase {
-
- private BodyContentWriter out;
- private UpperCaseTag upperCaseTag;
- private JET2Context context;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- out = new BodyContentWriter();
- upperCaseTag = new UpperCaseTag();
- upperCaseTag.setParent(null);
- upperCaseTag.setOut(out);
- context = new JET2Context(null);
- upperCaseTag.setContext(context);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_noAttrs() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {}, new String[] {});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("DATA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset"}, new String[] {"1"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("dATA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset"}, new String[] {"5"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("data", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_negativeOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset"}, new String[] {"-1"});
- upperCaseTag.setTagInfo(tagInfo);
-
-
- try {
- upperCaseTag.doFunction(tagInfo, context, "data");
- fail("Excepted JET2TagException");
- } catch (JET2TagException e) {
- String expected = MessageFormat.format(JET2Messages.AnyTag_AttributeMustBeInteger, new Object[] {"offset"});
- assertEquals(expected, e.getMessage());
- }
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_negativeLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"length"}, new String[] {"-1"});
- upperCaseTag.setTagInfo(tagInfo);
-
-
- try {
- upperCaseTag.doFunction(tagInfo, context, "data");
- fail("Excepted JET2TagException");
- } catch (JET2TagException e) {
- String expected = MessageFormat.format(JET2Messages.AnyTag_AttributeMustBeInteger, new Object[] {"length"});
- assertEquals(expected, e.getMessage());
- }
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_zeroOffset() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset"}, new String[] {"0"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("DATA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"length"}, new String[] {"2"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("DAta", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"length"}, new String[] {"5"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("DATA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_zeroLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"length"}, new String[] {"0"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("data", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset", "length"}, new String[] {"1", "2"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("dATa", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength_rearBoundary() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset", "length"}, new String[] {"3", "1"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("datA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_validLength_frontBoundary() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset", "length"}, new String[] {"0", "1"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("Data", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_validOffset_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset", "length"}, new String[] {"1", "4"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("dATA", result);
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.LowerCaseTag.doFunction(TagInfo, JET2Context, String)'
- */
- public void testDoFunction_tooBigOffset_tooBigLength() throws JET2TagException {
- final TagInfo tagInfo = new TagInfo("f:uc", 1, 1, new String[] {"offset", "length"}, new String[] {"4", "4"});
- upperCaseTag.setTagInfo(tagInfo);
-
- final String result = upperCaseTag.doFunction(tagInfo, context, "data");
-
- assertEquals("data", result);
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java
deleted file mode 100644
index 5c6b7de..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jet.tests.taglib.format;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.BufferedJET2Writer;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.internal.taglib.format.UuidTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class UuidTagTests extends TestCase {
-
- private BufferedJET2Writer out;
- private UuidTag tag;
- private TagInfo tagInfo;
- private JET2Context context;
-
- protected void setUp() throws Exception {
- super.setUp();
- this.out = new BodyContentWriter();
- this.tag = new UuidTag();
- context = new JET2Context(null);
- tag.setContext(context);
- tag.setOut(out);
- tag.setParent(null);
- tagInfo = new TagInfo("f:uuid", 1, 1, new String[0], new String[0]);
- tag.setTagInfo(tagInfo);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.format.UuidTag.doAction(TagInfo, JET2Context, JET2Writer)'
- */
- public void testDoAction() throws JET2TagException {
- tag.doAction(tagInfo, context, out);
-
- String uuid1 = out.getContent();
-
- assertNotNull(uuid1);
- assertEquals(23, uuid1.length()); // all UUIDs returned by this tag are 23 chars
- out.setContent("");
-
- tag.doAction(tagInfo, context, out);
- String uuid2 = out.getContent();
- assertNotNull(uuid2);
- assertEquals(23, uuid2.length()); // all UUIDs returned by this tag are 23 chars
-
- assertTrue("uuid1 != uuid2", !uuid1.equals(uuid2));
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/AllTests.java
deleted file mode 100644
index 7cf8f7e..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.taglib.java;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.taglib.java");
- //$JUnit-BEGIN$
- suite.addTestSuite(TestImportsLocationTag.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/JavaActionsUtilTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/JavaActionsUtilTests.java
deleted file mode 100644
index 4304f79..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/JavaActionsUtilTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests.taglib.java;
-
-import junit.framework.TestCase;
-
-/**
- * @author pelder
- *
- */
-public class JavaActionsUtilTests extends TestCase {
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.java.JavaActionsUtil#getContainerForPackage(org.eclipse.core.runtime.IPath, java.lang.String)}.
- */
- public void testGetContainerForPackage() {
- fail("Not yet implemented");
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.java.JavaActionsUtil#getImportManager(org.eclipse.jet.JET2Writer)}.
- */
- public void testGetImportManager() {
- fail("Not yet implemented");
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.java.JavaActionsUtil#findContainingJavaPackageTag(org.eclipse.jet.taglib.CustomTag)}.
- */
- public void testFindContainingJavaPackageTag() {
- fail("Not yet implemented");
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.java.JavaActionsUtil#getResourceForJavaResource(org.eclipse.core.runtime.IPath, java.lang.String, java.lang.String)}.
- */
- public void testGetResourceForJavaResource() {
- fail("Not yet implemented");
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/TestImportsLocationTag.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/TestImportsLocationTag.java
deleted file mode 100644
index 88dd382..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/java/TestImportsLocationTag.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.jet.tests.taglib.java;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.codegen.util.ImportManager;
-import org.eclipse.jet.BodyContentWriter;
-import org.eclipse.jet.BufferedJET2Writer;
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.internal.taglib.java.ImportsLocationTag;
-import org.eclipse.jet.taglib.JET2TagException;
-import org.eclipse.jet.taglib.TagInfo;
-import org.eclipse.jet.taglib.java.JavaActionsUtil;
-import org.eclipse.jface.text.BadPositionCategoryException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-
-public class TestImportsLocationTag extends TestCase {
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.java.ImportsLocationTag.doAction(TagInfo, JET2Context, JET2Writer)'
- */
- public void testDoAction() throws JET2TagException, BadPositionCategoryException {
- JET2Context context = new JET2Context(null);
- BufferedJET2Writer writer = new BodyContentWriter();
-
- TagInfo td = new TagInfo("java:importsLocation", 1, 1,
- new String[] {"package"},
- new String[] {"foo.bar.test"});
-
- ImportsLocationTag tag = createImportsLocationTag(context, writer, td);
-
- tag.doAction(td, context, writer);
-
- verifyImportManagerInstalled(writer);
- }
-
- /**
- * @param context
- * @param writer
- * @param td
- * @return
- */
- private ImportsLocationTag createImportsLocationTag(JET2Context context, JET2Writer writer, TagInfo td) {
- ImportsLocationTag tag = new ImportsLocationTag();
-
- tag.setContext(context);
- tag.setParent(null);
- tag.setTagInfo(td);
- tag.setOut(writer);
- return tag;
- }
-
- /*
- * Test method for 'org.eclipse.jet.internal.taglib.java.ImportsLocationTag.doAction(TagInfo, JET2Context, JET2Writer)'
- */
- public void testDoAction_multipleTimes() throws JET2TagException, BadPositionCategoryException {
- JET2Context context = new JET2Context(null);
- BufferedJET2Writer writer = new BodyContentWriter();
-
- TagInfo td = new TagInfo("java:importsLocation", 1, 1,
- new String[] {"package"},
- new String[] {"foo.bar.test"});
-
- TagInfo td2 = new TagInfo("java:importsLocation", 2, 1,
- new String[] {"package"},
- new String[] {"foo.bar.test2"});
-
- ImportsLocationTag tag = createImportsLocationTag(context, writer, td);
-
- ImportsLocationTag tag2 = createImportsLocationTag(context, writer, td2);
-
- tag.doAction(td, context, writer);
-
- try {
- tag2.doAction(td2, context, writer);
- fail("Second doAction on same file should have thrown JET2TagException");
- } catch(JET2TagException e) {
- // success
- }
-
- verifyImportManagerInstalled(writer);
- }
-
- /**
- * @param writer
- * @throws BadPositionCategoryException
- */
- private ImportManager verifyImportManagerInstalled(BufferedJET2Writer writer) throws BadPositionCategoryException {
- final IDocument document = (IDocument) writer.getAdapter(IDocument.class);
- final Position[] positions = document.getPositions(ImportsLocationTag.IMPORTS_POSITION_CATEGORY);
- assertTrue("positions.length == 1", positions.length == 1);
- assertTrue("positions[0] instanceof ImportsLocationTag.ImportsPosition", positions[0] instanceof ImportsLocationTag.ImportsPosition);
-
- ImportManager mgr = ((ImportsLocationTag.ImportsPosition)positions[0]).getImportManager();
-
- assertNotNull(mgr);
- return mgr;
- }
-
- public void testJavaImportsUtil() throws JET2TagException, BadPositionCategoryException {
- // setup an imports tag...
- JET2Context context = new JET2Context(null);
- BufferedJET2Writer writer = new BodyContentWriter();
-
- TagInfo td = new TagInfo("java:importsLocation", 1, 1,
- new String[] {"package"},
- new String[] {"foo.bar.test"});
-
- final ImportsLocationTag tag = createImportsLocationTag(context, writer, td);
- tag.doAction(td, context, writer);
- final ImportManager tagInstalledMananger = verifyImportManagerInstalled(writer);
-
- // Test: get the installed imports tag the public way...
- final ImportManager importManager = JavaActionsUtil.getImportManager(writer);
-
- // Verify
- assertEquals(tagInstalledMananger, importManager);
-
-
- }
-
- public void testJavaImportsUtil_NotInstalled() {
- // setup empty writer...
- JET2Writer writer = new BodyContentWriter();
-
- // Test: get the installed imports tag the public way...
- try {
- JavaActionsUtil.getImportManager(writer);
- fail("Expected thrown JET2TagException");
- } catch(JET2TagException e) {
- // success
- }
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/ActionsUtilTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/ActionsUtilTests.java
deleted file mode 100644
index f5553f6..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/ActionsUtilTests.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests.taglib.workspace;
-
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jet.taglib.workspace.ActionsUtil;
-
-/**
- * JUnit tests for {@link ActionsUtil}.
- *
- */
-public class ActionsUtilTests extends TestCase {
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.workspace.ActionsUtil#readTextFile(java.net.URL, java.lang.String)}.
- * @throws Exception
- */
- public void testReadTextFile_Manifest_MF() throws Exception {
- URL url = new URL("platform:/plugin/org.eclipse.jet.tests/data/ActionsUtil/MANIFEST.MF");
- final String correctText = ActionsUtil.readTextFile(url, "UTF-8");
-
- final String rawText = ActionsUtil.readTextFile(url, null);
-
- assertTrue("raw text", rawText.startsWith("Manifest-Version: 1.0"));
- assertTrue("correct text", correctText.startsWith("Manifest-Version: 1.0"));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.workspace.ActionsUtil#readTextFile(java.net.URL, java.lang.String)}.
- * @throws Exception
- */
- public void testReadTextFile_utf8_no_bom_xml() throws Exception {
- URL url = new URL("platform:/plugin/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_no_bom.xml");
- final String correctText = ActionsUtil.readTextFile(url, "UTF-8");
-
- final String rawText = ActionsUtil.readTextFile(url, null);
-
- assertTrue("correct text", correctText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
- assertTrue("raw text", rawText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.workspace.ActionsUtil#readTextFile(java.net.URL, java.lang.String)}.
- * @throws Exception
- */
- public void testReadTextFile_utf8_bom_xml() throws Exception {
- URL url = new URL("platform:/plugin/org.eclipse.jet.tests/data/ActionsUtil/sample_utf8_bom.xml");
- final String correctText = ActionsUtil.readTextFile(url, "UTF-8");
-
- final String rawText = ActionsUtil.readTextFile(url, null);
-
- assertTrue("correct text", correctText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
- // disable raw format check - fails on Linux for unknown reasons
-// assertTrue("raw text", rawText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.workspace.ActionsUtil#readTextFile(java.net.URL, java.lang.String)}.
- * @throws Exception
- */
- public void testReadTextFile_utf16_le_xml() throws Exception {
- URL url = new URL("platform:/plugin/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16le.xml");
- final String correctText = ActionsUtil.readTextFile(url, "UTF-16");
-
-
- assertTrue("correct text", correctText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-16\"?>"));
- // XXX: Should verify presence of BOM by reading byte stream directly.
-// final String rawText = ActionsUtil.readTextFile(url, null);
-// assertTrue("raw text", rawText.startsWith("\u00FF\u00FE")); // Little Endian BOM is FF FE
- }
-
- /**
- * Test method for {@link org.eclipse.jet.taglib.workspace.ActionsUtil#readTextFile(java.net.URL, java.lang.String)}.
- * @throws Exception
- */
- public void testReadTextFile_utf16_be_xml() throws Exception {
- URL url = new URL("platform:/plugin/org.eclipse.jet.tests/data/ActionsUtil/sample_utf16be.xml");
- final String correctText = ActionsUtil.readTextFile(url, "UTF-16");
-
- assertTrue("correct text", correctText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-16\"?>"));
- // XXX: Should verify presence of BOM by reading byte stream directly.
-// final String rawText = ActionsUtil.readTextFile(url, null);
-// assertTrue("raw text", rawText.startsWith("\u00FE\u00FF")); // big endian BOM is FE FF
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/AllTests.java
deleted file mode 100644
index 1088325..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/workspace/AllTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jet.tests.taglib.workspace;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jet.tests.taglib.workspace");
- //$JUnit-BEGIN$
- suite.addTestSuite(ActionsUtilTests.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AbstractExprTest.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AbstractExprTest.java
deleted file mode 100644
index 92a2cd4..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AbstractExprTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- *
- */
-package org.eclipse.jet.tests.xpath;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import junit.framework.TestCase;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-/**
- * @author pelder
- *
- */
-public abstract class AbstractExprTest extends TestCase{
-
- protected Document document;
- protected static final String EXPECTED_ATTR_TEXT = "test";
- protected static final String EXPECTED_COMMENT_TEXT = " a comment within root ";
- protected static final String EXPECTED_PI_TEXT = "version=\"3.0\"";
- protected static final String EXPECTED_B_TEXT = "Some foo text.";
- protected static final String EXPECTED_A_TEXT = "\n\t\t" + EXPECTED_B_TEXT + "\n\t";
- protected static final String EXPECTED_OTHER_A_TEXT = "\n\t\t" + "Some bar text." + "\n\t";
- protected static final String EXPECTED_OTHER_B_TEXT = "Some bar text.";
- protected static final String EXPECTED_DOC_TEXT = "\n\t" + "\n\t" + EXPECTED_A_TEXT
- + "\n\t" + EXPECTED_OTHER_A_TEXT + "\n";
-
- private void loadDocument() {
- InputStream inputStream = null;
- try {
- URL dataURL = new URL(
- "platform:/plugin/org.eclipse.jet.tests/data/DOMInspector.xml");
- inputStream = dataURL.openStream();
- DocumentBuilderFactory factory = DocumentBuilderFactory
- .newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
-
- document = builder.parse(inputStream, "UTF-8");
- } catch (IOException e) {
- throw new RuntimeException(e);
- } catch (ParserConfigurationException e) {
- throw new RuntimeException(e);
- } catch (SAXException e) {
- throw new RuntimeException(e);
- } finally {
- if (inputStream != null) {
- try {
- inputStream.close();
- } catch (IOException e) {
- // do nothing
- }
- }
- }
- }
-
- protected Element rootElement;
- protected Element elementA;
- protected Element elementB;
- protected Attr attr;
- protected Node bText;
- protected Node pi;
- protected Node comment;
-
- /**
- *
- */
- public AbstractExprTest() {
- super();
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- loadDocument();
- rootElement = document.getDocumentElement();
- elementA = (Element) rootElement.getElementsByTagName("a").item(0);
- elementB = (Element) elementA.getElementsByTagName("b").item(0);
- bText = elementB.getFirstChild();
- attr = rootElement.getAttributeNode("rootAttr");
- pi = document.getFirstChild();
- comment = rootElement.getFirstChild().getNextSibling();
- }
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AllTests.java
deleted file mode 100644
index 6d10fc7..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AllTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.eclipse.jet.tests.xpath;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jet.tests.xpath");
- //$JUnit-BEGIN$
- suite.addTestSuite(XPathParserTests.class);
- suite.addTestSuite(EStructuralFeatureSettingTests.class);
- suite.addTestSuite(VariableTests.class);
- suite.addTestSuite(RelOpTests.class);
- suite.addTest(ResourceAttributeInspectorTests.suite());
- suite.addTestSuite(SelfStepTests.class);
- suite.addTestSuite(ParentStepTests.class);
- suite.addTestSuite(DescendantOrSelfTests.class);
- suite.addTestSuite(LogicalOpTests.class);
- suite.addTestSuite(DOMInspectorTests.class);
- suite.addTestSuite(ExpandedNameTests.class);
- suite.addTestSuite(XPathOverDOMTests.class);
- suite.addTestSuite(BooleanFunctionTests.class);
- suite.addTestSuite(EMFResourceInspectorTests.class);
- suite.addTestSuite(NumberBinaryOpTests.class);
- suite.addTest(ResourceInspectorTests.suite());
- suite.addTestSuite(StringFunctionTests.class);
- suite.addTestSuite(BuiltinStringFunctionsTests.class);
- suite.addTestSuite(NumberFunctionTests.class);
- suite.addTestSuite(XPathOverEmfXmlXsdTests.class);
- suite.addTestSuite(XPathParserDefects.class);
- suite.addTestSuite(ChildStepTests.class);
- suite.addTestSuite(AttributeStepTests.class);
- suite.addTestSuite(XPathOverEcoreTests.class);
- suite.addTestSuite(EObjectInspectorTests.class);
- suite.addTestSuite(XPathInspectorManagerTests.class);
- suite.addTestSuite(XPathTokenScannerTests.class);
- suite.addTestSuite(RootTests.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AttributeStepTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AttributeStepTests.java
deleted file mode 100644
index 1376a2e..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/AttributeStepTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.jet.tests.xpath;
-
-import java.util.Set;
-
-import org.eclipse.jet.internal.xpath.ast.Axis;
-import org.eclipse.jet.internal.xpath.ast.NodeTest;
-import org.eclipse.jet.internal.xpath.ast.Root;
-import org.eclipse.jet.internal.xpath.ast.Step;
-import org.eclipse.jet.xpath.Context;
-import org.eclipse.jet.xpath.inspector.ExpandedName;
-import org.eclipse.jet.xpath.inspector.INodeInspector.NodeKind;
-
-public class AttributeStepTests extends AbstractExprTest {
-
- /*
- * Test method for 'org.eclipse.jet.internal.xpath.ast.Step.evalAsNodeSet(Context, INodeInspector)'
- */
- public void testEvalAsNodeSet_attribute_all() {
- Step stepExpr = new Step(
- new Step(new Root(), Axis.childAxis(),
- NodeTest.nameTest(NodeKind.ELEMENT, new ExpandedName("root"))),
- Axis.attributeAxis(),
- NodeTest.nameTest(NodeKind.ATTRIBUTE, new ExpandedName("*"))
- );
-
- Context context = new Context(document, null);
-
- Set resultSet = stepExpr.evalAsNodeSet(context);
-
- assertNotNull(resultSet);
- assertEquals(1, resultSet.size());
- assertTrue(resultSet.contains(attr));
-
- }
-
- public void testEvalAsNodeSet_attribute_foo() {
- Step stepExpr = new Step(
- new Step(new Root(), Axis.childAxis(),
- NodeTest.nameTest(NodeKind.ELEMENT, new ExpandedName("root"))),
- Axis.attributeAxis(),
- NodeTest.nameTest(NodeKind.ATTRIBUTE, new ExpandedName("foo"))
- );
-
- Context context = new Context(document, null);
-
- Set resultSet = stepExpr.evalAsNodeSet(context);
-
- assertNotNull(resultSet);
- assertEquals(0, resultSet.size());
-
- }
-
- public void testEvalAsNodeSet_attribute_rootAttr() {
- Step stepExpr = new Step(
- new Step(new Root(), Axis.childAxis(),
- NodeTest.nameTest(NodeKind.ELEMENT, new ExpandedName("root"))),
- Axis.attributeAxis(),
- NodeTest.nameTest(NodeKind.ATTRIBUTE, new ExpandedName("rootAttr"))
- );
-
- Context context = new Context(document, null);
-
- Set resultSet = stepExpr.evalAsNodeSet(context);
-
- assertNotNull(resultSet);
- assertEquals(1, resultSet.size());
- assertTrue(resultSet.contains(attr));
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/BooleanFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/BooleanFunctionTests.java
deleted file mode 100644
index 6d449d1..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/BooleanFunctionTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.jet.tests.xpath;
-
-
-import org.eclipse.jet.internal.xpath.NodeSetImpl;
-import org.eclipse.jet.internal.xpath.functions.BooleanFunction;
-
-public class BooleanFunctionTests extends AbstractExprTest {
-
- /*
- * Test method for 'org.eclipse.jet.internal.xpath.functions.BooleanFunction.evaluate(Object)'
- */
- public void testEvaluateObject_String_nonempty() {
- boolean result = BooleanFunction.evaluate("hello");
- assertTrue(result);
- }
- public void testEvaluateObject_String_empty() {
- boolean result = BooleanFunction.evaluate("");
- assertFalse(result);
- }
-
- public void testEvaluateObject_Number_false() {
- boolean result1 = BooleanFunction.evaluate(new Double(Double.NaN));
- assertFalse(result1);
-
- boolean result2 = BooleanFunction.evaluate(new Double(0.0));
- assertFalse(result2);
-
- boolean result3 = BooleanFunction.evaluate(new Double(-0.0));
- assertFalse(result3);
- }
-
- public void testEvaluateObject_Number_true() {
- boolean result1 = BooleanFunction.evaluate(new Double(Double.NEGATIVE_INFINITY));
- assertTrue(result1);
-
- boolean result2 = BooleanFunction.evaluate(new Double(Double.POSITIVE_INFINITY));
- assertTrue(result2);
-
- boolean result3 = BooleanFunction.evaluate(new Double(0.001));
- assertTrue(result3);
-
- boolean result4 = BooleanFunction.evaluate(new Double(-0.01));
- assertTrue(result4);
- }
-
- public void testEvaluateObject_Nodeset() {
- NodeSetImpl ns = new NodeSetImpl();
-
- assertFalse(BooleanFunction.evaluate(ns));
-
- ns.add(elementA);
-
- assertTrue(BooleanFunction.evaluate(ns));
-
- ns.add(elementB);
-
- assertTrue(BooleanFunction.evaluate(ns));
-
- }
-
-}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/Bug130552Workaround.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/Bug130552Workaround.java
deleted file mode 100644
index 9e67977..0000000
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/Bug130552Workaround.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 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 - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.tests.xpath;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-/**
- * Utility class to work around Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=130552">130552</a> in EMF.
- *
- */
-public class Bug130552Workaround {
-
- private Bug130552Workaround() {
- // prevent intantiation
- }
-
- public static FeatureMap.Entry getEntry(FeatureMap fm, int index) {
-
- // this should work, but doesn't:
-// return (FeatureMap.Entry)fm.get(index);
-
- int iWithoutCommentsOrText = 0;
- for (int i = 0; i < fm.size(); i++) {
- FeatureMap.Entry entry = (FeatureMap.Entry) fm.get(i);
- if(entry.getEStructuralFeature() == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_CDATA()
- || entry.getEStructuralFeature() == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Comment()
- || entry.getEStructuralFeature() == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Text()) {
- continue;
- }
- if( iWithoutCommentsOrText++ == index) {
- return entry;
- }
-
- }
- throw new IndexOutOfBoundsException();
- }
-
- public static Object getValue(FeatureMap fm, int index) {
- return getEntry(fm, index).getValue();
- }
-
- public static EStructuralFeature getEStructuralFeature(FeatureMap fm, int index) {
- return getEntry(fm, index).getEStructuralFeature();
- }
-
- public static int size(