Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gif')
-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gifbin324 -> 0 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gif b/plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gif
deleted file mode 100644
index acfe4db46..000000000
--- a/plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gif
+++ /dev/null
Binary files differ

Back to the top

h='100%'> -rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/ComponentTestCase.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentInfo.java128
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentTypeInfo.java38
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUICommandInfo.java111
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIDataInfo.java152
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIFormInfo.java64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIInputInfo.java138
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIOutputInfo.java100
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/decorator/TestComponentDecorator.java68
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.cvsignore4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/META-INF/MANIFEST.MF27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/build.properties21
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java40
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/BaseTestClass.java130
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/CompletionPrefixTest.java671
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/ContentAssistTestsPlugin.java66
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestContentAssistParser.java119
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestFunctionCompletionStrategy.java128
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestIdCompletionStrategy.java130
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149224.java175
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149743.java100
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBean.java.data13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBeanSettable.java.data171
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/basicELExpressions.jsp.data28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224.properties.data4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224_1.jsp.data25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149743.jsp.data23
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_basic.xml.data17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_bug149743.xml.data17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.cvsignore5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/META-INF/MANIFEST.MF24
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/build.properties22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/plugin.properties27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java38
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ContextSymbolTestPlugin.java64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ModelBaseTestCase.java115
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2.java1099
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2_ChangeStability.java519
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIMapTypeDescriptor.java141
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java136
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestTypeCoercion.java193
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/ITestBean2.java.data5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/MyListBean.java.data29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2.java.data37
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2Subclass.java.data8
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanMap.java.data19
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanWithGenericProperties.java.data34
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle.properties.data3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle2.properties.data4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/.cvsignore5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/META-INF/MANIFEST.MF58
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/build.properties22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml39
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/DualModeCoreTests.java27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/JSFCoreFastTests.java23
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/TestsPlugin.java102
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/CompositeJSFAppConfigLocatorProviderStrategyTests.java78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/JSFAppConfigManagerFactoryTests.java86
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManager.java186
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactory.java38
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactoryFromExtension.java29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFromExtension.java14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestLocatorProvider.java117
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/provider/TestJARFileJSFAppConfigProvider.java302
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/validation/AppConfigValidationUtilTestCase.java152
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/contenttype/TestContentTypes.java148
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryProviderTests.java49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryValidatorTest.java41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/LibraryValidatorTest.java166
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/UserLibraryVersionValidatorProxy.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJ2EETest.java185
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJavaEETest.java183
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigDialogSettingDataTestCases.java62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigModelTestCases.java179
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryRegistryUtilTestCases.java75
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFProjectLibraryReferenceTestCases.java119
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryReferenceTestCases.java199
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryServerSuppliedReferenceTestCases.java133
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/ArchiveFileTestCases.java227
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryPackageTestCases.java50
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryTestCases.java244
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryTestCases.java121
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/MaintainDefaultImplementationAdapterTestCases.java123
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIBArchiveFilesDelegate.java29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIB_EMPTYArchiveFilesDelegate.java27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/migration/MigrationV1toV2Test.java327
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMAttributeDeclaration.java46
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMNode.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockJSPTagRegistry.java204
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockTLDAttributeDeclaration.java63
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/JSFFacetInstallDataModelProviderTestCases.java151
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils.java876
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils11.java315
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils12.java435
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils20.java51
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestUtilSuite.java17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestableJSFUtils.java82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/region/TestRegion2ElementAdapter.java526
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AbstractTestListener.java12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AllLifecycleListenerTests.java16
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/ClasspathTestListener.java121
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastClasspathEntryLifecycleTests.java73
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests.java269
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests_Scenario.java344
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/LifecycleStressTest.java222
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MockListener.java86
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MyTestListener.java136
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestDefaultJarLocator.java142
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestLifecycleListener.java372
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestResourceTracker.java197
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/sanity/TestJSFFacetedTestEnvironment.java53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/serialization/TLDAttributeSerializationTests.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/ConcreteAxiomaticSetTest.java164
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/NodeSetTest.java141
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestElementToTagIdentifierMapping.java28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestMemberConstraint.java136
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestXPathValidation.java71
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/ConcatStrategy.java44
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/StrategyCompositeTests.java56
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/BaseTagMatcherTestCase.java134
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/TestXPathTagMatcher.java80
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeComparatorTests.java533
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeTransformerTests.java110
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFCoreUtilHelper.java623
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFFacetedTestEnvironment.java157
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestCMUtil.java97
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanIntrospector.java671
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanPropertyWorkingCopy.java519
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJSFAppConfigUtils.java94
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestTypeUtil.java444
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/UtilSuite.java39
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIReporter.java81
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIValidationContext.java49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockValidationReporter.java201
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticValidation_AttrValueConverter.java171
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_AttributeValues.java158
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_Containment.java219
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/XMLViewDefnValidatorTests.java62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/AnotherBean.java.data13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/IBeanInterface.java.data7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-beanutils-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data2
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/standard-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1.java.data141
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1Subclass.java.data10
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBeanGeneric.java.data34
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestEnum1.java.data6
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2.jarbin1152 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jarbin781 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jarbin672 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jarbin687 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_1.xml9
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_2.xml9
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-2_0.xml9
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/jsflibrary-api-1.1.3.jarbin1153 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/no-version-entry/jsflibrary-api-1.1.3.jarbin1117 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/nonstandard_implementation_version/jsflibrary-api-1.1.3.jarbin1144 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data30
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/NonELAttributeValues.jsp.data0
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testContainment.jsp.data19
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testdata1.jsp.data40
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/CaseInsensitive.xml17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileA.xml13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileB.xml13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.xml101
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test_en_US.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_core.tld.data781
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_html.tld.data6200
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/sandbox-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/signatures.jarbin2493 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests.zipbin30338 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests2.zipbin21570 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/Test2Project.zipbin7871 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject.zipbin7979 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject1.zipbin7320 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject1.zipbin9305 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject2.zipbin10455 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/valueHolderTest11.zipbin12693 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/tomahawk-bogus.jarbin3966 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/.cvsignore5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/META-INF/MANIFEST.MF38
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/AllTests.java99
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeFastTests.java17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeTestsPlugin.java64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java246
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTFacesContext.java119
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTJSPExternalContext.java245
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultBeanSymbolSourceProvider.java200
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTMethodResolver.java159
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTVariableResolver.java250
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultPropertyResolver.java842
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDesignTimeApplicationManager.java394
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20DefaultBeanSymbolSourceProvider.java212
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20ImplicitVariables.java259
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPDefaultSymbolFactory.java132
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPModelProcessor.java392
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleMapSource.java257
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleSymbolSourceProvider.java172
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestStartupHandler.java178
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/ChangeTester.java177
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/FastResourceLocatorSuite.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJSFResource.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResource.java115
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResourceLocator.java97
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestResourceIdentifierFactory.java85
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedJSFResource.java49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedResourceLocator.java456
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestDTUIViewRoot.java61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestJSPViewDefnAdapter.java231
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseStrategyTestClass.java131
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseTestClass.java101
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/JSPViewSuite.java36
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestDefaultJSPTagResolver.java53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDNamespace.java93
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDTagRegistry.java120
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagAnalyzer.java251
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagIntrospectingStrategy.java205
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestUtil.java102
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/VerifyRegistryUtil.java464
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/persistence/TestSerializableTLDTagElement.java117
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/test.xml50
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithListProp.java.data12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithMapProp.java.data12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/ListBean.java.data29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MapBean.java.data13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MethodBean.java.data14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean1.java.data41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean2.java.data12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean3.java.data10
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBeanWithGenericProperties.java.data19
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestProject.zipbin11943 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle1.resources.data3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle2.resources.data3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config.xml.data32
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_1_2.xml.data23
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_2_0.xml.data39
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/jsfResources.jarbin24874 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/tag1.xhtml0
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata1.jsp.data54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata2.jsp.data29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.cvsignore5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/META-INF/MANIFEST.MF25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/_readme.txt1
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/plugin.properties11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/AllFacesConfigTests.java41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/TestsPlugin.java65
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/AllReadTests.java177
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/BaseReadTestCase.java78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase.java303
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_1_2.java144
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_2_0.java155
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeComponentTestCase.java257
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeConverterTestCase.java255
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeRendererTestCase.java258
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeValidatorTestCase.java255
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadComponentTestCase.java251
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase.java177
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase_1_2.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadExtensionDataTestCase.java88
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase.java201
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_1_2.java57
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_2_0.java255
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetComponentTestCase.java179
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetRendererTestCase.java177
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase.java157
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_1_2.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_2_0.java168
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase.java78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase_1_2.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanManagedPropertyTestCase.java273
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase.java228
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_1_2.java62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_2_0.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase.java303
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_1_2.java63
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_2_0.java100
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyComponentTestCase.java259
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyConverterTestCase.java258
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyValidatorTestCase.java253
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadReferencedBeanTestCase.java126
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase.java144
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_1_2.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_2_0.java69
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRendererTestCase.java211
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase.java160
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase_1_2.java62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/CommonStructuresUtil.java664
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/FacesConfigModelUtil.java274
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/WizardUtil.java218
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/AllWriteTests.java154
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/BaseWriteTestCase.java81
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/FacesConfigExtensionTestCase.java94
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase.java200
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_1_2.java191
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_2_0.java154
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentExtensionDataTestCase.java101
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentTestCase.java169
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase.java146
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase_1_2.java94
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFacesConfigTestCase_2_0.java239
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase.java158
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_1_2.java93
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_2_0.java193
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase.java91
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase_1_2.java91
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase.java396
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_1_2.java92
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_2_0.java65
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase.java201
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_1_2.java97
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_2_0.java117
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteReferencedBeanTestCase.java131
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase.java231
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_1_2.java93
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_2_0.java119
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase.java158
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase_1_2.java91
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config-ext-data1.xml21
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config.xml411
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config1.xml12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config2.xml14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config3.xml14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_1_2.xml433
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_2_0.xml521
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/test.xml50
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.cvsignore2
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/META-INF/MANIFEST.MF12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentsPageTest.java168
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/AllTestCases.java53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/FacesConfigEditorTest.java107
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/GEMPreferencesTest.java79
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/JSPUtilTest.java37
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/ManagedBeanUtilTest.java73
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/OpenADFDemoFacesConfigTest.java88
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/PageflowEditorTest.java264
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/TestNotificationsOnNonUIThread.java537
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/WebrootUtilTest.java132
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/TestUtil.java306
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/ZipStreamWrapper.java59
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/wizard/NewManagedBeanWizardTest.java67
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/adfDemoProject.zipbin6407583 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/emptyjsfproject.zipbin4226 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/page1.jsp34
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/.cvsignore4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/META-INF/MANIFEST.MF42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.properties11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.xml10
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/build.properties22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.xml91
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractBaseMetaDataTestCase.java160
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractEntityQueryVisitorTest.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractMetaDataVisitorTest.java35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractTraitQueryVisitorTest.java43
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AllDeprecatedMetadataTests.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EmptyResultSetTest.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EntityImplTests.java87
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/IncludeEntityGroupImplTests.java53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MergeTests.java202
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataExceptionTest.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataQueryHelperTests.java286
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MissingMDExtensionModelTests.java122
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelImplTests.java115
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelProviderAdapterTests.java97
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MyMDLocator.java33
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TinyTestTests.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitImplTests.java72
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitValueHelperTests.java265
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractBaseMetaDataTestCase.java170
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractEntityQueryVisitorTests.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractMetaDataVisitorTests.java35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractTraitQueryVisitorTests.java43
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AllUpdatedMetadataTests.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EmptyResultSetTests.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EntityImplTests.java90
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/FakeDomainQueryFactory.java40
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/IncludeEntityGroupImplTests.java57
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MergeTests.java207
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataExceptionTests.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataModelManagerFactoryTests.java61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryContextFactoryTests.java55
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryFactoryTests.java96
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryHelperTests.java315
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MissingMDExtensionModelTests.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelImplTests.java110
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelProviderAdapterTests.java104
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TaglibMetaDataQueryTests.java279
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TestMDModelManagerFactory.java41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TinyTestTests.java57
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitImplTests.java73
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitValueHelperTests.java270
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/AllTests.java208
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/MetadataTestsPlugin.java58
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AllMetaDataProcessingTests.java31
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeExtensionsTests.java69
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeFactoryTests.java64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypesRegistryTests.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataProcessorsFactoryTests.java136
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/features/IBarker.java22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyBooleanType.java29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyLongType.java27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PaletteTests.java266
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PropertyDescriptorTests.java116
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/QuickEditSectionsTests.java68
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ActionTypeTests.java76
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/AllTests.java97
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/BooleanTypeTest.java69
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSClassTypeTests.java56
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSStyleTypeTests.java45
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CharacterTypeTest.java43
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ColorTypeTest.java100
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentBindingTypeTests.java66
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentIDTypeTests.java103
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ContentTypeTest.java44
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CurrencyCodeTypeTest.java51
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/DoubleTypeTest.java82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedDoubleTypeTest.java43
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedIntegerTypeTest.java46
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedLongTypeTest.java49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigConverterIDTypeTests.java96
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigValidatorIDTypeTests.java81
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/IntegerTypeTest.java74
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFCoreTestCase.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFHTMLTestCase.java181
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JavaClassTypeTest.java138
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LanguageCodeTypeTest.java48
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LengthTypeTest.java95
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LinkTypeTest.java44
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LocaleTypeTest.java72
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LongTypeTest.java82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/MethodBindingTypeTests.java74
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/NumberPatternTypeTest.java31
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/StringTypeTest.java69
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TaglibProcessingTestCase.java68
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TimeZoneTypeTest.java40
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueBindingTypeTests.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueTypeTests.java61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/BaseTestCase.java194
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequired.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV11.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV12.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/JSPTestCase.java172
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/NoJSFRuntimeFoundException.java17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/SingleJSPTestCase.java113
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/icons/attr_val.gifbin124 -> 0 bytes-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyBean.java.data16
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverter.java.data17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass1.java.data12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass2.java.data16
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass3.java.data12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MySubclassOfMyConverterSubclass1.java.data11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyValidator.java.data14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/JSFPage.jsp16
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/actionTypeTest.jsp.data17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.html18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.jsp.data15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigConverterIDType.jsp.data18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigValidatorIDType.jsp.data18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/foo.css.data157
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/javaClassType.jsp.data17
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/mystyle.css.data31
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/propertyDescTests.jsp13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileA.xml66
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileB.xml96
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel.xml9
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TestJSP.jsp16
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TinyIncludeTest.xml82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_metadataprocessing.xml107
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tagprocessing.xml251
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.xml141
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test_en_US.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tinytest.xml22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/missingMDModelTest.xml88
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/propertyDescriptorTest.xml64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/quickEditSectionTest.xml21
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.xml77
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest_en_US.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/web/faces-config_1_1.xml.data50
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.cvsignore5
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/META-INF/MANIFEST.MF14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/metadata/jsf_metadataprocessing2.xml25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.xml21
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/Activator.java57
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/NoImplPossibleVals.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/.cvsignore4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/META-INF/MANIFEST.MF42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/build.properties18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/Activator.java77
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestCase.java102
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestSuite.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JDTTestEnvironment.java229
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JSFTestUtil.java470
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/LoadableResource.java76
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/PerfTracker.java83
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ProjectTestEnvironment.java272
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestFileResource.java54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestUtil.java469
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/WebProjectTestEnvironment.java284
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ZipStreamWrapper.java59
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/BugRegressionTest.java14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/DualModeEnvironment.java12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/FastTest.java15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/NoPluginEnvironment.java13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RealWorkspaceContext.java917
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RequiresPluginEnvironment.java14
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/SlowTest.java12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/TestDataBaseLocation.java22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceContext.java20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceRunner.java114
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/AbstractWorkspaceContextWithEvents.java42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSystemZipLoader.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IMockResourceFactory.java41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContext.java84
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContextWithEvents.java20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockBundle.java182
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContainer.java167
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentType.java128
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentTypeManager.java113
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockDataModel.java274
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockExtensionRegistryProvider.java18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFile.java350
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFolder.java67
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockJarProvider.java69
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockMarker.java142
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockModelProvider.java46
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockProject.java213
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResource.java579
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEvent.java63
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEventFactory.java105
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDelta.java372
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDeltaFactory.java333
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualComponentQuery.java27
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFile.java161
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFolder.java253
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspace.java388
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceContext.java435
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceMediator.java22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceRoot.java128
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/TestMockWorkspaceContext.java165
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockClasspathEntry.java328
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJDTWorkspaceContext.java142
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaChangeEventFactory.java46
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaCoreMediator.java37
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElement.java161
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElementDelta.java12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaProject.java462
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockPackageFragmentRoot.java207
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/BundleHacker.java33
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/MockFrameworkAdaptor.java415
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/smodel/TestableStructuredModelFactory.java322
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJDTTestEnvironment.java78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJSFTestUtil.java79
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestProjectTestEnvironment.java41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestWebProjectTestEnvironment.java67
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/testdata/TestClass1.java.data9
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/testdata/dummyFile1
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/testdata/faces-config.xml.data1
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/.cvsignore4
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/META-INF/MANIFEST.MF29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUIAllTests.java33
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUITestsPlugin.java65
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestELHyperlinkDetector.java160
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestJSFELHover.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/util/JSFUITestHelper.java114
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/test.xml49
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs61
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/META-INF/MANIFEST.MF36
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/build.properties20
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/plugin.properties11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests.java40
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java100
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/ELValidationTestPlugin.java62
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java347
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/ELAssert.java396
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/JSPTestCase.java98
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/MockELValidationReporter.java67
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/SingleJSPTestCase.java183
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticAddTestCase.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticDivideTestCase.java186
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMinusTestCase.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticModuloTestCase.java181
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMultiplyTestCase.java124
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/AssignabilityTestCase.java82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BadSyntaxTestCase.java81
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java180
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanVariableResolutionTestCase.java82
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BracketOperatorTestCase.java239
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BuiltInSymbolsTestCase.java201
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/DataTableResolutionTestCase.java79
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GenericsTestCase.java64
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java210
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java213
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/JSPFunctionsTestCase.java79
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java209
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java214
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LoadBundleResolutionTestCase.java178
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalAndTestCase.java133
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java219
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java206
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotTestCase.java140
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalOrTestCase.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MarkerOffsetsTestCase.java178
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MethodBindingTestCase.java145
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfListTestCase.java47
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfMapsTestCase.java94
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ResourceBundleTestCase.java140
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryEmptyTestCase.java109
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryMinusTestCase.java114
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/PropertyFileStressTest.java134
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java153
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/EndToEndTestCase.java196
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/PrefTestUtil.java130
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/TestELValidationPreferences.java86
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/ValidationMessageFactory.java178
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java165
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/FindELRegions.java139
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/test.xml60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithListProperties.java.data25
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithMapProperties.java.data26
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle.properties.data3
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle2.properties.data2
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/ListBean.java.data29
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MapBean.java.data18
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data154
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data188
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSubClass.java.data10
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/stress1.properties.data8689
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticAdd.jsp.data52
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticDivide.jsp.data68
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMinus.jsp.data51
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticModulo.jsp.data65
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMultiply.jsp.data51
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/assignability.jsp.data35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/badSyntax.jsp.data36
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanVariableResolution.jsp.data35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/bracketOperator.jsp.data96
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/builtinSymbols.jsp.data112
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexArithmetic1.jsp.data46
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexComparison.jsp.data36
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/dataTableResolution.jsp.data67
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/emptyOperator.jsp.data44
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/generics.jsp.data33
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data77
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/jspFunctions.jsp.data42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data77
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/listBeans.jsp.data34
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/loadBundleResolution.jsp.data50
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalAND.jsp.data53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data81
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNOT.jsp.data53
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data78
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalOR.jsp.data54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/markerOffsets.jsp.data63
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/methodBinding.jsp.data71
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data30
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/preferenceTest1.jsp.data44
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/propertiesOfMaps.jsp.data42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/resourceBundleResolution.jsp.data54
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/syntaxCheck.jsp.data35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/test.jsp.data35
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/unaryMinus.jsp.data48
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/variableNaming.jsp.data30
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_1.xml.data104
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_2.xml.data118
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/.project33
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/.settings/org.eclipse.jdt.core.prefs66
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/META-INF/MANIFEST.MF33
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/build.properties23
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml60
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/test-metadata.xml34
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml44
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java82
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part2.java82
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/PageDesignerTestsPlugin.java64
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_DTManager.java248
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java731
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Utils.java22
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BaseTestCase.java248
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java317
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySection.java94
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySectionUsingDialogField.java110
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseDefaultTagCreatorTestCase.java26
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java102
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java165
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java159
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java49
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java39
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFCore.java166
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFHTML.java156
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolHTML.java49
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolJSP.java40
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestOverrideableCreationData.java217
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java256
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java57
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java111
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java165
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java82
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseItemCreationToolTestCase.java76
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java103
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java384
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java47
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java58
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/TestCreationFactory.java186
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/UserCustomizedElementEditFactory.java72
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/test.xml62
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_DTManager.jsp.data17
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_TransformOperations.jsp.data23
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jspx.data14
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.xhtml.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jsp.data30
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jspx.data29
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.xhtml.data30
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jsp.data53
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jspx.data55
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.xhtml.data52
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jsp.data23
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jspx.data22
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.xhtml.data23
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/checkModeOp.tld.data72
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/testCheckModeOperation.jsp.data27
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/tagProperty.xsd.data154
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/test-metadata.xml64
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropPages.tld.data161
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropertyPage.jsp.data15
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/expectedResult_directive.include.jspx.data11
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.html.data10
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.xhtml.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_actionListener.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_attribute.jsp.data15
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jspx.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.xhtml.data15
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandLink.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertDateTime.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertNumber.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_converter.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_dataTable.jsp.data21
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_facet.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_form.jsp.data14
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_graphicImage.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputHidden.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputSecret.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputText.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputTextarea.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_loadBundle.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_message.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_messages.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputFormat.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLabel.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLink.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputText.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGrid.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGroup.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_param.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectBooleanCheckbox.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItem.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItems.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyCheckbox.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyListbox.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyMenu.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneListbox.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneMenu.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneRadio.jsp.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_subview.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateDoubleRange.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLength.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLongRange.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validator.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_valueChangeListener.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_verbatim.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_view.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jspx.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.html.data10
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jsp.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jspx.data13
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.xhtml.data12
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testCreator.tld.data142
-rw-r--r--jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testTagCreation.jsp.data16
896 files changed, 0 insertions, 101089 deletions
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath
deleted file mode 100644
index 304e861..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.project b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.project
deleted file mode 100644
index 970c00a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsf.common.runtime.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/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 335f5ca..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Nov 19 16:52:39 PST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-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=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index f4a31c4..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Runtime Test Plugin
-Bundle-SymbolicName: org.eclipse.jst.jsf.common.runtime.tests
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.jst.jsf.common.runtime.tests.RuntimeTestPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.0,2.0.0)",
- org.junit;bundle-version="3.8.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.jst.jsf.common.runtime.tests.model
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/about.html
deleted file mode 100644
index 90bd74d..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/about.html
+++ /dev/null
@@ -1,22 +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>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June, 2008</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/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>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.</p>
-
-</body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/build.properties
deleted file mode 100644
index bfaab6e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2008 Oracle 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:
-# Oracle Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java
deleted file mode 100644
index 5892995..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.jsf.common.runtime.tests.model.TestViewObject;
-import org.eclipse.jst.jsf.common.runtime.tests.model.bean.TestDataModelInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.behavioural.TestActionSource2Info;
-import org.eclipse.jst.jsf.common.runtime.tests.model.behavioural.TestValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestComponentTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestUICommandInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestUIDataInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestUIFormInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestUIInputInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.component.TestUIOutputInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.decorator.TestComponentDecorator;
-
-public class AllRuntimeTests {
- /**
- * @return the test suite
- */
- public static Test suite()
- {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.jsf.common.runtime");
- //$JUnit-BEGIN$
-
- suite.addTestSuite(TestValueHolderInfo.class);
- suite.addTestSuite(TestComponentDecorator.class);
- suite.addTestSuite(TestDataModelInfo.class);
- suite.addTestSuite(TestComponentTypeInfo.class);
- suite.addTestSuite(TestActionSource2Info.class);
-
- // test the main objects
- suite.addTestSuite(TestViewObject.class);
- suite.addTestSuite(TestComponentInfo.class);
- suite.addTestSuite(TestUIOutputInfo.class);
- suite.addTestSuite(TestUIInputInfo.class);
- suite.addTestSuite(TestUICommandInfo.class);
- suite.addTestSuite(TestUIFormInfo.class);
- suite.addTestSuite(TestUIDataInfo.class);
-
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/RuntimeTestPlugin.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/RuntimeTestPlugin.java
deleted file mode 100644
index 6172549..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/RuntimeTestPlugin.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class RuntimeTestPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.jst.jsf.common.runtime.tests";
-
- // The shared instance
- private static RuntimeTestPlugin plugin;
-
- /**
- * The constructor
- */
- public RuntimeTestPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static RuntimeTestPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/debug/TestRenderNode.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/debug/TestRenderNode.java
deleted file mode 100644
index 5f5b2e5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/debug/TestRenderNode.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.debug;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.runtime.internal.debug.RenderAttribute;
-import org.eclipse.jst.jsf.common.runtime.internal.debug.RenderNode;
-
-public class TestRenderNode extends TestCase {
-
- private RenderNode _renderNode;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- _renderNode = new RenderNode("org.eclipse.jsf.jst.CompType", "th");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetComponentId()
- {
- assertEquals("org.eclipse.jsf.jst.CompType", _renderNode.getComponentId());
- }
-
- @SuppressWarnings("unchecked")
- public void testGetChildren() {
- RenderNode child1 = new RenderNode("org.eclipse.jsf.jst.CompType2", "a");
- RenderNode child2 = new RenderNode("org.eclipse.jst.jst.CompType3", "br");
-
- _renderNode.getChildren().add(child1);
- _renderNode.getChildren().add(child2);
-
- assertEquals(2, _renderNode.getChildren().size());
- verifySame(child1, (RenderNode) _renderNode.getChildren().get(0));
- verifySame(child2, (RenderNode) _renderNode.getChildren().get(1));
- }
-
- public void testGetRenderedNodeName() {
- assertEquals("th", _renderNode.getRenderedNodeName());
- }
-
- @SuppressWarnings("unchecked")
- public void testGetRenderedAttributes() {
- RenderAttribute attribute1 = new RenderAttribute("id", "blah", null);
-
- _renderNode.getRenderedAttributes().add(attribute1);
-
- RenderAttribute attribute2 = new RenderAttribute("value", "5", "Value");
- _renderNode.getRenderedAttributes().add(attribute2);
-
- verifySame(attribute1, (RenderAttribute)_renderNode.getRenderedAttributes().get(0));
- verifySame(attribute2, (RenderAttribute)_renderNode.getRenderedAttributes().get(1));
- }
-
- public static void verifySame(RenderNode truth, RenderNode check)
- {
- if (truth == check) return;
-
- assertEquals(truth.getComponentId(), check.getComponentId());
- assertEquals(truth.getRenderedNodeName(), check.getRenderedNodeName());
-
- assertEquals(truth.getChildren().size(), check.getChildren().size());
-
- for (int i = 0; i < check.getChildren().size(); i++)
- {
- verifySame((RenderNode)truth.getChildren().get(i), (RenderNode)check.getChildren().get(i));
- }
-
- assertEquals(truth.getRenderedAttributes().size(), check.getChildren().size());
-
- for (int i = 0; i < check.getRenderedAttributes().size(); i++)
- {
- verifySame((RenderAttribute)truth.getRenderedAttributes().get(i),
- (RenderAttribute)check.getRenderedAttributes().get(i));
- }
- }
-
- public static void verifySame(RenderAttribute truth, RenderAttribute check)
- {
- assertEquals(truth.getName(), check.getName());
- assertEquals(truth.getPropertyName(), check.getPropertyName());
- assertEquals(truth.getValue(), check.getValue());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/RuntimeTestUtil.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/RuntimeTestUtil.java
deleted file mode 100644
index ddfb348..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/RuntimeTestUtil.java
+++ /dev/null
@@ -1,890 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject;
-import org.eclipse.jst.jsf.common.runtime.internal.model.bean.DataModelInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSource2Info;
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSourceInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IEditableValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UICommandInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIDataInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIFormInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIInputInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIOutputInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ActionListenerDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ComponentDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.FacetDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorTypeInfo;
-
-public final class RuntimeTestUtil extends Assert
-{
- // expected type info for jsf/core components
- public static final ComponentTypeInfo COMPINFO_PARAM = new ComponentTypeInfo(
- "javax.faces.Parameter", "javax.faces.component.UIParameter",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Parameter",
- null);
-
- public static final ComponentTypeInfo COMPINFO_SELECTITEM = new ComponentTypeInfo(
- "javax.faces.SelectItem", "javax.faces.component.UISelectItem",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.SelectItem",
- null);
-
- public static final ComponentTypeInfo COMPINFO_SELECTITEMS = new ComponentTypeInfo(
- "javax.faces.SelectItems", "javax.faces.component.UISelectItems",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", },
- "javax.faces.SelectItems", null);
-
- public static final ComponentTypeInfo COMPINFO_SUBVIEW = new ComponentTypeInfo(
- "javax.faces.NamingContainer",
- "javax.faces.component.UINamingContainer", new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.NamingContainer",
- "javax.faces.component.StateHolder", },
- "javax.faces.NamingContainer", null);
-
- public static final ComponentTypeInfo COMPINFO_VERBATIM = new ComponentTypeInfo(
- "javax.faces.Output", "javax.faces.component.UIOutput",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Output", "javax.faces.Text");
-
- public static final ComponentTypeInfo COMPINFO_VIEW = new ComponentTypeInfo(
- "javax.faces.ViewRoot", "javax.faces.component.UIViewRoot",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.ViewRoot",
- null);
-
- // expected type info for jsf/html components
- public static final ComponentTypeInfo COMPINFO_COLUMN = new ComponentTypeInfo(
- "javax.faces.Column", "javax.faces.component.UIColumn",
- new String[]
- { "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.StateHolder" }, "javax.faces.Column", null);
- public static final ComponentTypeInfo COMPINFO_COMMAND = new ComponentTypeInfo(
- "javax.faces.HtmlCommandButton",
- "javax.faces.component.html.HtmlCommandButton", new String[]
- { "javax.faces.component.UICommand",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.ActionSource",
- "javax.faces.component.StateHolder" },
- "javax.faces.Command", "javax.faces.Button");
- public static final ComponentTypeInfo COMPINFO_COMMANDLINK = new ComponentTypeInfo(
- "javax.faces.HtmlCommandLink",
- "javax.faces.component.html.HtmlCommandLink",
- new String[]
- { "javax.faces.component.UICommand",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.ActionSource",
- "javax.faces.component.StateHolder" },
- "javax.faces.Command", "javax.faces.Link");
- public static final ComponentTypeInfo COMPINFO_DATATABLE = new ComponentTypeInfo(
- "javax.faces.HtmlDataTable",
- "javax.faces.component.html.HtmlDataTable", new String[]
- { "javax.faces.component.UIData",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.NamingContainer",
- "javax.faces.component.StateHolder", }, "javax.faces.Data",
- "javax.faces.Table");
- public static final ComponentTypeInfo COMPINFO_FORM = new ComponentTypeInfo(
- "javax.faces.HtmlForm", "javax.faces.component.html.HtmlForm",
- new String[]
- { "javax.faces.component.UIForm",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.NamingContainer",
- "javax.faces.component.StateHolder" }, "javax.faces.Form",
- "javax.faces.Form");
- public static final ComponentTypeInfo COMPINFO_GRAPHIC = new ComponentTypeInfo(
- "javax.faces.HtmlGraphicImage",
- "javax.faces.component.html.HtmlGraphicImage", new String[]
- { "javax.faces.component.UIGraphic",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Graphic",
- "javax.faces.Image");
- public static final ComponentTypeInfo COMPINFO_HIDDEN = new ComponentTypeInfo(
- "javax.faces.HtmlInputHidden",
- "javax.faces.component.html.HtmlInputHidden", new String[]
- { "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Input", "javax.faces.Hidden");
- public static final ComponentTypeInfo COMPINFO_SECRET = new ComponentTypeInfo(
- "javax.faces.HtmlInputSecret",
- "javax.faces.component.html.HtmlInputSecret", new String[]
- { "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder" }, "javax.faces.Input",
- "javax.faces.Secret");
- public static final ComponentTypeInfo COMPINFO_INPUTTEXT = new ComponentTypeInfo(
- "javax.faces.HtmlInputText",
- "javax.faces.component.html.HtmlInputText", new String[]
- { "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object" },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder" }, "javax.faces.Input",
- "javax.faces.Text");
- public static final ComponentTypeInfo COMPINFO_INPUTTEXTAREA = new ComponentTypeInfo(
- "javax.faces.HtmlInputTextarea",
- "javax.faces.component.html.HtmlInputTextarea", new String[]
- { "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Input", "javax.faces.Textarea");
- public static final ComponentTypeInfo COMPINFO_MESSAGE = new ComponentTypeInfo(
- "javax.faces.HtmlMessage",
- "javax.faces.component.html.HtmlMessage", new String[]
- { "javax.faces.component.UIMessage",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Message",
- "javax.faces.Message");
- public static final ComponentTypeInfo COMPINFO_MESSAGES = new ComponentTypeInfo(
- "javax.faces.HtmlMessages",
- "javax.faces.component.html.HtmlMessages", new String[]
- { "javax.faces.component.UIMessages",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Messages",
- "javax.faces.Messages");
- public static final ComponentTypeInfo COMPINFO_OUTPUTFORMAT = new ComponentTypeInfo(
- "javax.faces.HtmlOutputFormat",
- "javax.faces.component.html.HtmlOutputFormat", new String[]
- { "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Output", "javax.faces.Format");
- public static final ComponentTypeInfo COMPINFO_OUTPUTLABEL = new ComponentTypeInfo(
- "javax.faces.HtmlOutputLabel",
- "javax.faces.component.html.HtmlOutputLabel", new String[]
- { "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Output", "javax.faces.Label");
- public static final ComponentTypeInfo COMPINFO_OUTPUTLINK = new ComponentTypeInfo(
- "javax.faces.HtmlOutputLink",
- "javax.faces.component.html.HtmlOutputLink", new String[]
- { "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Output", "javax.faces.Link");
- public static final ComponentTypeInfo COMPINFO_OUTPUTTEXT = new ComponentTypeInfo(
- "javax.faces.HtmlOutputText",
- "javax.faces.component.html.HtmlOutputText", new String[]
- { "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.Output", "javax.faces.Text");
- public static final ComponentTypeInfo COMPINFO_PANELGRID = new ComponentTypeInfo(
- "javax.faces.HtmlPanelGrid",
- "javax.faces.component.html.HtmlPanelGrid", new String[]
- { "javax.faces.component.UIPanel",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Panel",
- "javax.faces.Grid");
- public static final ComponentTypeInfo COMPINFO_PANELGROUP = new ComponentTypeInfo(
- "javax.faces.HtmlPanelGroup",
- "javax.faces.component.html.HtmlPanelGroup", new String[]
- { "javax.faces.component.UIPanel",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.StateHolder", }, "javax.faces.Panel",
- "javax.faces.Group");
- public static final ComponentTypeInfo COMPINFO_SELECTBOOLEANCHECKBOX = new ComponentTypeInfo(
- "javax.faces.HtmlSelectBooleanCheckbox",
- "javax.faces.component.html.HtmlSelectBooleanCheckbox",
- new String[]
- { "javax.faces.component.UISelectBoolean",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectBoolean", "javax.faces.Checkbox");
- public static final ComponentTypeInfo COMPINFO_SELECTMANYCHECKBOX = new ComponentTypeInfo(
- "javax.faces.HtmlSelectManyCheckbox",
- "javax.faces.component.html.HtmlSelectManyCheckbox", new String[]
- { "javax.faces.component.UISelectMany",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectMany", "javax.faces.Checkbox");
- public static final ComponentTypeInfo COMPINFO_SELECTMANYLISTBOX = new ComponentTypeInfo(
- "javax.faces.HtmlSelectManyListbox",
- "javax.faces.component.html.HtmlSelectManyListbox", new String[]
- { "javax.faces.component.UISelectMany",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectMany", "javax.faces.Listbox");
- public static final ComponentTypeInfo COMPINFO_SELECTMANYMENU = new ComponentTypeInfo(
- "javax.faces.HtmlSelectManyMenu",
- "javax.faces.component.html.HtmlSelectManyMenu", new String[]
- { "javax.faces.component.UISelectMany",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectMany", "javax.faces.Menu");
- public static final ComponentTypeInfo COMPINFO_SELECTONELISTBOX = new ComponentTypeInfo(
- "javax.faces.HtmlSelectOneListbox",
- "javax.faces.component.html.HtmlSelectOneListbox", new String[]
- { "javax.faces.component.UISelectOne",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectOne", "javax.faces.Listbox");
- public static final ComponentTypeInfo COMPINFO_SELECTONEMENU = new ComponentTypeInfo(
- "javax.faces.HtmlSelectOneMenu",
- "javax.faces.component.html.HtmlSelectOneMenu", new String[]
- { "javax.faces.component.UISelectOne",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectOne", "javax.faces.Menu");
- public static final ComponentTypeInfo COMPINFO_SELECTONERADIO = new ComponentTypeInfo(
- "javax.faces.HtmlSelectOneRadio",
- "javax.faces.component.html.HtmlSelectOneRadio", new String[]
- { "javax.faces.component.UISelectOne",
- "javax.faces.component.UIInput",
- "javax.faces.component.UIOutput",
- "javax.faces.component.UIComponentBase",
- "javax.faces.component.UIComponent", "java.lang.Object", },
- new String[]
- { "javax.faces.component.EditableValueHolder",
- "javax.faces.component.ValueHolder",
- "javax.faces.component.StateHolder", },
- "javax.faces.SelectOne", "javax.faces.Radio");
-
- // default converters
- public static final ConverterTypeInfo CONVERTERINFO_DATETIME = new ConverterTypeInfo(
- "javax.faces.convert.DateTimeConverter", "javax.faces.DateTime");
-
- public static final ConverterTypeInfo CONVERTERINFO_NUMBER = new ConverterTypeInfo(
- "javax.faces.convert.NumberConverter", "javax.faces.Number");
-
- // default validators
- public static final ValidatorTypeInfo VALIDATORINFO_DOUBLERANGE = new ValidatorTypeInfo(
- "javax.faces.validator.DoubleRangeValidator",
- "javax.faces.DoubleRange");
-
- public static final ValidatorTypeInfo VALIDATORINFO_LENGTH = new ValidatorTypeInfo(
- "javax.faces.validator.LengthValidator", "javax.faces.Length");
-
- public static final ValidatorTypeInfo VALIDATORINFO_LONGRANGE = new ValidatorTypeInfo(
- "javax.faces.validator.LongRangeValidator", "javax.faces.LongRange");
-
- // public static final ValidatorTypeInfo VALIDATORINFO_METHODEXPRESSION =
- // new ValidatorTypeInfo(
- // "javax.faces.validator.MethodExpressionValidator ",
- // "javax.faces.LongRange");
-
- @SuppressWarnings("unchecked")
- public static <COMPONENT_T> COMPONENT_T serializeDeserialize(
- final COMPONENT_T object) throws IOException,
- ClassNotFoundException
- {
- final ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- final ObjectOutputStream outStream = new ObjectOutputStream(byteStream);
-
- outStream.writeObject(object);
-
- final ByteArrayInputStream byteArray = new ByteArrayInputStream(
- byteStream.toByteArray());
- final ObjectInputStream inStream = new ObjectInputStream(byteArray);
-
- return (COMPONENT_T) inStream.readObject();
- }
-
- public static void verifyImplicitAdapter(final ViewObject check,
- final Class<?> adapterType, final Object explicitAdapter)
- {
- assertEquals(check, check.getAdapter(adapterType));
- // cannot add explicit adapter if check is already that type
- boolean caughtException = false;
-
- try
- {
- check.addAdapter(adapterType, explicitAdapter);
- }
- catch (IllegalArgumentException iae)
- {
- caughtException = true;
- }
-
- assertTrue(caughtException);
-
- // should be unaffected by the attempt
- assertEquals(check, check.getAdapter(adapterType));
- }
-
- public static void verifySame(final ComponentTypeInfo truth,
- final ComponentTypeInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getClassName(), check.getClassName());
- assertEquals(truth.getComponentFamily(), check.getComponentFamily());
- assertEquals(truth.getComponentType(), check.getComponentType());
- assertEquals(truth.getRenderFamily(), check.getRenderFamily());
-
- verifyArraysSame(truth.getInterfaces(), check.getInterfaces());
- verifyArraysSame(truth.getSuperClasses(), check.getSuperClasses());
- }
-
- public static <T> void verifyArraysSame(T[] expected, T[] check)
- {
- assertEquals("Arrays must be same size", expected.length, check.length);
-
- Set<T> expectedValues = new HashSet<T>();
-
- for (final T e : expected)
- {
- expectedValues.add(e);
- }
-
- for (final T e : check)
- {
- assertTrue("Must contain "+e,expectedValues.contains(e));
- }
- }
-
- public static void verifySame(final DataModelInfo truth,
- final DataModelInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getRowCount(), check.getRowCount());
- assertEquals(truth.getRowIndex(), check.getRowIndex());
-
- // assertEquals(truth.getRowData(), check.getRowData());
- // assertEquals(truth.getWrappedData(), check.getWrappedData());
- }
-
- public static void verifySame(final ViewObject truth, final ViewObject check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getAllDecorators().size(), check.getAllDecorators()
- .size());
-
- for (int i = 0; i < check.getAllDecorators().size(); i++)
- {
- verifySame((Decorator) truth.getAllDecorators().get(i),
- (Decorator) check.getAllDecorators().get(i));
- }
-
- // TODO: hard to check adapters since they are arbitrary
- assertEquals(truth.getAllAdapters().size(), truth.getAllAdapters()
- .size());
- // can at least check that the keys match
- assertEquals(truth.getAllAdapters().keySet(), check.getAllAdapters()
- .keySet());
- }
-
- public static void verifySame(final ComponentInfo truth,
- final ComponentInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ViewObject) truth, (ViewObject) check);
- verifySame(truth.getComponentTypeInfo(), check.getComponentTypeInfo());
-
- assertEquals(truth.getId(), check.getId());
- assertEquals(truth.isRendered(), check.isRendered());
-// assertEquals(truth.getMostSpecificComponentName(), check
-// .getMostSpecificComponentName());
- // assertEquals(truth.getParent(), t);
- // TestRenderNode.verifySame(truth.getRenderNode(),
- // check.getRenderNode());
-
- assertEquals(truth.getChildren().size(), check.getChildren().size());
-
- for (int i = 0; i < check.getChildren().size(); i++)
- {
- final ComponentInfo checkChild = (ComponentInfo) check
- .getChildren().get(i);
- verifySame((ComponentInfo) truth.getChildren().get(i), checkChild);
- }
-
- final List<?> truthGetAllDecorators = truth.getAllDecorators();
- final List<?> checkGetAllDecorators = check.getAllDecorators();
-
- for (int i = 0; i < checkGetAllDecorators.size(); i++)
- {
- final Decorator checkDecorator = (Decorator) checkGetAllDecorators
- .get(i);
-
- verifySame((Decorator) truthGetAllDecorators.get(i), checkDecorator);
- }
- }
-
- public static void verifySame(final UIOutputInfo truth,
- final UIOutputInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentInfo) truth, (ComponentInfo) check);
- verifySame((IValueHolderInfo) truth, (IValueHolderInfo) check);
- }
-
- public static void verifySame(final UIInputInfo truth,
- final UIInputInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((UIOutputInfo) truth, (UIOutputInfo) check);
- verifySame((IEditableValueHolderInfo) truth,
- (IEditableValueHolderInfo) check);
- }
-
- public static void verifySame(final UICommandInfo truth,
- final UICommandInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentInfo) truth, (ComponentInfo) check);
- verifySame((IActionSourceInfo) truth, (IActionSourceInfo) check);
- }
-
- public static void verifySame(final UIFormInfo truth, final UIFormInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentInfo) truth, (ComponentInfo) check);
- assertEquals(truth.isPrependId(), check.isPrependId());
- assertEquals(truth.isSubmitted(), check.isSubmitted());
- }
-
- public static void verifySame(final UIDataInfo truth, final UIDataInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentInfo) truth, (ComponentInfo) check);
-
- assertEquals(truth.getFirst(), check.getFirst());
- assertEquals(truth.getRowCount(), check.getRowCount());
- assertEquals(truth.isRowAvailable(), check.isRowAvailable());
- assertEquals(truth.getRowIndex(), check.getRowIndex());
- assertEquals(truth.getRows(), check.getRows());
- assertEquals(truth.getVar(), check.getVar());
- }
-
- public static void verifySame(final Decorator truth, final Decorator check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getClass(), check.getClass());
-
- verifySame((ViewObject) truth, (ViewObject) check);
-
- if (truth instanceof FacetDecorator)
- {
- verifySame((FacetDecorator) truth, (FacetDecorator) check);
- }
- else if (truth instanceof ActionListenerDecorator)
- {
- verifySame((ActionListenerDecorator) truth,
- (ActionListenerDecorator) check);
- }
- else if (truth instanceof ValidatorDecorator)
- {
- verifySame((ValidatorDecorator) truth, (ValidatorDecorator) check);
- }
- else if (truth instanceof ConverterDecorator)
- {
- verifySame((ConverterDecorator) truth, (ConverterDecorator) check);
- }
- else if (truth instanceof ComponentDecorator)
- {
- verifySame((ComponentDecorator) truth, (ComponentDecorator) check);
- }
- }
-
- private static void verifySame(final ComponentDecorator truth,
- final ComponentDecorator check)
- {
- verifySame(truth.getDecorates(), check.getDecorates());
- }
-
- private static void verifySame(final ActionListenerDecorator truth,
- final ActionListenerDecorator check)
- {
- verifySame((ComponentDecorator) truth, (ComponentDecorator) check);
- }
-
- private static void verifySame(final FacetDecorator truth,
- final FacetDecorator check)
- {
- verifySame((ComponentDecorator) truth, (ComponentDecorator) check);
- assertEquals(truth.getName(), check.getName());
- }
-
- private static void verifySame(final ConverterDecorator truth,
- final ConverterDecorator check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentDecorator) truth, (ComponentDecorator) check);
- }
-
- public static void verifySame(final ConverterTypeInfo truth,
- final ConverterTypeInfo check)
- {
- if (truth == check)
- {
- return;
- }
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getClassName(), check.getClassName());
- assertEquals(truth.getConverterId(), check.getConverterId());
- }
-
- private static void verifySame(final ValidatorDecorator truth,
- final ValidatorDecorator check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((ComponentDecorator) truth, (ComponentDecorator) check);
- }
-
- public static void verifySame(final ValidatorTypeInfo truth,
- final ValidatorTypeInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getClassName(), check.getClassName());
- assertEquals(truth.getValidatorId(), check.getValidatorId());
- }
-
- public static ComponentTypeInfo createComponentTypeInfo()
- {
- return new ComponentTypeInfo("org.eclipse.jst.jsf.test",
- "org.eclipse.jst.jsf.test.ComponentClass",
- "org.eclipse.jst.jsf.test.ComponentFamily",
- "org.eclipse.jst.jsf.test.RenderFamily");
- }
-
- public static void verifySame(final IValueHolderInfo truth,
- final IValueHolderInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getLocalValue(), check.getLocalValue());
- assertEquals(truth.getValue(), check.getValue());
- verifySame(truth.getConverter(), check.getConverter());
- }
-
- public static void verifySame(final IEditableValueHolderInfo truth,
- final IEditableValueHolderInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- verifySame((IValueHolderInfo) truth, (IValueHolderInfo) check);
-
- assertEquals(truth.isImmediate(), truth.isImmediate());
- assertEquals(truth.isLocalSetValue(), truth.isLocalSetValue());
- assertEquals(truth.isRequired(), truth.isRequired());
- assertEquals(truth.isValid(), truth.isValid());
-
- assertEquals(truth.getSubmittedValue(), check.getSubmittedValue());
- assertEquals(truth.getValidator(), check.getValidator());
- assertEquals(truth.getValueChangeListener(), truth
- .getValueChangeListener());
-
- // check validators
- assertEquals(truth.getValidators().size(), check.getValidators().size());
-
- for (int i = 0; i < check.getValidators().size(); i++)
- {
- verifySame((Decorator) truth.getValidators().get(i),
- (Decorator) check.getValidators().get(i));
- }
-
- for (int i = 0; i < check.getValueChangeListeners().size(); i++)
- {
- verifySame((Decorator) truth.getValidators().get(i),
- (Decorator) check.getValidators().get(i));
- }
- }
-
- public static void verifySame(final IActionSourceInfo truth,
- final IActionSourceInfo check)
- {
- if (truth == check)
- {
- return;
- }
-
- // the only way having truth or check null is valid is if
- // the are both null, which we check above
- assertNotNull(truth);
- assertNotNull(check);
-
- assertEquals(truth.getAction(), check.getAction());
- assertEquals(truth.getActionListener(), check.getActionListener());
- assertEquals(truth.isImmediate(), check.isImmediate());
-
- if (truth instanceof IActionSource2Info)
- {
- assertTrue(check instanceof IActionSource2Info);
- assertEquals(((IActionSource2Info) truth).getActionExpression(),
- ((IActionSource2Info) check).getActionExpression());
- }
-
- // check action listener
- assertEquals(truth.getActionListeners().size(), check
- .getActionListeners().size());
-
- for (int i = 0; i < check.getActionListeners().size(); i++)
- {
- verifySame((Decorator) truth.getActionListeners().get(i),
- (Decorator) check.getActionListeners().get(i));
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/TestViewObject.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/TestViewObject.java
deleted file mode 100644
index 74a8197..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/TestViewObject.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model;
-
-import java.io.Serializable;
-import java.util.AbstractList;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator;
-
-public class TestViewObject extends TestCase
-{
-
- private MockAdapter _adapter1;
- private MockAdapter _adapter2;
- private MockDecorator _decorator1;
- private MockDecorator _decorator2;
- private ViewObject _viewObject1;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- _decorator1 = new MockDecorator();
- _decorator2 = new MockDecorator();
- _adapter1 = new MockAdapter();
- _adapter2 = new MockAdapter();
- _viewObject1 = new MockViewObject();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public void testGetAllDecorators()
- {
- // we have not added anything so we should get an empty
- // immutable list
- List<?> allDecorators = _viewObject1.getAllDecorators();
- assertSizeAndImmutable(allDecorators, 0);
-
- // add the decorators; use different keys
- _viewObject1.addDecorator(_decorator1, Decorator.class);
- _viewObject1.addDecorator(_decorator2, String.class);
-
- allDecorators = _viewObject1.getAllDecorators();
-
- assertSizeAndImmutable(allDecorators, 2);
-
- assertTrue(allDecorators.contains(_decorator1));
- assertTrue(allDecorators.contains(_decorator2));
- }
-
- public void testGetAllAdapters()
- {
- // we have not added anything so we should get an empty
- // immutable list
- Map<?, ?> allAdapters = _viewObject1.getAllAdapters();
- assertSizeAndImmutable(allAdapters, 0);
-
- // add the decorators; use different keys
- // _viewObject1.addAdapter(Object.class, _adapter1);
- _viewObject1.addAdapter(MockAdapter.class, _adapter2);
-
- allAdapters = _viewObject1.getAllAdapters();
-
- assertSizeAndImmutable(allAdapters, 1);
-
- //assertEquals(_adapter1, allAdapters.get(Object.class));
- assertEquals(_adapter2, allAdapters.get(MockAdapter.class));
- }
-
- @SuppressWarnings("unchecked")
- public void testGetDecorators()
- {
- // haven't added anything yet, so all should be empty immutable
- assertSizeAndImmutable(_viewObject1.getDecorators(Decorator.class), 0);
- assertSizeAndImmutable(_viewObject1.getDecorators(MockDecorator.class),
- 0);
- assertSizeAndImmutable(_viewObject1.getDecorators(String.class), 0);
-
- // just add using self class key
- _viewObject1.addDecorator(_decorator1);
- _viewObject1.addDecorator(_decorator2);
-
- List<Decorator> decorators = _viewObject1.getDecorators(_decorator1.getClass());
- assertSizeAndImmutable(decorators, 2);
- assertTrue(decorators.contains(_decorator1));
- assertTrue(decorators.contains(_decorator2));
-
- // wrong key
- assertFalse(_viewObject1.removeDecorator(_decorator1, Decorator.class));
- assertSizeAndImmutable(decorators, 2);
-
- // right keys
- assertTrue(_viewObject1.removeDecorator(_decorator1, _decorator1
- .getClass()));
- assertTrue(_viewObject1.removeDecorator(_decorator2, _decorator1
- .getClass()));
- assertSizeAndImmutable(decorators, 0);
-
- // reset view Object and do the same with direct class keys
- _viewObject1 = new MockViewObject();
-
- _viewObject1.addDecorator(_decorator1, MockDecorator.class);
- _viewObject1.addDecorator(_decorator2, MockDecorator.class);
-
- decorators = _viewObject1.getDecorators(_decorator1.getClass());
- assertSizeAndImmutable(decorators, 2);
- assertTrue(decorators.contains(_decorator1));
- assertTrue(decorators.contains(_decorator2));
-
- assertTrue(_viewObject1.removeDecorator(_decorator1, _decorator1
- .getClass()));
- assertTrue(_viewObject1.removeDecorator(_decorator2, _decorator1
- .getClass()));
- assertSizeAndImmutable(decorators, 0);
-
- // store under different keys
- _viewObject1 = new MockViewObject();
-
- _viewObject1.addDecorator(_decorator1, Decorator.class);
- _viewObject1.addDecorator(_decorator2);
-
- // should only be on since _decorator2 was added under its own class
- decorators = _viewObject1.getDecorators(Decorator.class);
- assertSizeAndImmutable(decorators, 1);
- assertTrue(decorators.contains(_decorator1));
-
- decorators = _viewObject1.getDecorators(MockDecorator.class);
- assertSizeAndImmutable(decorators, 1);
- assertTrue(decorators.contains(_decorator2));
- }
-
- public void testNullDecoratorArgs()
- {
- boolean isOk = false;
- // try to add a null decorator
- try
- {
- _viewObject1.addDecorator(null);
- }
- catch (final IllegalArgumentException iae)
- {
- isOk = true;
- }
- assertTrue(isOk);
- assertTrue(_viewObject1.getDecorators(null).isEmpty());
-
- // try to add a decorator with a null class
- isOk = false;
- try
- {
- _viewObject1.addDecorator(_decorator1, null);
- }
- catch (final IllegalArgumentException iae)
- {
- isOk = true;
- }
- assertTrue(isOk);
- assertTrue(_viewObject1.getDecorators(null).isEmpty());
-
- // try to remove null decorator
- isOk = false;
- try
- {
- _viewObject1.removeDecorator(null, Decorator.class);
- }
- catch (final IllegalArgumentException iae)
- {
- isOk = true;
- }
- assertTrue(isOk);
- // try to remove decorator with null key
- isOk = false;
- try
- {
- _viewObject1.removeDecorator(_decorator1, null);
- }
- catch (final IllegalArgumentException iae)
- {
- isOk = true;
- }
- assertTrue(isOk);
- }
-
- public void testGetAdapter()
- {
- // should have no adapters
- assertNull(_viewObject1.getAdapter(MockAdapter.class));
- assertNull(_viewObject1.getAdapter(String.class));
- assertNull(_viewObject1.getAdapter(MockDecorator.class));
-
- // now add the adapters under the same keys
- _viewObject1.addAdapter(MockAdapter.class, _adapter1);
- assertEquals(_adapter1, _viewObject1.getAdapter(MockAdapter.class));
- _viewObject1.addAdapter(MockAdapter.class, _adapter2);
- assertEquals(_adapter2, _viewObject1.getAdapter(MockAdapter.class));
-
- // now try class and sub-class
- _viewObject1.addAdapter(MockDecorator.class, _decorator1);
- assertEquals(_decorator1, _viewObject1.getAdapter(MockDecorator.class));
- assertNull(_viewObject1.getAdapter(Decorator.class));
- assertEquals(_decorator1, _viewObject1
- .removeAdapter(MockDecorator.class));
- // ok to add as a decorator because MockDecorator -> Decorator
- _viewObject1.addAdapter(Decorator.class, _decorator1);
- assertEquals(_decorator1, _viewObject1.getAdapter(Decorator.class));
- // this was removed above and should have been readded
- assertNull(_viewObject1.getAdapter(MockDecorator.class));
- assertEquals(_decorator1, _viewObject1.removeAdapter(Decorator.class));
-
- // test assertion conditions
- boolean assertionOk = false;
- try
- {
- // try to use a null class
- _viewObject1.addAdapter(null, _decorator1);
- }
- catch (final IllegalArgumentException iae)
- {
- assertionOk = true;
- }
-
- assertTrue(assertionOk);
- assertNull(_viewObject1.getAdapter(null));
-
- assertionOk = false;
- // try to use null object
- try
- {
- _viewObject1.addAdapter(Decorator.class, null);
- }
- catch (final IllegalArgumentException iae)
- {
- assertionOk = true;
- }
- assertTrue(assertionOk);
-
- assertionOk = false;
- // try adding a class that is not an instance of the interface key
- try
- {
- _viewObject1.addAdapter(Decorator.class, _adapter1);
- }
- catch (final IllegalArgumentException iae)
- {
- assertionOk = true;
- }
-
- assertTrue(assertionOk);
- }
-
- public void testDefaultAdapterBehaviour()
- {
- // by default, the view object will return its "this" object
- // if it is an instance of a requested class, even if it has
- // this in its adapter list.
- final ViewObject viewObject1 = new MockViewObject();
- final ViewObject listViewObject1 = new MockViewObjectImplementsList();
-
- final List<?> listAdapter = new ArrayList<Object>();
-
- // with the non-list, get adapter will return something only if it is
- // added
- assertNull(viewObject1.getAdapter(List.class));
- viewObject1.addAdapter(List.class, listAdapter);
- assertEquals(listAdapter, viewObject1.getAdapter(List.class));
- assertEquals(listAdapter, viewObject1.removeAdapter(List.class));
- assertNull(viewObject1.getAdapter(List.class));
-
- // however, with the viewObject that is a list...
- assertEquals(listViewObject1, listViewObject1.getAdapter(List.class));
-
- boolean caughtException = false;
- // can't add an interface to an object already of that type
- try
- {
- listViewObject1.addAdapter(List.class, listAdapter);
- }
- catch (final IllegalArgumentException iae)
- {
- caughtException = true;
- }
-
- assertTrue(caughtException);
- // should be unaffected
- assertEquals(listViewObject1, listViewObject1.getAdapter(List.class));
- }
-
- public void testGetDecoratorMap()
- {
- // check contract: getDecoratorMap should never return null
- // and should always return the same map
- final Map<?, ?> map = ((MockViewObject) _viewObject1).getDecoratorMap();
- assertNotNull(map);
- assertEquals(map, ((MockViewObject) _viewObject1).getDecoratorMap());
- assertEquals(map, ((MockViewObject) _viewObject1).getDecoratorMap());
- assertEquals(map, ((MockViewObject) _viewObject1).getDecoratorMap());
- }
-
- public void testGetAdapterMap()
- {
- // check contract: getAdapterMap should never return null
- // and should always return the same map
- final Map<?, ?> map = ((MockViewObject) _viewObject1).getAdapterMap();
- assertNotNull(map);
- assertEquals(map, ((MockViewObject) _viewObject1).getAdapterMap());
- assertEquals(map, ((MockViewObject) _viewObject1).getAdapterMap());
- assertEquals(map, ((MockViewObject) _viewObject1).getAdapterMap());
-
- }
-
- public void testSerializable() throws Exception
- {
- _viewObject1.addDecorator(_decorator1);
- _viewObject1.addDecorator(_decorator2, Decorator.class);
- _viewObject1.addAdapter(MockAdapter.class, _adapter1);
-
- final ViewObject deserialized = RuntimeTestUtil
- .serializeDeserialize(_viewObject1);
-
- RuntimeTestUtil.verifySame(_viewObject1, deserialized);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private void assertSizeAndImmutable(final List list, final int size)
- {
- assertEquals(size, list.size());
- // in the default case, the list should throw an exception
- // on modification
- boolean isListImmutable = false;
- try
- {
- list.add(new MockDecorator());
- }
- catch (final Exception e)
- {
- // success
- isListImmutable = true;
- }
- assertTrue(isListImmutable);
- // since immutable, should not have changed
- assertEquals(size, list.size());
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private void assertSizeAndImmutable(final Map map, final int size)
- {
- assertEquals(size, map.size());
- // in the default case, the list should throw an exception
- // on modification
- boolean isMapImmutable = false;
- try
- {
- map.put(new Object(), new MockDecorator());
- }
- catch (final Exception e)
- {
- // success
- isMapImmutable = true;
- }
- assertTrue(isMapImmutable);
- // since immutable, should not have changed
- assertEquals(size, map.size());
- }
-
- public static class MockViewObject extends ViewObject
- {
- /**
- *
- */
- private static final long serialVersionUID = 5839704536769825171L;
-
- @Override
- public Map<?,?> getAdapterMap()
- {
- return super.getAdapterMap();
- }
-
- @Override
- public Map<?, ?> getDecoratorMap()
- {
- return super.getDecoratorMap();
- }
- }
-
- public static class MockViewObjectImplementsList extends ViewObject
- implements List<Object>
- {
- /**
- *
- */
- private static final long serialVersionUID = -6379202834709723049L;
-
- public boolean add(final Object o)
- {
- return false;
- }
-
- public void add(final int index, final Object element)
- {
-
- }
-
- public boolean addAll(final Collection<?> c)
- {
- return false;
- }
-
- public boolean addAll(final int index, final Collection<?> c)
- {
- return false;
- }
-
- public void clear()
- {
-
- }
-
- public boolean contains(final Object o)
- {
- return false;
- }
-
- public boolean containsAll(final Collection<?> c)
- {
- return false;
- }
-
- public Object get(final int index)
- {
- return null;
- }
-
- public int indexOf(final Object o)
- {
- return 0;
- }
-
- public boolean isEmpty()
- {
- return false;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public Iterator iterator()
- {
- return null;
- }
-
- public int lastIndexOf(final Object o)
- {
- return 0;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public ListIterator listIterator()
- {
- return null;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public ListIterator listIterator(final int index)
- {
- return null;
- }
-
- public boolean remove(final Object o)
- {
- return false;
- }
-
- public Object remove(final int index)
- {
- return null;
- }
-
- public boolean removeAll(final Collection<?> c)
- {
- return false;
- }
-
- public boolean retainAll(final Collection<?> c)
- {
- return false;
- }
-
- public Object set(final int index, final Object element)
- {
- return null;
- }
-
- public int size()
- {
- return 0;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public List subList(final int fromIndex, final int toIndex)
- {
- return null;
- }
-
- public Object[] toArray()
- {
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public Object[] toArray(final Object[] a)
- {
- return null;
- }
-
- }
-
- public static class MockDecorator extends Decorator
- {
-
- /**
- *
- */
- private static final long serialVersionUID = 456684865942628607L;
-
- }
-
- public static class MockAdapter implements Serializable
- {
-
- /**
- *
- */
- private static final long serialVersionUID = 424297135847238931L;
- }
-
- public static class MockAdapterImplementsList extends AbstractList<Object>
- {
-
- @Override
- public Object get(final int index)
- {
- return null;
- }
-
- @Override
- public int size()
- {
- return 0;
- }
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/bean/TestDataModelInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/bean/TestDataModelInfo.java
deleted file mode 100644
index 6ceaf0b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/bean/TestDataModelInfo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.bean;
-
-import java.io.Serializable;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.bean.DataModelInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestDataModelInfo extends TestCase {
-
- private DataModelInfo _dataModelInfo;
- private Object _rowDataObject;
- private Object _wrappedDataObject;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- _rowDataObject = new Object();
- _wrappedDataObject = new Object();
- _dataModelInfo = new DataModelInfo(true, -1, _rowDataObject, -1,
- _wrappedDataObject);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testIsRowAvailable() {
- assertEquals(true, _dataModelInfo.isRowAvailable());
- }
-
- public void testGetRowCount() {
- assertEquals(-1, _dataModelInfo.getRowCount());
- }
-
- public void testGetRowData() {
- assertEquals(_rowDataObject, _dataModelInfo.getRowData());
- }
-
- public void testGetRowIndex() {
- assertEquals(-1, _dataModelInfo.getRowIndex());
- }
-
- public void testGetWrappedData() {
- assertEquals(_wrappedDataObject, _dataModelInfo.getWrappedData());
- }
-
- public void testSerializable() throws Exception {
- DataModelInfo deserialized = RuntimeTestUtil
- .serializeDeserialize(_dataModelInfo);
- RuntimeTestUtil.verifySame(_dataModelInfo, deserialized);
-
- // if the object is not serializable, then the deserialize will be null
- if (_dataModelInfo.getRowData() instanceof Serializable)
- {
- assertEquals(_dataModelInfo.getRowData(), deserialized.getRowData());
- }
- else
- {
- assertNull(deserialized.getRowData());
- }
-
- // if the object is not serializable, then the deserialize will be null
- if (_dataModelInfo.getWrappedData() instanceof Serializable)
- {
- assertEquals(_dataModelInfo.getWrappedData()
- , deserialized.getWrappedData());
- }
- else
- {
- assertNull(deserialized.getWrappedData());
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestActionSource2Info.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestActionSource2Info.java
deleted file mode 100644
index 530e240..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestActionSource2Info.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.behavioural;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ActionSourceInfo2;
-
-import junit.framework.TestCase;
-
-public class TestActionSource2Info extends TestCase {
-
- private ActionSourceInfo2 _actionSource2;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- _actionSource2 = new ActionSourceInfo2("com.Action",
- "com.ActionListener", true, "com.ActionExpression");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetActionExpression() {
- assertEquals("com.ActionExpression", _actionSource2.getActionExpression());
- }
-
- public void testAddActionListener() {
-
- }
-
- public void testGetAction() {
- assertEquals("com.Action", _actionSource2.getAction());
- }
-
- public void testGetActionListener() {
- assertEquals("com.ActionListener", _actionSource2.getActionListener());
- }
-
- public void testGetActionListeners() {
- //fail("Not yet implemented");
- }
-
- public void testIsImmediate() {
- assertTrue(_actionSource2.isImmediate());
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestValueHolderInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestValueHolderInfo.java
deleted file mode 100644
index 2d265d8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestValueHolderInfo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.behavioural;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestValueHolderInfo extends TestCase {
-
- private ComponentInfo _componentInfo;
- private ValueHolderInfo _valueHolder;
- private ConverterTypeInfo _converterTypeInfo;
- private ConverterDecorator _converterDecorator;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _converterTypeInfo = ConverterTypeInfo.UNKNOWN;
- _converterDecorator = new ConverterDecorator(_componentInfo, _converterTypeInfo);
- _componentInfo = ComponentFactory.createComponentInfo("id", null, RuntimeTestUtil
- .createComponentTypeInfo(), true);
- _valueHolder = new ValueHolderInfo(_converterDecorator, "value", "value");
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetValue() {
- assertEquals("value", _valueHolder.getValue());
- }
-
- public void testGetLocalValue() {
- assertEquals("value", _valueHolder.getLocalValue());
- }
-
- public void testGetConverter() {
- RuntimeTestUtil.verifySame(_converterDecorator, _valueHolder.getConverter());
- RuntimeTestUtil.verifySame(_converterTypeInfo, _valueHolder.getConverter().getTypeInfo());
- }
-
- public void testSerializable() throws Exception
- {
- final ValueHolderInfo deserialized =
- RuntimeTestUtil.serializeDeserialize(_valueHolder);
-
- RuntimeTestUtil.verifySame(_valueHolder, deserialized);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/ComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/ComponentTestCase.java
deleted file mode 100644
index ce8c87d..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/ComponentTestCase.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import junit.framework.TestCase;
-
-abstract class ComponentTestCase extends TestCase
-{
- public abstract void testSerializable() throws Exception;
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentInfo.java
deleted file mode 100644
index cf01e70..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentInfo.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.FacetDecorator;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestComponentInfo extends ComponentTestCase {
-
- protected ComponentTypeInfo _componentTypeInfo;
- private ComponentInfo _componentInfo;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _componentTypeInfo = RuntimeTestUtil.createComponentTypeInfo();
-
- _componentInfo = ComponentFactory.createComponentInfo("id", null,
- _componentTypeInfo, true);
- }
-
- public void testToString()
- {
- // just call it for now to get coverage. toString should only
- // be used for diagnostics and dumps on these objects anyway...
- System.out.println(getComponentInfo().toString());
- }
-
- /**
- * @return the main test component info. Override in child tests.
- */
- protected ComponentInfo getComponentInfo() {
- return _componentInfo;
- }
-
- public void testGetId() {
- assertEquals("id", getComponentInfo().getId());
- }
-
- public void testGetComponentTypeInfo() {
- assertEquals(_componentTypeInfo, getComponentInfo()
- .getComponentTypeInfo());
- }
-
- public void testIsRendered() {
- assertTrue(getComponentInfo().isRendered());
- }
-
- public void testChildren() {
- assertTrue(getComponentInfo().getChildren().isEmpty());
- final ComponentInfo componentInfo = ComponentFactory
- .createComponentInfo("id2", getComponentInfo(),
- _componentTypeInfo, true);
- getComponentInfo().addChild(componentInfo);
- assertEquals(1, getComponentInfo().getChildren().size());
- RuntimeTestUtil.verifySame(componentInfo,
- (ComponentInfo) getComponentInfo().getChildren().get(0));
- }
-
- public void testFacet() {
- assertTrue(getComponentInfo().getChildren().isEmpty());
- final ComponentInfo componentInfo = ComponentFactory
- .createComponentInfo("id2", getComponentInfo(),
- _componentTypeInfo, true);
- getComponentInfo().addFacet("header", componentInfo);
- assertEquals(1, getComponentInfo().getChildren().size());
- RuntimeTestUtil.verifySame(componentInfo,
- (ComponentInfo) getComponentInfo().getChildren().get(0));
- assertEquals("header", getComponentInfo().getFacetName(componentInfo));
- assertEquals(componentInfo, getComponentInfo().getFacet("header"));
-
- final List<?> facetDecorators = getComponentInfo().getDecorators(
- ComponentFactory.FACET);
- boolean hasFacet = false;
- for (final Iterator<?> it = facetDecorators.iterator(); it.hasNext();) {
- final FacetDecorator decorator = (FacetDecorator) it.next();
-
- if ("header".equals(decorator.getName())) {
- RuntimeTestUtil.verifySame(componentInfo, decorator
- .getDecorates());
- hasFacet = true;
- break;
- }
- }
- assertTrue(hasFacet);
-
- final List<?> useGetFacets = getComponentInfo().getFacets();
- assertEquals(facetDecorators, useGetFacets);
- }
-
- public void testGetParent() {
- final ComponentInfo componentInfo = ComponentFactory
- .createComponentInfo("id2", getComponentInfo(),
- _componentTypeInfo, true);
- assertEquals(getComponentInfo(), componentInfo.getParent());
- }
-
- @Override
- public void testSerializable() throws Exception {
- final ComponentInfo child = ComponentFactory.createComponentInfo("id2",
- getComponentInfo(), _componentTypeInfo, true);
- getComponentInfo().addChild(child);
-
- final ComponentInfo facet = ComponentFactory.createComponentInfo("id3",
- getComponentInfo(), _componentTypeInfo, true);
- getComponentInfo().addFacet("header", facet);
-
- final ComponentInfo deserialized = RuntimeTestUtil
- .serializeDeserialize(getComponentInfo());
-
- RuntimeTestUtil.verifySame(getComponentInfo(), deserialized);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentTypeInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentTypeInfo.java
deleted file mode 100644
index 9495e04..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentTypeInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
-
-import junit.framework.TestCase;
-
-public class TestComponentTypeInfo extends TestCase {
-
- private ComponentTypeInfo _componentTypeInfo;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- _componentTypeInfo = new ComponentTypeInfo("blah", "Blah", "Blah", "renderBlah");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testToString()
- {
- // for now, just test toString to get coverage. We get enough
- // coverage from the component test classes currently.
- // later we will need to look for more coverage in this classe
- System.out.println(_componentTypeInfo.toString());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUICommandInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUICommandInfo.java
deleted file mode 100644
index b801cee..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUICommandInfo.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ActionSourceInfo2;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UICommandInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ActionListenerDecorator;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestUICommandInfo extends TestComponentInfo {
- private ActionListenerDecorator _actionListener;
- private ActionSourceInfo2 _actionSourceInfo;
- private ActionSourceInfo2 _actionSourceInfo2;
- private UICommandInfo _uiCommand1;
- private UICommandInfo _uiCommand_NoActionSourceAtConstruction;
- private UICommandInfo _uiCommandActionListenerAtConstruction;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- _actionSourceInfo = new ActionSourceInfo2("bean.Action",
- "com.ActionListener", true, "bean.Action");
- _uiCommand1 = ComponentFactory.createUICommandInfo("id", null,
- _componentTypeInfo, _actionSourceInfo, true);
-
- _uiCommand_NoActionSourceAtConstruction = ComponentFactory
- .createUICommandInfo("id2", null, _componentTypeInfo, null,
- false);
-
- _actionSourceInfo2 = new ActionSourceInfo2("bean.Action",
- "com.ActionListener", false, "bean.Action");
- _actionListener = new ActionListenerDecorator(null);
- _actionSourceInfo2.addActionListener(_actionListener);
- _uiCommandActionListenerAtConstruction = ComponentFactory
- .createUICommandInfo("id3", null, _componentTypeInfo,
- _actionSourceInfo2, true);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetActionExpression() {
- assertEquals("bean.Action", _uiCommand1.getActionExpression());
- assertNull(_uiCommand_NoActionSourceAtConstruction
- .getActionExpression());
- }
-
- public void testGetAction() {
- assertEquals("bean.Action", _uiCommand1.getAction());
- assertNull(_uiCommand_NoActionSourceAtConstruction.getAction());
- }
-
- public void testGetActionListener() {
- assertEquals("com.ActionListener", _uiCommand1.getActionListener());
- assertNull(_uiCommand_NoActionSourceAtConstruction.getActionListener());
- }
-
- public void testImplicitAdapter() {
- RuntimeTestUtil.verifyImplicitAdapter(getComponentInfo(),
- ComponentFactory.ACTION_SOURCE, _actionSourceInfo);
- RuntimeTestUtil.verifyImplicitAdapter(getComponentInfo(),
- ComponentFactory.ACTION_SOURCE2, _actionSourceInfo);
- }
-
- public void testGetActionListeners() {
- assertTrue(_uiCommandActionListenerAtConstruction.getActionListeners()
- .contains(_actionListener));
- assertTrue(_uiCommandActionListenerAtConstruction.getDecorators(
- ComponentFactory.ACTION_LISTENER).contains(
- _actionListener));
-
- final ActionListenerDecorator actionListener =
- new ActionListenerDecorator(_uiCommand1);
- _uiCommand1.addActionListener(actionListener);
-
- assertEquals(1, _uiCommand1.getActionListeners().size());
- assertTrue(_uiCommand1.getActionListeners().contains(
- actionListener));
- assertTrue(_uiCommand1.getDecorators(
- ComponentFactory.ACTION_LISTENER).contains(
- actionListener));
- }
-
- public void testIsImmediate() {
- assertTrue(_uiCommand1.isImmediate());
- }
-
- @Override
- public void testSerializable() throws Exception {
- UICommandInfo commandInfo = RuntimeTestUtil
- .serializeDeserialize(_uiCommand1);
- RuntimeTestUtil.verifySame(_uiCommand1, commandInfo);
- }
-
- @Override
- protected ComponentInfo getComponentInfo() {
- return _uiCommand1;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIDataInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIDataInfo.java
deleted file mode 100644
index e6ffc88..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIDataInfo.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import java.io.Serializable;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.bean.DataModelInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.INamingContainerInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIDataInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestUIDataInfo extends TestComponentInfo {
-
- private UIDataInfo _uiData;
- private UIDataInfo _uiDataWithFacetsAtConstruction;
- private DataModelInfo _dataModel;
- private Object _rowData;
- private Object _value;
- private ComponentInfo _header;
- private ComponentInfo _footer;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _dataModel = new DataModelInfo(true, -1, null, 1, null);
- _rowData = new Object();
- _value = new Object();
-
- _uiData = ComponentFactory.createUIDataInfo("id", null,
- _componentTypeInfo, true, _dataModel, 0, null, null, 1, true,
- _rowData, 2, 3, _value, "row");
-
- _header = ComponentFactory.createComponentInfo("header", null,
- _componentTypeInfo, true);
- _footer = ComponentFactory.createComponentInfo("footer", null,
- _componentTypeInfo, true);
- _uiDataWithFacetsAtConstruction = ComponentFactory.createUIDataInfo(
- "id3", null, _componentTypeInfo, true, _dataModel, 3, _footer,
- _header, 2, true, _rowData, 1, 0, _value, "row");
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testFacets()
- {
- // nothing set on construction
- assertNull(_uiData.getFooter());
- assertNull(_uiData.getFacet(UIDataInfo.FACET_NAME_FOOTER));
- assertNull(_uiData.getHeader());
- assertNull(_uiData.getFacet(UIDataInfo.FACET_NAME_HEADER));
- _uiData.addFacet(UIDataInfo.FACET_NAME_FOOTER, _footer);
- _uiData.addFacet(UIDataInfo.FACET_NAME_HEADER, _header);
-
- assertEquals(_footer, _uiData.getFooter());
- assertEquals(_header, _uiData.getHeader());
-
- // set on construction
- assertEquals(_footer, _uiDataWithFacetsAtConstruction.getFooter());
- assertEquals(_header, _uiDataWithFacetsAtConstruction.getHeader());
- }
-
- public void testGetDataModel() {
- RuntimeTestUtil.verifySame(_dataModel, _uiData.getDataModel());
- }
-
- public void testGetFirst() {
- assertEquals(0, _uiData.getFirst());
- }
-
- public void testGetRowCount() {
- assertEquals(1, _uiData.getRowCount());
- }
-
- public void testIsRowAvailable() {
- assertTrue(_uiData.isRowAvailable());
- }
-
- public void testGetRowData() {
- assertEquals(_rowData, _uiData.getRowData());
- }
-
- public void testGetRowIndex() {
- assertEquals(2, _uiData.getRowIndex());
- }
-
- public void testGetRows() {
- assertEquals(3, _uiData.getRows());
- }
-
- public void testGetValue() {
- assertEquals(_value, _uiData.getValue());
- }
-
- public void testGetVar() {
- assertEquals("row", _uiData.getVar());
- }
-
- public void testImplicitAdapter() {
- RuntimeTestUtil.verifyImplicitAdapter(getComponentInfo(),
- ComponentFactory.NAMING_CONTAINER, new INamingContainerInfo() {
-
- /**
- *
- */
- private static final long serialVersionUID = -4727106447103788829L;
- });
- }
-
- @Override
- public ComponentInfo getComponentInfo() {
- return _uiData;
- }
-
- @Override
- public void testSerializable() throws Exception {
- final UIDataInfo deserialized = RuntimeTestUtil
- .serializeDeserialize(_uiData);
-
- RuntimeTestUtil.verifySame(_uiData, deserialized);
-
- // the Objects may not be serializable
-
- // if the object is not serializable, then the deserialize will be null
- if (_uiData.getRowData() instanceof Serializable) {
- assertEquals(_uiData.getRowData(), deserialized.getRowData());
- } else {
- assertNull(deserialized.getRowData());
- }
-
- // if the object is not serializable, then the deserialize will be null
- if (_uiData.getValue() instanceof Serializable) {
- assertEquals(_uiData.getValue(), deserialized.getValue());
- } else {
- assertNull(deserialized.getValue());
- }
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIFormInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIFormInfo.java
deleted file mode 100644
index 6315267..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIFormInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.INamingContainerInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIFormInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestUIFormInfo extends TestComponentInfo {
-
- private UIFormInfo _uiForm1;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _uiForm1 = ComponentFactory.createUIFormInfo
- ("id", null, _componentTypeInfo, true, true, true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testIsPrependId() {
- assertTrue(_uiForm1.isPrependId());
- }
-
- public void testIsSubmitted() {
- assertTrue(_uiForm1.isSubmitted());
- }
-
- @Override
- protected ComponentInfo getComponentInfo() {
- return _uiForm1;
- }
-
- public void testImplicitAdapter() {
- RuntimeTestUtil.verifyImplicitAdapter(getComponentInfo(),
- ComponentFactory.NAMING_CONTAINER, new INamingContainerInfo() {
-
- /**
- *
- */
- private static final long serialVersionUID = -3927882952151032590L;});
- }
-
- @Override
- public void testSerializable() throws Exception {
- final UIFormInfo uiForm = RuntimeTestUtil.serializeDeserialize(_uiForm1);
- RuntimeTestUtil.verifySame(_uiForm1, uiForm);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIInputInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIInputInfo.java
deleted file mode 100644
index fda91ff..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIInputInfo.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.EditableValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIInputInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValueChangeListenerDecorator;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestUIInputInfo extends TestUIOutputInfo {
-
- private UIInputInfo _uiComponentInfo1;
- private UIInputInfo _uiComponentInfo_NoValueHolderAtConstruction;
- private UIInputInfo _uiInput_ValidatorAndListenerAtConstruction;
- private EditableValueHolderInfo _editableValueHolder;
- private EditableValueHolderInfo _editableValueHolder2;
- private ValidatorDecorator _validator;
- private ValueChangeListenerDecorator _valueChangeListener;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _uiComponentInfo_NoValueHolderAtConstruction = ComponentFactory
- .createUIInputInfo("idNoConstruction", null,
- _componentTypeInfo, null, true);
-
- _editableValueHolder = new EditableValueHolderInfo(null, "value",
- "value", true, true, false, true, null, null, null);
-
- _uiComponentInfo1 = ComponentFactory.createUIInputInfo("id", null,
- _componentTypeInfo, _editableValueHolder, true);
-
- _editableValueHolder2 = new EditableValueHolderInfo(null, "value2",
- "value2", true, true, false, true, null, null, null);
- _validator = new ValidatorDecorator(null, ValidatorTypeInfo.UNKNOWN);
- _editableValueHolder2.addValidator(_validator);
- _valueChangeListener = new ValueChangeListenerDecorator(null);
- _editableValueHolder2.addValueChangeListener(_valueChangeListener);
- _uiInput_ValidatorAndListenerAtConstruction = ComponentFactory
- .createUIInputInfo("id", null, _componentTypeInfo,
- _editableValueHolder2, true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testIsValid() {
- assertFalse(_uiComponentInfo1.isValid());
- assertTrue(_uiComponentInfo_NoValueHolderAtConstruction.isValid());
- }
-
- public void testIsImmediate() {
- assertTrue(_uiComponentInfo1.isImmediate());
- assertFalse(_uiComponentInfo_NoValueHolderAtConstruction.isImmediate());
- }
-
- public void testIsRequired() {
- assertTrue(_uiComponentInfo1.isRequired());
- assertFalse(_uiComponentInfo_NoValueHolderAtConstruction.isRequired());
- }
-
- public void testIsLocalValueSet() {
- assertTrue(_uiComponentInfo1.isLocalSetValue());
- assertFalse(_uiComponentInfo_NoValueHolderAtConstruction
- .isLocalSetValue());
- }
-
- public void testValidators() {
- assertTrue(_uiInput_ValidatorAndListenerAtConstruction.getValidators()
- .contains(_validator));
- assertTrue(_uiInput_ValidatorAndListenerAtConstruction.getDecorators(
- ComponentFactory.VALIDATOR).contains(_validator));
-
- final ValidatorDecorator validator = new ValidatorDecorator(
- _uiComponentInfo1,ValidatorTypeInfo.UNKNOWN);
- _uiComponentInfo1.addValidator(validator);
-
- assertEquals(1, _uiComponentInfo1.getValidators().size());
- assertTrue(_uiComponentInfo1.getValidators().contains(validator));
- assertTrue(_uiComponentInfo1.getDecorators(ComponentFactory.VALIDATOR)
- .contains(validator));
- }
-
- public void testValueChangeListener() {
- assertTrue(_uiInput_ValidatorAndListenerAtConstruction
- .getValueChangeListeners().contains(_valueChangeListener));
- assertTrue(_uiInput_ValidatorAndListenerAtConstruction.getDecorators(
- ComponentFactory.VALUE_CHANGE_LISTENER).contains(
- _valueChangeListener));
-
- final ValueChangeListenerDecorator valueChangeListener = new ValueChangeListenerDecorator(
- _uiComponentInfo1);
- _uiComponentInfo1.addValueChangeListener(valueChangeListener);
-
- assertEquals(1, _uiComponentInfo1.getValueChangeListeners().size());
- assertTrue(_uiComponentInfo1.getValueChangeListeners().contains(
- valueChangeListener));
- assertTrue(_uiComponentInfo1.getDecorators(
- ComponentFactory.VALUE_CHANGE_LISTENER).contains(
- valueChangeListener));
-
- }
-
- @Override
- protected ComponentInfo getComponentInfo() {
- return _uiComponentInfo1;
- }
-
- @Override
- public void testImplicitAdapter() {
- super.testImplicitAdapter();
- RuntimeTestUtil.verifyImplicitAdapter(_uiComponentInfo1,
- ComponentFactory.EDITABLE_VALUE_HOLDER, _editableValueHolder);
- }
-
- @Override
- public void testSerializable() throws Exception {
- final UIInputInfo deserialized = RuntimeTestUtil
- .serializeDeserialize(_uiComponentInfo1);
-
- RuntimeTestUtil.verifySame(_uiComponentInfo1, deserialized);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIOutputInfo.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIOutputInfo.java
deleted file mode 100644
index 21feb08..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIOutputInfo.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.component;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ValueHolderInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.UIOutputInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestUIOutputInfo extends TestComponentInfo {
- private UIOutputInfo _uiOutputInfo;
- private UIOutputInfo _uiOutputInfo2;
- private ValueHolderInfo _valueHolder;
- private ValueHolderInfo _valueHolder2;
- private ConverterDecorator _converter;
- private ConverterTypeInfo _converterTypeInfo;
- private UIOutputInfo _uiOutputInfo_NoValueHolderAtConstruction;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _valueHolder = new ValueHolderInfo(null, "value", "value");
- _uiOutputInfo = ComponentFactory.createUIOutputInfo("id", null,
- _componentTypeInfo, _valueHolder, true);
-
- _converterTypeInfo = ConverterTypeInfo.UNKNOWN;
- _converter = new ConverterDecorator(null, _converterTypeInfo);
- _valueHolder2 = new ValueHolderInfo(_converter, "value2", "value2");
- _uiOutputInfo2 = ComponentFactory.createUIOutputInfo("id2", null,
- _componentTypeInfo, _valueHolder2, true);
-
- _uiOutputInfo_NoValueHolderAtConstruction = ComponentFactory
- .createUIOutputInfo("id", null, _componentTypeInfo, null, true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetConverter() {
- // not converter by setup
- assertNull(_uiOutputInfo.getConverter());
- assertTrue(_uiOutputInfo.getDecorators(ComponentFactory.CONVERTER)
- .isEmpty());
-
- // this one has a converter by construction
- assertEquals(_converter, _uiOutputInfo2.getConverter());
- assertEquals(_converter, _uiOutputInfo2.getDecorators(
- ComponentFactory.CONVERTER).get(0));
- assertEquals(_converterTypeInfo, ((ConverterDecorator)_uiOutputInfo2.getDecorators(
- ComponentFactory.CONVERTER).get(0)).getTypeInfo());
- }
-
- public void testGetLocalValue() {
- assertEquals("value", _uiOutputInfo.getLocalValue());
- assertEquals("value2", _uiOutputInfo2.getLocalValue());
- assertNull(_uiOutputInfo_NoValueHolderAtConstruction.getLocalValue());
- }
-
- public void testGetValue() {
- assertEquals("value", _uiOutputInfo.getValue());
- assertEquals("value2", _uiOutputInfo2.getValue());
- assertNull(_uiOutputInfo_NoValueHolderAtConstruction.getValue());
- }
-
- public void testImplicitAdapter() {
- RuntimeTestUtil.verifyImplicitAdapter(getComponentInfo(),
- ComponentFactory.VALUE_HOLDER, _valueHolder);
- }
-
- @Override
- public void testSerializable() throws Exception {
- final UIOutputInfo deserialized = RuntimeTestUtil
- .serializeDeserialize(_uiOutputInfo);
-
- RuntimeTestUtil.verifySame(_uiOutputInfo, deserialized);
-
- final UIOutputInfo deserialized2 = RuntimeTestUtil
- .serializeDeserialize(_uiOutputInfo2);
- RuntimeTestUtil.verifySame(_uiOutputInfo2, deserialized2);
- }
-
- @Override
- protected ComponentInfo getComponentInfo() {
- return _uiOutputInfo;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/decorator/TestComponentDecorator.java b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/decorator/TestComponentDecorator.java
deleted file mode 100644
index 0687525..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/decorator/TestComponentDecorator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.common.runtime.tests.model.decorator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ComponentDecorator;
-import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
-
-public class TestComponentDecorator extends TestCase {
-
- private ComponentTypeInfo _componentTypeInfo;
- private ComponentInfo _decorates;
- private ComponentDecorator _componentDecorator;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- _componentTypeInfo = new ComponentTypeInfo("org.eclipse.jst.jsf.test",
- "org.eclipse.jst.jsf.test.ComponentClass",
- "org.eclipse.jst.jsf.test.ComponentFamily",
- "org.eclipse.jst.jsf.test.RenderFamily");
-
- _decorates = ComponentFactory.createComponentInfo("id", null,
- _componentTypeInfo, true);
-
- _componentDecorator = new MockComponentDecorator(_decorates);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testGetDecorates() {
- assertEquals(_decorates, _componentDecorator.getDecorates());
- }
-
- public void testSerializable() throws Exception {
- final ComponentDecorator deserialized = RuntimeTestUtil
- .serializeDeserialize(_componentDecorator);
-
- RuntimeTestUtil.verifySame(_componentDecorator, deserialized);
- }
-
- public static class MockComponentDecorator extends ComponentDecorator {
- /**
- * serialization id
- */
- private static final long serialVersionUID = 7317971755600134713L;
-
- public MockComponentDecorator(final ComponentInfo decorates) {
- super(decorates);
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.classpath
deleted file mode 100644
index 304e861..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.cvsignore
deleted file mode 100644
index 5e903f8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-temp.folder
-build.xml
-javaCompiler.jsfcontentassisttests.jar.args
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.project b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.project
deleted file mode 100644
index 2e0c667..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsf.contentassist.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/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 0a53ff7..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun May 27 16:01:19 EDT 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 467e199..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Wed Sep 19 11:05:10 PDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-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=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-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.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=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.unusedParameterIncludeDocCommentReference=enabled
-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.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 91707d6..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.jst.jsf.contentassist.tests
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.jst.jsf.contentassist.tests.ContentAssistTestsPlugin
-Bundle-Localization: plugin
-Bundle-ClassPath: jsfcontentassisttests.jar
-Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.junit;bundle-version="3.8.1",
- org.eclipse.jst.jsf.test.util;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.jsp.core;bundle-version="[1.1.0,1.3.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.jsf.common;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jst.jsf.core.tests;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.ecore
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.jst.jsf.contentassist.tests;x-internal:=true
-Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/about.html
deleted file mode 100644
index 04d4782..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 06, 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/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>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.</p>
-
-</body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/build.properties
deleted file mode 100644
index 6afa53a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Oracle Corporation.
-# 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:
-# Oracle - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- jsfcontentassisttests.jar,\
- test.xml,\
- about.html,\
- testdata/,\
- plugin.properties
-source.jsfcontentassisttests.jar = src/
-output.jsfcontentassisttests.jar = bin/
-jars.compile.order = jsfcontentassisttests.jar
-javacSource=1.5
-javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties
deleted file mode 100644
index ceb11e8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 Oracle 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:
-# Oracle Corporation - initial API and implementation
-###############################################################################
-
-Bundle-Name.0=JavaServer Faces Tools - Contentassist Tests Plug-in
-Bundle-Vendor.0=Eclipse.org
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java
deleted file mode 100644
index 6bd7405..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * All tests suite for content assist
- *
- * @author cbateman
- *
- */
-public class AllTests {
- /**
- * @return the test suite
- */
- public static Test suite()
- {
- final TestSuite suite = new TestSuite("Test for org.eclipse.jst.jsf.contentassist");
- //$JUnit-BEGIN$
- suite.addTestSuite(CompletionPrefixTest.class);
- suite.addTestSuite(Test_bug_149224.class);
- suite.addTestSuite(Test_bug_149743.class);
- suite.addTestSuite(TestIdCompletionStrategy.class);
- suite.addTestSuite(TestFunctionCompletionStrategy.class);
- suite.addTestSuite(TestContentAssistParser.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/BaseTestClass.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/BaseTestClass.java
deleted file mode 100644
index a9b1814..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/BaseTestClass.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver;
-import org.eclipse.jst.jsf.core.internal.contentassist.el.ContentAssistParser;
-import org.eclipse.jst.jsf.core.internal.contentassist.el.ContentAssistStrategy;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper.ContextWrapper;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-
-public class BaseTestClass extends TestCase {
-
-
-
-
- /**
- * Uses the docOffset to find the EL text used to generate the proposals on.
- * @param jspFile
- * @param docOffset
- * @param exprOffset
- * @return the proposals
- * @throws Exception
- */
- protected final List<ICompletionProposal> getProposals(final IFile jspFile,
- final int docOffset, final int exprOffset) throws Exception {
- ContextWrapper wrapper = null;
-
- try {
- wrapper = JSFCoreUtilHelper.getDocumentContext(jspFile, docOffset);
-
- final ITextRegionContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
- .getTextRegionResolver(wrapper.getContext());
-
- assertEquals(DOMJSPRegionContexts.JSP_VBL_CONTENT, resolver.getRegionType());
- final String elText = resolver.getRegionText().trim();
- assertNotNull(elText);
-
- final ContentAssistStrategy strategy = ContentAssistParser
- .getPrefix(exprOffset, elText);
- assertNotNull(strategy);
- return strategy.getProposals(wrapper.getContext());
- } finally {
- if (wrapper != null) {
- wrapper.dispose();
- }
- }
- }
-
- /**
- * This method doesn't use the docOffset to find the EL text.
- *
- * @param jspFile
- * @param exprOffset
- * @param elText
- * @return the proposals at 1-based exprOffset into elText
- * @throws Exception
- */
- protected final List<ICompletionProposal> getProposals(final IFile jspFile,
- final int docOffset, final String elText, final int exprOffset) throws Exception
- {
- ContextWrapper wrapper = null;
-
- try {
- wrapper = JSFCoreUtilHelper.getDocumentContext(jspFile, docOffset);
-
-
- final ContentAssistStrategy strategy = ContentAssistParser
- .getPrefix(exprOffset, elText);
- assertNotNull(strategy);
- return strategy.getProposals(wrapper.getContext());
- } finally {
- if (wrapper != null) {
- wrapper.dispose();
- }
- }
-
- }
-
- protected final void applyAndCheck(final IFile jspFile, final int offset, final ICompletionProposal applyMe, final String expectedResult)
- throws Exception {
- ContextWrapper wrapper = null;
-
- try {
- wrapper = JSFCoreUtilHelper.getDocumentContext(jspFile, offset);
-
- applyMe.apply(JSFCoreUtilHelper.getDocumentContext(jspFile, offset).getContext()
- .getStructuredDocument());
-
- final ITextRegionContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
- .getTextRegionResolver(wrapper.getContext());
-
- final String newELText = resolver.getRegionText();
- assertEquals(expectedResult, newELText);
- } finally {
- if (wrapper != null) {
- wrapper.dispose();
- }
- }
- }
-
- /**
- * @param expected
- * @param proposals
- */
- protected void assertDisplayNamesMatch(final Set<String> expected, final List<ICompletionProposal> proposals) {
- assertEquals(expected.size(), proposals.size());
-
- for (final ICompletionProposal proposal : proposals)
- {
- expected.contains(proposal.getDisplayString());
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/CompletionPrefixTest.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/CompletionPrefixTest.java
deleted file mode 100644
index f596e82..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/CompletionPrefixTest.java
+++ /dev/null
@@ -1,671 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.contentassist.el.ContentAssistParser;
-import org.eclipse.jst.jsf.core.internal.contentassist.el.ContentAssistStrategy;
-
-/**
- * @author cbateman
- *
- */
-public class CompletionPrefixTest extends TestCase
-{
- /* empty expresion */
- private final static String empty_ = " ";
-
- /* simple value expressions */
- private final static String xxx = "xxx";
- private final static String xxxDot = "xxx.";
- private final static String xxxYYY = "xxx.yyy";
- private final static String xxxYYYZZZ = "xxx.yyy.zzz";
-
- /* value expressions with comparisons */
- private final static String xxxLtYYY = "xxx < yyy";
- private final static String xxxDotYYYLtZZZ = "xxx.yyy < zzz";
-
- /* expressions using the ['yyy'] map syntax */
- private final static String xxxMapYYY = "xxx['yyy']";
- private final static String xxxMapXXXExpr = "xxx[XXX]";
- private final static String xxxMapXXXDotExpr = "xxx[XXX.]";
- private final static String xxxMapXXXDotYYYExpr = "xxx[XXX.YYY]";
- private final static String xxxMapXXXDotYYYDotExpr = "xxx[XXX.YYY.]";
- private final static String xxxMapXXXDotYYYDotZZZExpr = "xxx[XXX.YYY.ZZZ]";
-
-
-
- /**
- * Test passing null to the parser
- */
- public void testPrefix_null()
- {
- /* Test passing a null expression */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, null);
- assertNull(prefix);
- }
- }
-
- /**
- *
- */
- public void testPrefix_empty_()
- {
- /* Test */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, empty_);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxx()
- {
- /* Test x x x */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxx);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxx);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxx);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxxDot()
- {
- /* Test x x x . */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxDot);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxDot);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxDot);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testSuffix_xxxDot()
- {
- /* Test x x x . */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(5, xxxDot);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxxYYY()
- {
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testFirstSuffix_xxxYYY()
- {
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(5, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(6, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
- /**
- * Test code completion on an EL prefix expression such as prefix.suffix
- */
- public void testPrefix_xxxYYYZZZ()
- {
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
-
- /**
- *
- */
- public void testFirstSuffix_xxxYYYZZZ()
- {
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(5, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(6, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
- }
-
-
- /**
- *
- */
- public void testSecondSuffix_xxxYYYZZZ()
- {
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(9, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx.yyy".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(10, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx.yyy".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y . z z z */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(12, xxxYYYZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx.yyy".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxxLtYYY()
- {
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(7, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "yyy".equals(prefix.getValue()));
- }
-
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "yyy".equals(prefix.getValue()));
- }
-
- /* Test x x x < y y y */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(10, xxxLtYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "yyy".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxxDotYYYLtZZZ()
- {
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(5, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(6, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(11, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "zzz".equals(prefix.getValue()));
- }
-
- /* Test x x x . y y y < z z z */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(14, xxxDotYYYLtZZZ);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "zzz".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testSuffix_xxxDotYYYLtZZZ()
- {
- /* Test x x x . y y y < z z z . */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(15, xxxDotYYYLtZZZ+".");
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "zzz".equals(prefix.getValue()));
- }
- }
-
- /**
- *
- */
- public void testPrefix_xxxMapYYY()
- {
- /* Test x x x [ ' y y y ' ] */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(1, xxxMapYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x [ ' y y y ' ] */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(2, xxxMapYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x [ ' y y y ' ] */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(4, xxxMapYYY);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "xxx".equals(prefix.getValue()));
- }
-
- /* Test x x x [ ' y y y ' ] */
- /* ^ */
-// {
-// ContentAssistStrategy prefix = ContentAssistParser.getPrefix(11, xxxMapYYY);
-//
-// System.out.println(prefix.getValue());
-// assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
-// && "xxx['yyy']".equals(prefix.getValue()));
-// }
-
- /* Test x x x [ ' y y y ' ] . */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(12, xxxMapYYY+".");
-
- System.out.println(prefix.getValue());
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION
- && "xxx['yyy']".equals(prefix.getValue()));
- }
- }
-
- /**
- * Test completion inside an array
- */
- public void testPrefix_xxxMapXXXDotExpr()
- {
- /* Test x x x [ X X X ] */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(5, xxxMapXXXExpr);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "XXX".equals(prefix.getValue()));
- }
-
- /* Test x x x [ X X X ] */
- /* ^ */
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(6, xxxMapXXXExpr);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "XXX".equals(prefix.getValue()));
- }
-
- /* Test x x x [ X X X ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxMapXXXExpr);
-
- assertTrue(prefix.getType() == ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION
- && "XXX".equals(prefix.getValue()));
- }
- }
-
- /**
- * Tests suffix completions on dots inside brackets
- */
- public void testSuffix_xxxMapXXXDotExpr()
- {
- /* Test x x x [ X X X . ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(8, xxxMapXXXDotExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
-
- /* Test x x x [ X X X . ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(9, xxxMapXXXDotExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
- }
-
- /**
- * Test dot completion inside an array expression
- */
- public void testSuffix_xxxMapXXXDotYYYExpr()
- {
- /* Test x x x [ X X X . Y Y Y ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(9, xxxMapXXXDotYYYExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(10, xxxMapXXXDotYYYExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(12, xxxMapXXXDotYYYExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y . ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(12, xxxMapXXXDotYYYDotExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y . ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(13, xxxMapXXXDotYYYDotExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX.YYY", prefix.getValue());
- }
- }
-
- /**
- * Test dot completion on XXX.YYY.ZZZ type expressions
- */
- public void testSuffix_xxxMapXXXDotYYYDotZZZExpr()
- {
- /* Test x x x [ X X X . Y Y Y . Z Z Z] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(13, xxxMapXXXDotYYYDotZZZExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX.YYY", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y . Z Z Z] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(14, xxxMapXXXDotYYYDotZZZExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX.YYY", prefix.getValue());
- }
-
- /* Test x x x [ X X X . Y Y Y . Z Z Z ] */
- /* ^*/
- {
- final ContentAssistStrategy prefix = ContentAssistParser.getPrefix(16, xxxMapXXXDotYYYDotZZZExpr);
-
- assertEquals(ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION, prefix.getType());
- assertEquals("XXX.YYY", prefix.getValue());
- }
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/ContentAssistTestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/ContentAssistTestsPlugin.java
deleted file mode 100644
index 4bda030..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/ContentAssistTestsPlugin.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ContentAssistTestsPlugin extends AbstractUIPlugin {
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.jst.jsf.contentassist.tests";
-
- // The shared instance
- private static ContentAssistTestsPlugin plugin;
-
- /**
- * The constructor
- */
- public ContentAssistTestsPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(final BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ContentAssistTestsPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestContentAssistParser.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestContentAssistParser.java
deleted file mode 100644
index a7d941c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestContentAssistParser.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.internal.contentassist.el.ContentAssistParser;
-import org.eclipse.jst.jsf.core.internal.contentassist.el.SymbolInfo;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class TestContentAssistParser extends BaseTestClass
-{
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
- private IType _myBeanType;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _testEnv = new WebProjectTestEnvironment(getClass().getName()+"_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/faces-config_basic.xml.data",
- "/WEB-INF/faces-config.xml");
- _jspFile = (IFile) _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/basicELExpressions.jsp.data",
- "/basicELExpressions.jsp");
- assertNotNull(_jspFile);
- assertTrue(_jspFile.isAccessible());
-
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(_testEnv);
- final TestFileResource resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/MyBean.java.data");
- jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
- _myBeanType = JavaCore.create(_testEnv.getTestProject()).findType("beans.MyBean");
- assertNotNull(_myBeanType);
- assertTrue(_myBeanType.exists());
- }
-
- public void testSanity() throws Exception
- {
- JSFCoreUtilHelper.assertELSanity(_jspFile, 518, "value", "#{}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 547, "value", "#{ }");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 579, "value", "#{myBean}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 614, "value", "#{myBean.property}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 658, "value", "#{paramValues.foo}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 706, "action", "#{myBean.actionMethod}");
-
- JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "myBean");
- }
-
-
- public void testGetPrefix() {
- // for now there's a enough coverage through TestIdCompletionStrategy
- }
-
- public void testGetSymbolInfo() throws Exception
- {
- assertNull(ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 518).getContext(), 1, null));
- assertNull(ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 518).getContext(), 1, ""));
- assertNull(ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 547).getContext(), 1, " "));
-
- // variable test
- SymbolInfo symbolInfo =
- ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 579).getContext(), 1, "myBean");
- assertNotNull(symbolInfo);
- assertEquals("myBean", symbolInfo.getSymbol().getName());
- assertTrue(symbolInfo.getSymbol() instanceof IBeanInstanceSymbol);
- assertNotNull(symbolInfo.getRelativeRegion());
- assertEquals(6, symbolInfo.getRelativeRegion().getLength());
-
- // property test
- symbolInfo =
- ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 614).getContext(), 8, "myBean.property");
- assertNotNull(symbolInfo);
- assertEquals("property", symbolInfo.getSymbol().getName());
- assertTrue(symbolInfo.getSymbol() instanceof IBeanPropertySymbol);
- assertNotNull(symbolInfo.getRelativeRegion());
-
- // method test
- symbolInfo =
- ContentAssistParser.getSymbolInfo(JSFCoreUtilHelper.getDocumentContext(_jspFile, 706).getContext(), 8, "myBean.actionMethod");
- assertNotNull(symbolInfo);
- assertEquals("actionMethod", symbolInfo.getSymbol().getName());
- assertTrue(symbolInfo.getSymbol() instanceof IBeanMethodSymbol);
- assertNotNull(symbolInfo.getRelativeRegion());
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestFunctionCompletionStrategy.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestFunctionCompletionStrategy.java
deleted file mode 100644
index fc9677a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestFunctionCompletionStrategy.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Basic unit test for class FunctionCompletionStrategy
- * @author cbateman
- *
- */
-public class TestFunctionCompletionStrategy extends BaseTestClass
-{
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
- private IType _myBeanType;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _testEnv = new WebProjectTestEnvironment(getClass().getName()+"_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/faces-config_basic.xml.data",
- "/WEB-INF/faces-config.xml");
- _jspFile = (IFile) _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/basicELExpressions.jsp.data",
- "/basicELExpressions.jsp");
- assertNotNull(_jspFile);
- assertTrue(_jspFile.isAccessible());
-
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(_testEnv);
- final TestFileResource resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/MyBean.java.data");
- jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
- _myBeanType = JavaCore.create(_testEnv.getTestProject()).findType("beans.MyBean");
- assertNotNull(_myBeanType);
- assertTrue(_myBeanType.exists());
- }
-
- /**
- * Sanity check
- */
- public void testSanity() throws Exception
- {
- JSFCoreUtilHelper.assertELSanity(_jspFile, 614, "value", "#{myBean.property}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 658, "value", "#{paramValues.foo}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 706, "action", "#{myBean.actionMethod}");
-
- JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "myBean");
- }
-
- public void testFunctionCompletionStrategy() throws Exception
- {
- // normal value binding only has properties
- List<ICompletionProposal> proposals = getProposals(_jspFile, 614, 8);
-
- {
- final Set<String> propNames = new HashSet<String>();
- propNames.add("property");
- propNames.add("class");
- assertDisplayNamesMatch(propNames, proposals);
- }
-
- // method binding includes methods and also properties
- proposals = getProposals(_jspFile, 706, 8);
-
- {
- final Set<String> propNames = new HashSet<String>();
- propNames.add("property");
- propNames.add("class");
- propNames.add("getProperty");
- propNames.add("actionMethod");
- propNames.add("equals");
- propNames.add("getClass");
- propNames.add("hashCode");
- propNames.add("notify");
- propNames.add("notifyAll");
- propNames.add("toString");
- propNames.add("wait");
- propNames.add("wait");
- propNames.add("wait");
-
- assertEquals(13, proposals.size());
- // have to loop through explicitly here because wait appears
- // in the list thrice, but can only be in the set once
- for (final ICompletionProposal prop : proposals)
- {
- assertTrue(propNames.contains(prop.getDisplayString()));
- }
- }
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestIdCompletionStrategy.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestIdCompletionStrategy.java
deleted file mode 100644
index 3ca76ee..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestIdCompletionStrategy.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class TestIdCompletionStrategy extends BaseTestClass
-{
- private final static Set<String> DISPLAY_NAMES;
-
- static
- {
- final Set<String> displayNames = new HashSet<String>();
- displayNames.add("requestScope");
- displayNames.add("cookie");
- displayNames.add("header");
- displayNames.add("headerValues");
- displayNames.add("param");
- displayNames.add("paramValues");
- displayNames.add("facesContext");
- displayNames.add("view");
- displayNames.add("initParam");
- displayNames.add("sessionScope");
- displayNames.add("applicationScope");
- displayNames.add("myBean");
- DISPLAY_NAMES = Collections.unmodifiableSet(displayNames);
- }
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
- private IType _myBeanType;
-
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _testEnv = new WebProjectTestEnvironment(getClass().getName()+"_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/faces-config_basic.xml.data",
- "/WEB-INF/faces-config.xml");
- _jspFile = (IFile) _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/basicELExpressions.jsp.data",
- "/basicELExpressions.jsp");
- assertNotNull(_jspFile);
- assertTrue(_jspFile.isAccessible());
-
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(_testEnv);
- final TestFileResource resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/MyBean.java.data");
- jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
- _myBeanType = JavaCore.create(_testEnv.getTestProject()).findType("beans.MyBean");
- assertNotNull(_myBeanType);
- assertTrue(_myBeanType.exists());
- }
-
- public void testSanity() throws Exception
- {
- JSFCoreUtilHelper.assertELSanity(_jspFile, 518, "value", "#{}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 547, "value", "#{ }");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 579, "value", "#{myBean}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 614, "value", "#{myBean.property}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 658, "value", "#{paramValues.foo}");
-
- assertEquals(12, DISPLAY_NAMES.size());
- }
-
- public void testGetProposals() {
-
- }
-
- public void testIdCompletionStrategy() throws Exception
- {
- // empty string has all
- assertDisplayNamesMatch(DISPLAY_NAMES, getProposals(_jspFile, 518, "", 1));
-
- // empty whitespace has all
- assertDisplayNamesMatch(DISPLAY_NAMES, getProposals(_jspFile, 547, 1));
-
- // at the very start of a variable, have all
- assertDisplayNamesMatch(DISPLAY_NAMES, getProposals(_jspFile, 579, 1));
- // one character in, only ones matching prefix
- assertDisplayNamesMatch(Collections.singleton("myBean"), getProposals(_jspFile, 579, 2));
-
- // having properties should not change the variable resolved
- assertDisplayNamesMatch(DISPLAY_NAMES, getProposals(_jspFile, 614, 1));
- // one character in, only ones matching prefix
- assertDisplayNamesMatch(Collections.singleton("myBean"), getProposals(_jspFile, 614, 2));
-
- // having properties should not change the variable resolved
- assertDisplayNamesMatch(DISPLAY_NAMES, getProposals(_jspFile, 658, 1));
- // one character in, only ones matching prefix
- final Set<String> paramNames = new HashSet<String>();
- paramNames.add("param");
- paramNames.add("paramValues");
- assertDisplayNamesMatch(Collections.unmodifiableSet(paramNames), getProposals(_jspFile, 658, 2));
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149224.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149224.java
deleted file mode 100644
index 0d98cd5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149224.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import java.io.ByteArrayInputStream;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper.ContextWrapper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Regression test for 149224 -- replace '.' on completion with [] style of
- * map
- *
- * @author cbateman
- *
- */
-public class Test_bug_149224 extends BaseTestClass
-{
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _testEnv = new WebProjectTestEnvironment("Test_bug_149224_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _jspFile = (IFile) _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/bug_149224_1.jsp.data",
- "/bug_149224.jsp");
-
- assertNotNull(_jspFile);
- assertTrue(_jspFile.isAccessible());
-
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(_testEnv);
- TestFileResource resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/MyBean.java.data");
- jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
-
- resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/bug_149224.properties.data");
- jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(resource.toBytes()),
- "bundles", "bundle1.properties");
-
- JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
- }
-
- /**
- * Sanity check
- */
- public void testSanity() throws Exception
- {
- final ContextWrapper wrapper = null;
-
- try
- {
- JSFCoreUtilHelper.assertELSanity(_jspFile, 589, "value", "#{bundle1.}");
- JSFCoreUtilHelper.assertELSanity(_jspFile, 630, "value", "#{bundle1.x}");
- JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "bundle1");
- }
- finally
- {
- if (wrapper != null)
- {
- wrapper.dispose();
- }
- }
- }
-
- /**
- * Test the completion:
- *
- * # { b u n d l e 1 . }
- * ^
- */
- public void testCompletionAtCloseBrace() throws Exception
- {
- final List<ICompletionProposal> proposals =
- getProposals(_jspFile, 589, "bundle1.",9);
- assertNotNull(proposals);
- ICompletionProposal proposal = null;
-
- FIND_ARRAY_PROPOSAL:
- for (final ICompletionProposal findProp : proposals)
- {
- // TODO: this is a bit of a hack. Would rather be able
- // to query for the actual replacement text
- if (findProp.getDisplayString().startsWith("['"))
- {
- proposal = findProp;
- break FIND_ARRAY_PROPOSAL;
- }
- }
-
- assertNotNull(proposal);
-
- applyAndCheck(_jspFile, 589, proposal, "bundle1['prop.with.dots_x']");
- }
-
- /**
- * Test the completion:
- *
- * # { b u n d l e 1 . x }
- * ^
- */
- public void testCompletionAtProperty() throws Exception
- {
- final ContextWrapper wrapper = null;
-
- try
- {
- final List<ICompletionProposal> proposals =
- getProposals(_jspFile, 630, 9);
-
- ICompletionProposal proposal = null;
-
- FIND_ARRAY_PROPOSAL:
- for (final ICompletionProposal completionProposal : proposals) {
- proposal = completionProposal;
- // TODO: this is a bit of a hack. Would rather be able
- // to query for the actual replacement text
- if (proposal.getDisplayString().startsWith("['"))
- {
- break FIND_ARRAY_PROPOSAL;
- }
- }
-
- assertNotNull(proposal);
- applyAndCheck(_jspFile, 630, proposal, "bundle1['prop.with.dots_x']x");
- }
- finally
- {
- if (wrapper != null)
- {
- wrapper.dispose();
- }
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149743.java b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149743.java
deleted file mode 100644
index 3d5c5d8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149743.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-package org.eclipse.jst.jsf.contentassist.tests;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Test a situation where no expected return type information is
- * available for a tag.
- *
- * @author cbateman
- *
- */
-public class Test_bug_149743 extends BaseTestClass
-{
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _testEnv = new WebProjectTestEnvironment("Test_bug_149743_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/faces-config_bug149743.xml.data",
- "/WEB-INF/faces-config.xml");
- _jspFile = (IFile) _testEnv.loadResourceInWebRoot(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/bug_149743.jsp.data",
- "/bug_149743.jsp");
-
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(_testEnv);
- final TestFileResource resource = new TestFileResource();
- resource.load(ContentAssistTestsPlugin.getDefault().getBundle(),
- "/testdata/MyBean.java.data");
- jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
- }
-
- /**
- * Sanity check
- */
- public void testSanity() throws Exception
- {
- JSFCoreUtilHelper.assertELSanity(_jspFile, 529, "value" ,"#{myBean.property}");
- JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "myBean");
- }
-
- /**
- * Checks the scenario for Test_bug_149743
- */
- public void testCompletionProposalsForId() throws Exception
- {
- final List<ICompletionProposal> proposals =
- getProposals(_jspFile, 529, 8);
- assertEquals(2, proposals.size());
- final Set<String> names = new HashSet<String>();
-
- for (final ICompletionProposal proposal : proposals)
- {
- names.add(proposal.getDisplayString());
- }
- assertTrue(names.contains("class"));
- assertTrue(names.contains("property"));
- }
-
-
-
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/test.xml
deleted file mode 100644
index e59e084..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<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}\..\.."/> -->
- <echo message="basedir ${basedir}" />
- <echo message="eclipse place ${eclipse-home}" />
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.jst.jsf.contentassist.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/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.eclipse.jst.jsf.contentassist.tests.*xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="jsf-folder" value="${eclipse-home}/jsf_folder"/>
- <delete dir="${jsf-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jsf-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jst.jsf.contentassist.tests.AllTests" />
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- </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.eclipse.jst.jsf.contentassist.tests.*xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBean.java.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBean.java.data
deleted file mode 100644
index 7de1772..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBean.java.data
+++ /dev/null
@@ -1,13 +0,0 @@
-package beans;
-
-public class MyBean {
- public String[] getProperty()
- {
- return new String[]{"blah"};
- }
-
- public String actionMethod()
- {
- return "foo";
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBeanSettable.java.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBeanSettable.java.data
deleted file mode 100644
index 7edb245..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBeanSettable.java.data
+++ /dev/null
@@ -1,171 +0,0 @@
-package beans;
-
-import java.math.BigInteger;
-import java.math.BigDecimal;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-public class MyBeanSettable
-{
- public String getStringProperty()
- {
- return "";
- }
-
- public void setStringProperty(String stringProp)
- {
-
- }
-
- public double getDoubleProperty()
- {
- return 1.04;
- }
-
- public void setDoubleProperty(double newValue)
- {
- // doesn't matter what happens here
- }
-
- public void setIntegerProperty(int integerProp)
- {
-
- }
-
- public int getIntegerProperty()
- {
- return 0;
- }
-
- public boolean getBooleanProperty()
- {
- return false;
- }
-
- public void setBooleanProperty(boolean booleanProp)
- {
-
- }
-
- public Map getMapProperty()
- {
- return Collections.EMPTY_MAP;
- }
-
- public void setMapProperty(Map mapProperty)
- {
-
- }
-
- public void setStringArrayProperty(String[] stringArrayProperty)
- {
-
- }
-
- public String[] getStringArrayProperty()
- {
- return new String[0];
- }
-
- public Collection getCollectionProperty()
- {
- return Collections.EMPTY_LIST;
- }
-
- public void setCollectionProperty(Collection collectionProp)
- {
-
- }
-
- public void setListProperty(List listProp)
- {
-
- }
-
- public List getListProperty()
- {
- return Collections.EMPTY_LIST;
- }
-
- public void setComparablePropety(Comparable comp)
- {
-
- }
-
- public Comparable getComparableProperty()
- {
- return null;
- }
-
- public MyBeanSettable recursiveCall()
- {
- return this;
- }
-
- public String getWritableStringProperty()
- {
- return "";
- }
-
- public void setWritableStringProperty(String newValue)
- {
- ;
- }
-
- public BigInteger getBigIntegerProperty()
- {
- return BigInteger.ONE;
- }
-
- public void setBigIntegerProperty(BigInteger newValue)
- {
- // doesn't matter what happens here
- }
-
- public BigDecimal getBigDoubleProperty()
- {
- return new BigDecimal(0.5);
- }
-
- public void setBigDoubleProperty(BigDecimal newValue)
- {
- // doesn't matter what happens here
- }
-
- public void validate(FacesContext facesContext,
- UIComponent component,
- Object object
- )
- {
-
- }
-
- public void validate2(FacesContext facesContext,
- UIComponent component,
- Object[] object
- )
- {
-
- }
-
- public MyBeanSettable getSelf()
- {
- return this;
- }
-
- public boolean isIsStyleBooleanProperty()
- {
- return false;
- }
-
- public void setIsStyleBooleanProperty(boolean styleProp)
- {
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/basicELExpressions.jsp.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/basicELExpressions.jsp.data
deleted file mode 100644
index aba8370..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/basicELExpressions.jsp.data
+++ /dev/null
@@ -1,28 +0,0 @@
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <f:view>
- <h1>JSP Page</h1>
- <!-- no errors -->
- <h:outputText value="#{}"/>
- <h:outputText value="#{ }"/>
- <h:outputText value="#{myBean}"/>
- <h:outputText value="#{myBean.property}"/>
- <h:outputText value="#{paramValues.foo}"/>
- <h:commandButton action="#{myBean.actionMethod}"/>
- </f:view>
- </body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224.properties.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224.properties.data
deleted file mode 100644
index d29c89a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224.properties.data
+++ /dev/null
@@ -1,4 +0,0 @@
-prop1_x=foo
-prop2_x=bar
-prop.with.dots_x=foo.bar
-anotherprop=blah \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224_1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224_1.jsp.data
deleted file mode 100644
index aba64ef..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224_1.jsp.data
+++ /dev/null
@@ -1,25 +0,0 @@
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <f:view>
- <f:loadBundle basename="bundles.bundle1" var="bundle1"/>
- <h1>JSP Page</h1>
- <!-- no errors -->
- <h:outputText value="#{bundle1.}"/>
- <h:outputText value="#{bundle1.x}"/>
- </f:view>
- </body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149743.jsp.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149743.jsp.data
deleted file mode 100644
index 5a68a6c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149743.jsp.data
+++ /dev/null
@@ -1,23 +0,0 @@
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <f:view>
- <h1>JSP Page</h1>
- <!-- no errors -->
- <f:selectItems value="#{myBean.property}"/>
- </f:view>
- </body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_basic.xml.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_basic.xml.data
deleted file mode 100644
index e4a475b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_basic.xml.data
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-<faces-config>
- <managed-bean>
- <managed-bean-name>
- myBean</managed-bean-name>
- <managed-bean-class>
- beans.MyBean</managed-bean-class>
- <managed-bean-scope>
- none</managed-bean-scope>
- </managed-bean>
-
-</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_bug149743.xml.data b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_bug149743.xml.data
deleted file mode 100644
index 5db9cf5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_bug149743.xml.data
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-<faces-config>
- <managed-bean>
- <managed-bean-name>
- myBean</managed-bean-name>
- <managed-bean-class>
- beans.MyBean</managed-bean-class>
- <managed-bean-scope>
- none</managed-bean-scope>
- </managed-bean>
-
-</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.classpath
deleted file mode 100644
index 304e861..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.cvsignore
deleted file mode 100644
index 3927467..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-@dot
-temp.folder
-build.xml
-javaCompiler...args
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.project b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.project
deleted file mode 100644
index 28a1842..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsf.context.symbol.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/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 9c7d20e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun May 27 16:01:57 EDT 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 444ca5c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Tue May 15 17:20:53 PDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-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.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=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=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-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.unusedParameterIncludeDocCommentReference=enabled
-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.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 2be44a3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.jsf.context.symbol.tests; singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.jsf.context.symbol.tests;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.junit;bundle-version="3.8.1",
- org.eclipse.jst.jsf.test.util;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.jsf.core.tests;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.jsf.common;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.jsf.core;bundle-version="1.1.103"
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.jst.jsf.context.symbol.tests.ContextSymbolTestPlugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/about.html
deleted file mode 100644
index 04d4782..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 06, 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/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>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.</p>
-
-</body>
-</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/build.properties
deleted file mode 100644
index e5db9e1..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 Oracle 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:
-# Oracle Corporation - initial API and implementation
-###############################################################################
-
-jars.compile.order = .
-javacSource=1.5
-javacTarget=1.5
-source.. = src/
-output.. = bin/
-bin.includes = .,\
- META-INF/,\
- test.xml,\
- testdata/,\
- plugin.properties,\
- about.html
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/plugin.properties
deleted file mode 100644
index a584e7e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/plugin.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 Oracle 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:
-# Oracle Corporation - initial API and implementation
-###############################################################################
-
-
-# ====================================================================
-# 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=JavaServer Faces Tools - Context Symbol Tests
-providerName=Eclipse.org
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java
deleted file mode 100644
index 4246a4b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Test suite for all context.symbol tests
- *
- * @author cbateman
- *
- */
-public class AllTests {
- /**
- * @return the all tests suite
- */
- public static Test suite()
- {
- TestSuite suite = new TestSuite("Test for base symbols framework");
- //$JUnit-BEGIN$
- suite.addTestSuite(TestIJavaTypeDescriptor2.class);
- suite.addTestSuite(TestIPropertySymbolItemProvider.class);
- suite.addTestSuite(TestTypeCoercion.class);
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=217135
- // suite.addTestSuite(TestIJavaTypeDescriptor2_ChangeStability.class);
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ContextSymbolTestPlugin.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ContextSymbolTestPlugin.java
deleted file mode 100644
index 51f59d2..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ContextSymbolTestPlugin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ContextSymbolTestPlugin extends AbstractUIPlugin
-{
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.jst.jsf.context.symbol.tests";
-
- // The shared instance
- private static ContextSymbolTestPlugin plugin;
-
- /**
- * The constructor
- */
- public ContextSymbolTestPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ContextSymbolTestPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ModelBaseTestCase.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ModelBaseTestCase.java
deleted file mode 100644
index f91472f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ModelBaseTestCase.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
-import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
-import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.osgi.framework.Bundle;
-
-/**
- * @author cbateman
- *
- */
-public class ModelBaseTestCase extends TestCase
-{
- /**
- * The test environment for a JavaProject
- */
- protected JDTTestEnvironment _jdtTestEnvironment;
-
- /**
- * The base source folder name for Java classes
- */
- protected final static String srcFolderName = "src";
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
-
- final WebProjectTestEnvironment projectTestEnvironment =
- new WebProjectTestEnvironment("TestJDTBeanIntrospectorProject_"+getName());
- projectTestEnvironment.createProject(true);
-
- _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
- }
-
- /**
- * @param bundle
- * @param fileName
- * @param packageName
- * @param beanClassName
- * @throws Exception
- */
- protected void loadSourceClass(final Bundle bundle, final String fileName, final String packageName, final String beanClassName) throws Exception
- {
- TestFileResource codeRes = new TestFileResource();
- codeRes.load(bundle, fileName);
- String code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName, beanClassName, code);
- assertNotNull(_jdtTestEnvironment.getJavaProject().findType(packageName+"."+beanClassName));
- }
-
- /**
- * @param bundle
- * @param fileName
- * @param packageName
- * @param beanClassName
- * @param properties
- * @return a bean instance set up for the indicated test class
- * @throws Exception
- */
- protected IBeanInstanceSymbol setupBeanProperty(Bundle bundle, String fileName, String packageName, String beanClassName, Map<String, IPropertySymbol> properties) throws Exception
- {
- loadSourceClass(bundle, fileName, packageName, beanClassName);
-
- final IType testBean1Type =
- _jdtTestEnvironment.getJavaProject().findType(packageName+"."+beanClassName);
- assertNotNull(testBean1Type);
-
- final IJavaTypeDescriptor2 testBeanDescriptor =
- SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
- testBeanDescriptor.setType(testBean1Type);
-
- IBeanInstanceSymbol bean =
- SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
- bean.setTypeDescriptor(testBeanDescriptor);
- bean.setName(beanClassName);
- populatePropertyMap(bean, properties);
- return bean;
- }
-
- protected void populatePropertyMap(IBeanInstanceSymbol bean, Map<String, IPropertySymbol> properties)
- {
- List<?> propertyList = bean.getProperties();
- for(final Iterator<?> it = propertyList.iterator(); it.hasNext();)
- {
- final IPropertySymbol property = (IPropertySymbol) it.next();
- properties.put(property.getName(), property);
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2.java
deleted file mode 100644
index 20707a3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2.java
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
-import org.eclipse.jst.jsf.context.symbol.IObjectSymbol;
-import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
-import org.eclipse.jst.jsf.context.symbol.SymbolPackage;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-
-/**
- * Test the IJavaTypeDescriptor
- *
- * @author cbateman
- *
- */
-public class TestIJavaTypeDescriptor2 extends ModelBaseTestCase
-{
- private Map _beanProperties;
- private Map _beanSubclassProperties;
- private Map<String, IBeanMethodSymbol> _beanMethods;
- private Map _beanMethodsSubclass;
- private Map<String, IPropertySymbol> _genericProperties;
-
- private IBeanInstanceSymbol _testBean1Symbol;
- private IBeanInstanceSymbol _testBean1SubclassSymbol;
- private IBeanInstanceSymbol _testBean2Symbol;
- private IBeanInstanceSymbol _testBean2SubclassSymbol;
-
- private final static String packageName1 = "com.test";
- private final static String testBeanName1 = "TestBean1";
- private final static String testBean1Sig = "L"+packageName1+"."+testBeanName1+";";
- private final static String testBeanSubclass1 = "TestBean1Subclass";
- private final static String testBeanName2 = "TestBean2";
- private final static String testBean2Subclass = "TestBean2Subclass";
-
- private final static String overloadedMethodName = "overloadedMethod";
-
- @SuppressWarnings("unchecked")
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // load ITestBean2 first due to later dependencies
- loadSourceClass(ContextSymbolTestPlugin.getDefault().getBundle(), "/testdata/ITestBean2.java.data", packageName1, "ITestBean2");
-
- // load another bean first since others have a dependency on on it
- loadSourceClass(TestsPlugin.getDefault().getBundle(), "/testfiles/AnotherBean.java.data", packageName1, "AnotherBean");
- assertNotNull(_jdtTestEnvironment.getJavaProject().findType(packageName1+"."+"AnotherBean"));
-
- _beanProperties = new HashMap();
- _testBean1Symbol =
- setupBeanProperty(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data", packageName1,
- testBeanName1, _beanProperties);
-
- _beanSubclassProperties = new HashMap();
- _testBean1SubclassSymbol =
- setupBeanProperty(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1Subclass.java.data", packageName1,
- testBeanSubclass1, _beanSubclassProperties);
-
- _genericProperties = new HashMap<String, IPropertySymbol>();
-
- setupBeanProperty(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/TestBeanWithGenericProperties.java.data", packageName1,
- "TestBeanWithGenericProperties",_genericProperties);
-
- _beanMethods = new HashMap();
- _testBean2Symbol =
- setupBeanMethods("/testdata/TestBean2.java.data", testBeanName2, _beanMethods);
-
- _beanMethodsSubclass = new HashMap();
- _testBean2SubclassSymbol =
- setupBeanMethods("/testdata/TestBean2Subclass.java.data", testBean2Subclass, _beanMethodsSubclass);
- }
-
- private IBeanInstanceSymbol setupBeanMethods(String fileName, String beanClassName, Map<String, IBeanMethodSymbol> methods) throws Exception
- {
- loadSourceClass(ContextSymbolTestPlugin.getDefault().getBundle(), fileName, packageName1, beanClassName);
-
- final IType testBean1Type =
- _jdtTestEnvironment.getJavaProject().findType(packageName1+"."+beanClassName);
- assertNotNull(testBean1Type);
-
- final IJavaTypeDescriptor2 testBeanDescriptor =
- SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
- testBeanDescriptor.setType(testBean1Type);
-
- IBeanInstanceSymbol bean =
- SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
- bean.setTypeDescriptor(testBeanDescriptor);
- bean.setName(beanClassName);
- List methodList = bean.getMethods();
- for(final Iterator it = methodList.iterator(); it.hasNext();)
- {
- final IBeanMethodSymbol method = (IBeanMethodSymbol) it.next();
-
- // exclude the overloaded methods as these are handled separately
- if (!overloadedMethodName.equals(method.getName()))
- {
- methods.put(method.getName(), method);
- }
- }
-
- return bean;
- }
-
- /**
- * Basic high-level sanity check on the generate properties map
- */
- public void testMapSanity()
- {
- final int NUM_PROPS_IN_BEAN = 15; // includes getClass on parent java.lang.Object
- assertEquals("Check extra or missing properties",NUM_PROPS_IN_BEAN, _beanProperties.size());
- assertEquals("Check extra or missing properties",NUM_PROPS_IN_BEAN+1, _beanSubclassProperties.size());
- assertEquals("Check extra or missing methods",12,_beanMethods.size()); // includes java.lang.Object methods
- assertEquals("Check extra or missing methods",13,_beanMethodsSubclass.size());
- assertEquals("Check extra or missing methods", 5, _genericProperties.size());
- }
-
- /**
- *
- */
- public void testStringProp1()
- {
- testStringProp1(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testStringProp1SubClass()
- {
- testStringProp1(_beanSubclassProperties);
- }
-
- /**
- * @param properties
- */
- private void testStringProp1(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("stringProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a String",
- "Ljava.lang.String;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * test property
- */
- public void testBooleanIsProp1()
- {
- testBooleanIsProp1(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testBooleanIsProp1SubClass()
- {
- testBooleanIsProp1(_beanSubclassProperties);
- }
-
-
- /**
- * @param properties
- */
- private void testBooleanIsProp1(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("booleanIsProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean",
- Signature.SIG_BOOLEAN, property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testBooleanIsProp2()
- {
- testBooleanIsProp2(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testBooleanIsProp2SubClass()
- {
- testBooleanIsProp2(_beanSubclassProperties);
- }
-
- /**
- * @param properties
- */
- private void testBooleanIsProp2(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("booleanIsProp2");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean",
- Signature.SIG_BOOLEAN, property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testNotBooleanIsProp1()
- {
- testNotBooleanIsProp1(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testNotBooleanIsProp1SubClass()
- {
- testNotBooleanIsProp1(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testNotBooleanIsProp1(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("notBooleanIsProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean",
- Signature.SIG_BOOLEAN, property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testStringProperty2()
- {
- testStringProperty2(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testStringProperty2SubClass()
- {
- testStringProperty2(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testStringProperty2(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("stringProperty2");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a String",
- "Ljava.lang.String;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testReadonlyStringProperty()
- {
- testReadonlyStringProperty(_beanProperties);
- }
-
- /**
- *
- */
- private void testReadonlyStringProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("readonlyStringProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a String",
- "Ljava.lang.String;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testReadonlyBooleanProperty()
- {
- testReadonlyBooleanProperty(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testReadonlyBooleanPropertySubClass()
- {
- testReadonlyBooleanProperty(_beanSubclassProperties);
- }
-
- /**
- * test inhertied
- */
- public void testReadonlyStringPropertySubClass()
- {
- testReadonlyStringProperty(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testReadonlyBooleanProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("readonlyBooleanProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a boolean",
- Signature.SIG_BOOLEAN, property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testStringArrayProperty()
- {
- testStringArrayProperty(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testStringArrayPropertySubClass()
- {
- testStringArrayProperty(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testStringArrayProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("stringArrayProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
-
- ITypeDescriptor typeDesc = property.getTypeDescriptor();
- assertEquals("Signature must be for a String[]",
- Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), typeDesc.getTypeSignature());
- assertEquals(true, typeDesc.isArray());
- assertEquals(1, ((IJavaTypeDescriptor2)typeDesc).getArrayCount());
- }
-
- /**
- *
- */
- public void testIntArrayProperty()
- {
- testIntArrayProperty(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testIntArrayPropertySubClass()
- {
- testIntArrayProperty(_beanSubclassProperties);
- }
-
- private void testIntArrayProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("intArrayProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
-
- ITypeDescriptor typeDesc = property.getTypeDescriptor();
- assertEquals("Signature must be for a int[]",
- Signature.createArraySignature(Signature.SIG_INT, 1), typeDesc.getTypeSignature());
- assertEquals(true, typeDesc.isArray());
- assertEquals(1, ((IJavaTypeDescriptor2)typeDesc).getArrayCount());
- }
-
- /**
- *
- */
- public void testArrayOfArrayOfStringProperty()
- {
- testArrayOfArrayOfStringProperty(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testArrayOfArrayOfStringPropertySubClass()
- {
- testArrayOfArrayOfStringProperty(_beanSubclassProperties);
- }
-
- private void testArrayOfArrayOfStringProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("arrayOfArrayOfStringProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
-
- ITypeDescriptor typeDesc = property.getTypeDescriptor();
- assertEquals("Signature must be for a String[][]",
- Signature.createArraySignature(TypeConstants.TYPE_STRING, 2), typeDesc.getTypeSignature());
- assertEquals(true, typeDesc.isArray());
- assertEquals(2, ((IJavaTypeDescriptor2)typeDesc).getArrayCount());
- }
-
- /**
- *
- */
- public void testCollectionProperty()
- {
- testCollectionProperty(_beanProperties);
- }
-
- /**
- * test inhertited
- */
- public void testCollectionPropertySubClass()
- {
- testCollectionProperty(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testCollectionProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("collectionProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a Collection",
- "Ljava.util.Collection;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testMapProperty()
- {
- testMapProperty(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testMapPropertySubClass()
- {
- testMapProperty(_beanProperties);
- }
-
- /**
- *
- */
- private void testMapProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("mapProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a Map",
- "Ljava.util.Map;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- *
- */
- public void testWriteonlyStringProperty()
- {
- testWriteonlyStringProperty(_beanProperties);
- }
-
- /**
- * inherited
- */
- public void testWriteonlyStringPropertySubClass()
- {
- testWriteonlyStringProperty(_beanSubclassProperties);
- }
-
- /**
- *
- */
- private void testWriteonlyStringProperty(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("writeonlyStringProperty");
- assertNotNull(property);
-
- assertFalse("No getter for this property", property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a String",
- "Ljava.lang.String;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * test a locally defined bean type
- */
- public void testAnotherBean()
- {
- testAnotherBean(_beanProperties);
- }
-
- /**
- * test inherited
- */
- public void testAnotherBeanSubClass()
- {
- testAnotherBean(_beanSubclassProperties);
- }
-
- private void testAnotherBean(Map properties)
- {
- IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("anotherBean");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue("No setter for this property",property.isWritable());
- assertEquals("Signature must be for a com.test.AnotherBean",
- "Lcom.test.AnotherBean;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * Test bean.anotherBean.property for TestBean1
- */
- public void testPropertyOfProperty()
- {
- testPropertyOfProperty(_beanProperties);
- }
-
- /**
- * Test in inherited anotherBean property
- */
- public void testPropertyOfPropertyInSubclass()
- {
- testPropertyOfProperty(_beanSubclassProperties);
- }
-
- private void testPropertyOfProperty(Map properties)
- {
- final IBeanPropertySymbol property =
- (IBeanPropertySymbol) properties.get("anotherBean");
- assertNotNull(property);
-
- boolean foundNestedProperty = false;
-
- final List anotherBeanProps =
- property.getTypeDescriptor().getProperties();
- assertTrue("The nested properties has properties", anotherBeanProps.size()>0);
-
- SEARCH_FOR_NESTED_PROPERTY:for
- (final Iterator it = anotherBeanProps.iterator(); it.hasNext();)
- {
- final IBeanPropertySymbol nestedProp = (IBeanPropertySymbol) it.next();
-
- // looking for a property of AnotherBean called property
- if ("property".equals(nestedProp.getName()))
- {
- foundNestedProperty = true;
- break SEARCH_FOR_NESTED_PROPERTY;
- }
- }
-
- assertTrue(foundNestedProperty);
- }
-
- /**
- * Test a property that's in the sub-class but not the parent
- */
- public void testSubclassOnly()
- {
- final String inheritedPropertyName = "locallyDefinedProperty";
-
- // ensure we didn't some how put an inherited property into the
- // parent
- assertNull(_beanProperties.get(inheritedPropertyName));
- IBeanPropertySymbol property = (IBeanPropertySymbol) _beanSubclassProperties.get(inheritedPropertyName);
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- // no setter
- assertFalse(property.isWritable());
- assertEquals("Signature must be for a String",
- "Ljava.lang.String;", property.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * Acquire an element of an array
- */
- public void testArrayPropertyElement()
- {
- final IPropertySymbol propSymbol =
- (IPropertySymbol) _beanProperties.get("stringArrayProperty");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getArrayElement().getTypeDescriptor().getTypeSignature());
-
- final IObjectSymbol symbol = typeDesc.getArrayElement();
- assertNotNull(symbol);
- assertEquals(TypeConstants.TYPE_STRING, symbol.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * Acquire an element of an int array
- */
- public void testIntArrayPropertyElement()
- {
- final IPropertySymbol propSymbol =
- (IPropertySymbol) _beanProperties.get("intArrayProperty");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(Signature.SIG_INT, typeDesc.getArrayElement().getTypeDescriptor().getTypeSignature());
-
- final IObjectSymbol symbol = typeDesc.getArrayElement();
- assertNotNull(symbol);
- assertEquals(Signature.SIG_INT, symbol.getTypeDescriptor().getTypeSignature());
- }
-
- /**
- * Acquire an element of an array of array of string and
- * get the element of that element
- */
- public void testArrayOfArrayOfStringPropertyElement()
- {
- final IPropertySymbol propSymbol =
- (IPropertySymbol) _beanProperties.get("arrayOfArrayOfStringProperty");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(Signature.createArraySignature(TypeConstants.TYPE_STRING, 1),
- typeDesc.getArrayElement().getTypeDescriptor().getTypeSignature()
- );
-
- final IObjectSymbol symbol = typeDesc.getArrayElement();
- assertNotNull(symbol);
- assertEquals(Signature.createArraySignature(TypeConstants.TYPE_STRING, 1),
- typeDesc.getArrayElement().getTypeDescriptor().getTypeSignature());
-
- assertTrue(symbol.getTypeDescriptor().isArray());
- final IObjectSymbol nestedSymbol = symbol.getTypeDescriptor().getArrayElement();
- assertNotNull(nestedSymbol);
- assertEquals(TypeConstants.TYPE_STRING,
- nestedSymbol.getTypeDescriptor().getTypeSignature());
- }
-
-/* ------ Properties with generics ------- */
-
- public void testGenericGetterBeans()
- {
- // list of strings
- {
- final IPropertySymbol propSymbol = _genericProperties.get("listOfStrings");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(TypeConstants.TYPE_LIST, typeDesc.getTypeSignature());
- assertEquals(1, typeDesc.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(0));
- }
-
- // map of strings keyed on strings
- {
- final IPropertySymbol propSymbol = _genericProperties.get("mapOfStringsKeyedByString");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(TypeConstants.TYPE_MAP, typeDesc.getTypeSignature());
- assertEquals(2, typeDesc.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(0));
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(1));
- }
-
- // map of user (source) defined type keyed on strings
- {
- final IPropertySymbol propSymbol = _genericProperties.get("mapOfTestBeansByString");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(TypeConstants.TYPE_MAP, typeDesc.getTypeSignature());
- assertEquals(2, typeDesc.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(0));
- assertEquals(testBean1Sig, typeDesc.getTypeParameterSignatures().get(1));
- }
-
- // mutable map
- {
- final IPropertySymbol propSymbol = _genericProperties.get("mutableMapOfStringByString");
- assertNotNull(propSymbol);
-
- ITypeDescriptor typeDesc = propSymbol.getTypeDescriptor();
- assertNotNull(typeDesc);
- assertEquals(TypeConstants.TYPE_MAP, typeDesc.getTypeSignature());
- assertEquals(2, typeDesc.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(0));
- assertEquals(TypeConstants.TYPE_STRING, typeDesc.getTypeParameterSignatures().get(1));
- }
- }
-
-/* ------ Method signature testing -----------------------*/
-
- /**
- * test no arg boolean method
- */
- public void testABooleanMethodWithNoArgs()
- {
- testABooleanMethodWithNoArgs(_beanMethods);
- }
-
- /**
- * test inherited no arg boolean method
- */
- public void testABooleanMethodWithNoArgsSubclass()
- {
- testABooleanMethodWithNoArgs(_beanMethodsSubclass);
- }
-
-
- /**
- *
- */
- private void testABooleanMethodWithNoArgs(Map properties)
- {
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) properties.get("aBooleanMethodWithNoArgs");
-
- assertEquals("()"+Signature.SIG_BOOLEAN,
- method.getSignature());
- }
-
- /**
- * test no args string method
- */
- public void testAStringMethodWithNoArgs()
- {
- testAStringMethodWithNoArgs(_beanMethods);
- }
-
- /**
- * test inherited no args string method
- */
- public void testAStringMethodWithNoArgsSubclass()
- {
- testAStringMethodWithNoArgs(_beanMethodsSubclass);
- }
-
- /**
- *
- */
- private void testAStringMethodWithNoArgs(Map properties)
- {
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) properties.get("aStringMethodWithNoArgs");
-
- assertEquals("()Ljava.lang.String;",
- method.getSignature());
- }
-
- /**
- * test is accessor method
- */
- public void testIsAnIsAccessor()
- {
- testIsAnIsAccessor(_beanMethods);
- }
-
- /**
- * test inherited
- */
- public void testIsAnIsAccessorSubclass()
- {
- testIsAnIsAccessor(_beanMethodsSubclass);
- }
-
- /**
- *
- */
- private void testIsAnIsAccessor(Map properties)
- {
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) properties.get("isAnIsAccessor");
-
- assertEquals("()Z",
- method.getSignature());
- }
-
- /**
- *
- */
- public void testAIntegerMethodThatTakesAString()
- {
- testAIntegerMethodThatTakesAString(_beanMethods);
- }
-
- /**
- * inherited
- */
- public void testAIntegerMethodThatTakesAStringSubclass()
- {
- testAIntegerMethodThatTakesAString(_beanMethodsSubclass);
- }
-
- /**
- *
- */
- private void testAIntegerMethodThatTakesAString(Map properties)
- {
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) properties.get("aIntegerMethodThatTakesAString");
-
- assertEquals("(Ljava.lang.String;)"+Signature.SIG_INT,
- method.getSignature());
- }
-
- /**
- *
- */
- public void testAIntegerMethodThatTakesAStringAndLong()
- {
- testAIntegerMethodThatTakesAStringAndLong(_beanMethods);
- }
-
- /**
- * inherited
- */
- public void testAIntegerMethodThatTakesAStringAndLongSubclass()
- {
- testAIntegerMethodThatTakesAStringAndLong(_beanMethodsSubclass);
- }
-
- /**
- * @param arg1
- * @param arg2
- */
- private void testAIntegerMethodThatTakesAStringAndLong(Map properties)
- {
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) properties.get("aIntegerMethodThatTakesAStringAndLong");
-
- assertEquals("(Ljava.lang.String;Ljava.lang.Long;)"+Signature.SIG_INT,
- method.getSignature());
- }
-
- /**
- * test that the overloaded methods are both there
- */
- public void testOverloadedMethod()
- {
- testOverloadedMethod(_testBean2Symbol);
- }
-
- /**
- * test the inherited
- */
- public void testOverloadedMethodSubclass()
- {
- testOverloadedMethod(_testBean2SubclassSymbol);
- }
-
- private void testOverloadedMethod(IBeanInstanceSymbol bean)
- {
- final String intMethodSignature =
- "("+Signature.SIG_INT+")"+Signature.SIG_VOID;
- final String stringMethodSignature =
- "(Ljava.lang.String;)V";
-
- boolean foundIntOverload = false;
- boolean foundStringOverload = false;
-
- for (final Iterator it = bean.getTypeDescriptor().getMethods().iterator();
- it.hasNext();)
- {
- final IBeanMethodSymbol method = (IBeanMethodSymbol) it.next();
- if (overloadedMethodName.equals(method.getName()))
- {
- final String typeSignature = method.getSignature();
-
- if (intMethodSignature.equals(typeSignature))
- {
- foundIntOverload = true;
- }
- else if (stringMethodSignature.equals(typeSignature))
- {
- foundStringOverload = true;
- }
- }
- }
-
- assertTrue(foundIntOverload && foundStringOverload);
- }
-
- /**
- * Test method signature that is only in the sub-class, not in the parent
- */
- public void testMethodSubclassOnly()
- {
- assertNull(_beanMethods.get("validate"));
-
- IBeanMethodSymbol method =
- (IBeanMethodSymbol) _beanMethodsSubclass.get("validate");
- assertNotNull(method);
- assertEquals("(Lcom.test.TestBean2;)"+Signature.SIG_VOID,
- method.getSignature());
- }
-
-/* ------ test acquisition of super-classes and interfaces -----------------------*/
- /**
- * Test correct super class acquistion
- */
- public void testSuperClassAcquisition()
- {
- // TestBean1
- List superSigs =
- _testBean1Symbol.getTypeDescriptor().getSuperTypeSignatures();
-
- // should only have java.lang.Object as a super
- assertEquals(superSigs.size(), 1);
- assertEquals("Ljava.lang.Object;", (String)superSigs.get(0));
-
- // TestBean1Subclass
- superSigs =
- _testBean1SubclassSymbol.getTypeDescriptor().getSuperTypeSignatures();
-
- // should have Object and TestBean1 as parents
- assertEquals(superSigs.size(), 2);
- assertTrue(superSigs.contains("Ljava.lang.Object;"));
- assertTrue(superSigs.contains("Lcom.test.TestBean1;"));
-
- // TestBean2
- superSigs =
- _testBean2Symbol.getTypeDescriptor().getSuperTypeSignatures();
-
- // should only have java.lang.Object as a super
- assertEquals(superSigs.size(), 1);
- assertEquals("Ljava.lang.Object;", (String)superSigs.get(0));
-
- // TestBean2Subclass
- superSigs =
- _testBean2SubclassSymbol.getTypeDescriptor().getSuperTypeSignatures();
- // should have Object and TestBean2 as parents
- assertEquals(superSigs.size(), 2);
- assertTrue(superSigs.contains("Ljava.lang.Object;"));
- assertTrue(superSigs.contains("Lcom.test.TestBean2;"));
-
- }
-
- /**
- * Test the acquisition of the interface implemented on TestBean2 and its subclass
- */
- public void testInterfaceAcquisition()
- {
- // TestBean2
- List superSigs =
- _testBean2Symbol.getTypeDescriptor().getInterfaceTypeSignatures();
-
- // should only have ITestBean2
- assertEquals(superSigs.size(), 1);
- assertEquals("Lcom.test.ITestBean2;", (String)superSigs.get(0));
-
- // TestBean2Subclass
- superSigs =
- _testBean2SubclassSymbol.getTypeDescriptor().getInterfaceTypeSignatures();
- // should only have ITestBean2
- assertEquals(superSigs.size(), 1);
- assertEquals("Lcom.test.ITestBean2;", (String)superSigs.get(0));
- }
-
-// coverage of EObject generated methods
-
- /**
- * Cover isSet
- */
- public void testIsESet()
- {
- IType testBean1Type = null;
-
- try
- {
- testBean1Type =
- _jdtTestEnvironment.getJavaProject().
- findType(packageName1+"."+testBeanName1);
- }
- catch (JavaModelException jme)
- {
- fail(jme.getLocalizedMessage());
- }
-
- assertNotNull(testBean1Type);
-
- IJavaTypeDescriptor2 desc =
- SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
-
- // there are methods and one property on TestBean2
- assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties()));
- assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods()));
- //assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIBeanInstanceSymbol_escriptor()));
-
- desc.eSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties(),
- _testBean2Symbol.getJavaTypeDescriptor().getBeanProperties());
- desc.eSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods(),
- _testBean2Symbol.getJavaTypeDescriptor().getBeanMethods());
- desc.eSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_Type(),
- testBean1Type);
-
- assertFalse(((List)desc.eGet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties())).size()
- == 0);
- assertFalse(((List)desc.eGet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods())).size()
- == 0);
- assertEquals(desc.eGet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_Type()),
- testBean1Type);
-
- assertTrue(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties()));
- assertTrue(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods()));
- assertTrue(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_Type()));
-
- desc.eUnset(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties());
- desc.eUnset(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods());
- desc.eUnset(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_Type());
-
- // there are methods and one property on TestBean2
- assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanProperties()));
- assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_BeanMethods()));
- assertFalse(desc.eIsSet(SymbolPackage.eINSTANCE.getIJavaTypeDescriptor2_Type()));
- }
-
- /**
- * Cover the toString
- */
- public void testToString()
- {
- _testBean2Symbol.getTypeDescriptor().toString();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2_ChangeStability.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2_ChangeStability.java
deleted file mode 100644
index d268c51..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2_ChangeStability.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.Name;
-import org.eclipse.jdt.core.dom.Type;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-import org.eclipse.jst.jsf.common.util.TypeUtil;
-import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol;
-import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
-import org.eclipse.jst.jsf.context.symbol.IMethodSymbol;
-import org.eclipse.jst.jsf.context.symbol.IObjectSymbol;
-import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.text.edits.TextEdit;
-
-
-/**
- * Tests the java type descriptor's ability to react correctly to changes
- * in its underlying type. This is very important when type and symbol caching
- * are enabled.
- *
- * @author cbateman
- *
- */
-public class TestIJavaTypeDescriptor2_ChangeStability extends ModelBaseTestCase
-{
- private IBeanInstanceSymbol _testBean1Symbol;
- private IBeanInstanceSymbol _testBean2Symbol;
-
- private Map<String, IPropertySymbol> _beanProperties;
- private Map<String, IBeanMethodSymbol> _bean1Methods;
- private Map<String, IBeanMethodSymbol> _bean2Methods;
- private Map<String, IPropertySymbol> _bean2Properties;
-
- private final static String packageName1 = "com.test";
- private final static String testBeanName1 = "TestBean1";
- private final static String testBeanName2 = "TestBean2";
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // load ITestBean2 first due to later dependencies
- loadSourceClass(ContextSymbolTestPlugin.getDefault().getBundle(), "/testdata/ITestBean2.java.data", packageName1, "ITestBean2");
-
- // load another bean first since others have a dependency on on it
- loadSourceClass(TestsPlugin.getDefault().getBundle(), "/testfiles/AnotherBean.java.data", packageName1, "AnotherBean");
- assertNotNull(_jdtTestEnvironment.getJavaProject().findType(packageName1+"."+"AnotherBean"));
-
- _beanProperties = new HashMap<String, IPropertySymbol>();
- _testBean1Symbol =
- setupBeanProperty(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data", packageName1,
- testBeanName1, _beanProperties);
- _bean1Methods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(_bean1Methods, _testBean1Symbol);
-
- _bean2Methods = new HashMap<String, IBeanMethodSymbol>();
- _testBean2Symbol =
- setupBeanMethods("/testdata/TestBean2.java.data", testBeanName2, _bean2Methods);
- _bean2Properties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean2Symbol, _bean2Properties);
- }
-
-
- private IBeanInstanceSymbol setupBeanMethods(String fileName, String beanClassName, Map<String, IBeanMethodSymbol> methods) throws Exception
- {
- loadSourceClass(ContextSymbolTestPlugin.getDefault().getBundle(), fileName, packageName1, beanClassName);
-
- final IType testBean1Type =
- _jdtTestEnvironment.getJavaProject().findType(packageName1+"."+beanClassName);
- assertNotNull(testBean1Type);
-
- final IJavaTypeDescriptor2 testBeanDescriptor =
- SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
- testBeanDescriptor.setType(testBean1Type);
-
- IBeanInstanceSymbol bean =
- SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
- bean.setTypeDescriptor(testBeanDescriptor);
- bean.setName(beanClassName);
- populateMethodMap(methods, bean);
- return bean;
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
- _jdtTestEnvironment.getProjectEnvironment().getTestProject().delete(true, null);
- }
-
- private final static String NON_BEAN_METHOD_CONTENTS = "public String myActionSource(){return \"foo\";}";
- private final static String NON_BEAN_METHOD_SIG = Signature.createMethodSignature(new String[0], TypeConstants.TYPE_STRING);
- /**
- * Check the affect of adding a non-bean (not a getter/setter match) on
- * the IJavaTypeDescriptor2
- */
- public void testAddNonBeanMethod() throws Exception
- {
- // pre-cond => basic setup
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod newMethod = type.createMethod(NON_BEAN_METHOD_CONTENTS, null, true, null);
- assertNotNull(newMethod);
- assertEquals(NON_BEAN_METHOD_SIG, TypeUtil.resolveMethodSignature(type, newMethod.getSignature()));
- assertTrue(newMethod.exists());
-
- // post-cond: bean has new method
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size()+1, newMethods.size());
- // should be the same if we remove the new method
- assertNotNull(newMethods.remove("myActionSource"));
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: properties are unchanged
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- public void testRemoveNonBeanMethod() throws Exception
- {
- // pre-cond => basic setup, delete a non-bean method
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod method = type.getMethod("get", new String[0]);
- assertNotNull(method);
- method.delete(true, null);
- assertFalse(method.exists());
-
- // post-cond: bean has one less method
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size()-1, newMethods.size());
- assertTrue(newMethods.get("get") == null);
- // should be the same if we remove the method from expected
- assertNotNull(_bean1Methods.remove("get"));
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: properties are unchanged
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- private final static String BEAN_PROPERTY_NAME = "anAddedStringProperty";
- private final static String BEAN_METHOD_NAME = "getAnAddedStringProperty";
- private final static String BEAN_METHOD_CONTENTS =
- "public String "+BEAN_METHOD_NAME+"() {return \"foo\";}";
- private final static String BEAN_METHOD_SIG =
- Signature.createMethodSignature(new String[0], TypeConstants.TYPE_STRING);
-
- public void testAddBeanMethod() throws Exception
- {
- // pre-cond => basic setup
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod newMethod = type.createMethod(BEAN_METHOD_CONTENTS, null, true, null);
- assertNotNull(newMethod);
- assertTrue(newMethod.exists());
- assertEquals(BEAN_METHOD_SIG, TypeUtil.resolveMethodSignature(type, newMethod.getSignature()));
-
- {
- // post-cond: bean has new method
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size()+1, newMethods.size());
- // should be the same if we remove the new method
- assertNotNull(newMethods.remove(BEAN_METHOD_NAME));
- compareMethodMaps(_bean1Methods, newMethods);
- }
-
- {
- // post-cond: bean has a new property
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- assertEquals(_beanProperties.size()+1, newProperties.size());
- // should be the same if we remove the new property
- IPropertySymbol prop = newProperties.remove(BEAN_PROPERTY_NAME);
- assertEquals(TypeConstants.TYPE_STRING, prop.getTypeDescriptor().getTypeSignature());
- compareSymbolMaps(_beanProperties, newProperties);
- }
- }
-
- private final static String EXISTING_BEAN_PROPERTY_TO_REMOVE = "readonlyStringProperty";
- private final static String EXISTING_BEAN_METHOD = "getReadonlyStringProperty";
- private final static String EXISTING_BEAN_METHOD_SIG = BEAN_METHOD_SIG;
-
- public void testRemoveBeanMethod() throws Exception
- {
- // pre-cond => basic setup, delete a non-bean method
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod method = type.getMethod(EXISTING_BEAN_METHOD, new String[0]);
- assertNotNull(method);
- assertEquals(EXISTING_BEAN_METHOD_SIG, TypeUtil.resolveMethodSignature(type, method.getSignature()));
- assertTrue(method.exists());
- method.delete(true, null);
- assertFalse(method.exists());
-
- // post-cond: bean has one less method
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size()-1, newMethods.size());
- assertTrue(newMethods.get(EXISTING_BEAN_METHOD) == null);
- // should be the same if we remove the method from expected
- assertNotNull(_bean1Methods.remove(EXISTING_BEAN_METHOD));
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: bean has one less property
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- assertEquals(_beanProperties.size()-1, newProperties.size());
- // should be the same if we remove the same property from the expected
- IPropertySymbol prop = _beanProperties.remove(EXISTING_BEAN_PROPERTY_TO_REMOVE);
- assertEquals(TypeConstants.TYPE_STRING, prop.getTypeDescriptor().getTypeSignature());
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- // NOTE: it is ADifferentReadonlyPropertyName with a capital "A" because it is followed
- // by a capital letter (D), which by bean rules means don't lower-cap the property name
- private final static String NEW_READONLY_BEAN_PROP_NAME = "ADifferentReadonlyPropertyName";
- private final static String NEW_READONLY_BEAN_METHOD_NAME = "getADifferentReadonlyPropertyName";
-
- public void testRenameBeanProperty() throws Exception
- {
- // pre-cond => basic setup, delete a non-bean method
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod method = type.getMethod(EXISTING_BEAN_METHOD, new String[0]);
- assertNotNull(method);
- assertEquals(EXISTING_BEAN_METHOD_SIG, TypeUtil.resolveMethodSignature(type, method.getSignature()));
- assertTrue(method.exists());
- method.rename(NEW_READONLY_BEAN_METHOD_NAME, false, null);
- method = type.getMethod(NEW_READONLY_BEAN_METHOD_NAME, new String[0]);
- assertTrue(method.exists());
-
- // post-cond: bean has same number of methods
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size(), newMethods.size());
- assertTrue(newMethods.get(EXISTING_BEAN_METHOD) == null);
- // should be the same if we remove existing and add new one from newMethods
- assertNotNull(_bean1Methods.remove(EXISTING_BEAN_METHOD));
- IBeanMethodSymbol changedMethod = newMethods.get(NEW_READONLY_BEAN_METHOD_NAME);
- assertEquals(BEAN_METHOD_SIG, changedMethod.getSignature());
- _bean1Methods.put(NEW_READONLY_BEAN_METHOD_NAME, changedMethod);
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: bean has same number of properties
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- assertEquals(_beanProperties.size(), newProperties.size());
- // should be the same if we replace with the new property
- IPropertySymbol prop = newProperties.get(NEW_READONLY_BEAN_PROP_NAME);
- assertNotNull(prop);
- assertEquals(TypeConstants.TYPE_STRING, prop.getTypeDescriptor().getTypeSignature());
- assertNotNull(_beanProperties.remove(EXISTING_BEAN_PROPERTY_TO_REMOVE));
- _beanProperties.put(prop.getName(), prop);
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- private static final String READONLY_BEAN_REPLACEMENT_METHOD =
- "public Integer "+EXISTING_BEAN_METHOD+"(){return new Integer(4);}";
- private static final String READONLY_BEAN_REPLACEMENT_SIG =
- Signature.createMethodSignature(new String[0], TypeConstants.TYPE_BOXED_INTEGER);
-
- public void testChangeTypeOfGetter() throws Exception
- {
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod method = type.getMethod(EXISTING_BEAN_METHOD, new String[0]);
- assertNotNull(method);
- assertTrue(method.exists());
-
- // remove old, add new
- method.delete(true, null);
- assertFalse(method.exists());
- type.createMethod(READONLY_BEAN_REPLACEMENT_METHOD, null, true, null);
- assertTrue(method.exists());
-
- // post-cond: bean has the same number of methods
- // but, we need to replace the changed one in _bean1Methods
- // for the maps to equal
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size(), newMethods.size());
- assertNotNull(newMethods.get(EXISTING_BEAN_METHOD));
- IBeanMethodSymbol methodSymbol = _bean1Methods.remove(EXISTING_BEAN_METHOD);
- assertNotNull(methodSymbol);
- assertEquals(EXISTING_BEAN_METHOD_SIG, methodSymbol.getSignature());
- // should be the same if we swap the new method into the old map
- methodSymbol = newMethods.get(EXISTING_BEAN_METHOD);
- assertNotNull(methodSymbol);
- assertEquals(READONLY_BEAN_REPLACEMENT_SIG, methodSymbol.getSignature());
- _bean1Methods.put(EXISTING_BEAN_METHOD, methodSymbol);
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: bean's type signature has changed
- // post-cond: same number of props
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- assertEquals(_beanProperties.size(), newProperties.size());
- // should be the same if we replace the same property from the expected
- IPropertySymbol prop = _beanProperties.remove(EXISTING_BEAN_PROPERTY_TO_REMOVE);
- assertEquals(TypeConstants.TYPE_STRING, prop.getTypeDescriptor().getTypeSignature());
- prop = newProperties.get(EXISTING_BEAN_PROPERTY_TO_REMOVE);
- assertEquals(TypeConstants.TYPE_BOXED_INTEGER, prop.getTypeDescriptor().getTypeSignature());
- _beanProperties.put(EXISTING_BEAN_PROPERTY_TO_REMOVE, prop);
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- private final static String WRITEONLY_BEAN_PROPERTY_NAME =
- "writeonlyStringProperty";
- private final static String WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME =
- "setWriteonlyStringProperty";
- private final static String WRITEONLY_BEAN_REPLACMENT_CONTENTS =
- "public void "+WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME
- +"(Integer newValue){}";
- private final static String EXISTING_BEAN_SETTER_METHOD_SIG =
- Signature.createMethodSignature(new String[] {TypeConstants.TYPE_STRING}, Signature.SIG_VOID);
- private final static String REPLACEMENT_BEAN_SETTER_METHOD_SIG =
- Signature.createMethodSignature(new String[] {TypeConstants.TYPE_BOXED_INTEGER}, Signature.SIG_VOID);
-
- public void testChangeTypeOfSetter() throws Exception
- {
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- IMethod method = type.getMethod(WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME, new String[]{"QString;"});
- assertNotNull(method);
- assertTrue(method.exists());
-
- // remove old, add new
- method.delete(true, null);
- assertFalse(method.exists());
- method = type.createMethod(WRITEONLY_BEAN_REPLACMENT_CONTENTS, null, true, null);
- assertTrue(method.exists());
-
- // post-cond: bean has the same number of methods
- // but, we need to replace the changed one in _bean1Methods
- // for the maps to equal
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- assertEquals(_bean1Methods.size(), newMethods.size());
- assertNotNull(newMethods.get(WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME));
- IBeanMethodSymbol methodSymbol =
- _bean1Methods.remove(WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME);
- assertNotNull(methodSymbol);
- assertEquals(EXISTING_BEAN_SETTER_METHOD_SIG, methodSymbol.getSignature());
- // should be the same if we swap the new method into the old map
- methodSymbol = newMethods.get(WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME);
- assertNotNull(methodSymbol);
- assertEquals(REPLACEMENT_BEAN_SETTER_METHOD_SIG, methodSymbol.getSignature());
- _bean1Methods.put(WRITEONLY_BEAN_REPLACEMENT_METHOD_NAME, methodSymbol);
- compareMethodMaps(_bean1Methods, newMethods);
-
- // post-cond: bean's type signature has changed
- // post-cond: same number of props
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- assertEquals(_beanProperties.size(), newProperties.size());
- // should be the same if we replace the same property from the expected
- IPropertySymbol prop = _beanProperties.remove(WRITEONLY_BEAN_PROPERTY_NAME);
- assertEquals(TypeConstants.TYPE_STRING, prop.getTypeDescriptor().getTypeSignature());
- prop = newProperties.get(WRITEONLY_BEAN_PROPERTY_NAME);
- assertEquals(TypeConstants.TYPE_BOXED_INTEGER, prop.getTypeDescriptor().getTypeSignature());
- _beanProperties.put(WRITEONLY_BEAN_PROPERTY_NAME, prop);
- compareSymbolMaps(_beanProperties, newProperties);
- }
-
- public void testAddSuperType() throws Exception
- {
- IType type = _testBean1Symbol.getJavaTypeDescriptor().getType();
- changeSuperType(type, _testBean2Symbol.getJavaTypeDescriptor().getType());
-
- // post-cond: bean has the same number of methods
- // but, we need to replace the changed one in _bean1Methods
- // for the maps to equal
- Map<String, IBeanMethodSymbol> newMethods = new HashMap<String, IBeanMethodSymbol>();
- populateMethodMap(newMethods,_testBean1Symbol);
- Map<String, IBeanMethodSymbol> mergedMethodMap = new HashMap<String, IBeanMethodSymbol>();
- mergedMethodMap.putAll(_bean1Methods);
- mergedMethodMap.putAll(_bean2Methods);
-
- assertEquals(mergedMethodMap.size(), newMethods.size());
- compareMethodMaps(mergedMethodMap, newMethods);
-
- // post-cond: bean's type signature has changed
- // post-cond: same number of props
- Map<String, IPropertySymbol> newProperties = new HashMap<String, IPropertySymbol>();
- populatePropertyMap(_testBean1Symbol, newProperties);
- // should be the same if we merge the two expected maps
- Map<String, IPropertySymbol> mergedSymbolMap = new HashMap<String, IPropertySymbol>();
- mergedSymbolMap.putAll(_beanProperties);
- mergedSymbolMap.putAll(_bean2Properties);
- // bean 2 has a single bean property
- assertEquals(mergedSymbolMap.size(), newProperties.size());
- compareSymbolMaps(mergedSymbolMap, newProperties);
- }
-
- private void populateMethodMap(Map<String, IBeanMethodSymbol> methods, IBeanInstanceSymbol bean)
- {
- List methodList = bean.getMethods();
- for(final Iterator it = methodList.iterator(); it.hasNext();)
- {
- final IBeanMethodSymbol method = (IBeanMethodSymbol) it.next();
- methods.put(method.getName(), method);
- }
- }
-
- private void compareSymbolMaps(Map<String, ? extends IObjectSymbol> expected, Map<String, ? extends IObjectSymbol> actual)
- {
- assertEquals(expected.size(), actual.size());
-
- for (String name : actual.keySet())
- {
- ITypeDescriptor expectedTypeDesc = expected.get(name).getTypeDescriptor();
- ITypeDescriptor actualTypeDesc = actual.get(name).getTypeDescriptor();
-
- assertTypeDescriptorsSame(expectedTypeDesc, actualTypeDesc);
- }
- }
-
- private void compareMethodMaps(Map<String, ? extends IMethodSymbol> expected, Map<String, ? extends IMethodSymbol> actual)
- {
- assertEquals(expected.size(), actual.size());
-
- for (String name : actual.keySet())
- {
- assertEquals(expected.get(name).getSignature(), actual.get(name).getSignature());
- }
- }
-
- private void assertTypeDescriptorsSame(ITypeDescriptor expectedTypeDesc, ITypeDescriptor actualTypeDesc)
- {
- assertEquals(expectedTypeDesc.getTypeSignature()
- , actualTypeDesc.getTypeSignature());
- if (expectedTypeDesc.getArrayElement() != null)
- {
- assertNotNull(actualTypeDesc.getArrayElement());
- assertTypeDescriptorsSame(expectedTypeDesc.getArrayElement().getTypeDescriptor()
- , actualTypeDesc.getArrayElement().getTypeDescriptor());
- }
- else
- {
- assertNull(actualTypeDesc.getArrayElement());
- }
-
- assertEquals(expectedTypeDesc.getInterfaceTypeSignatures()
- , actualTypeDesc.getInterfaceTypeSignatures());
- assertEquals(expectedTypeDesc.getSuperTypeSignatures()
- , actualTypeDesc.getSuperTypeSignatures());
- assertEquals(expectedTypeDesc.getTypeParameterSignatures()
- , actualTypeDesc.getTypeParameterSignatures());
- }
-
- private void changeSuperType(IType type, IType newSuperType) throws Exception
- {
- ICompilationUnit cu = type.getCompilationUnit().getWorkingCopy(null);
- CompilationUnit astRoot = createASTAndStartRecording(cu);
-
- // modify the AST
- TypeDeclaration typeDeclaration = (TypeDeclaration)astRoot.types().get(0);
- AST ast = typeDeclaration.getAST();
- Name superName = ast.newName(newSuperType.getFullyQualifiedName());
- Type superType = ast.newSimpleType(superName);
- typeDeclaration.setSuperclassType(superType);
-
- commitAST(cu, astRoot);
- }
-
- private CompilationUnit createASTAndStartRecording(ICompilationUnit cu) throws Exception
- {
- // creation of DOM/AST from a ICompilationUnit
- ASTParser parser = ASTParser.newParser(AST.JLS3);
- parser.setSource(cu);
- // start record of the modifications
- CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
- astRoot.recordModifications();
- return astRoot;
- }
-
- private void commitAST(ICompilationUnit cu, CompilationUnit astRoot) throws Exception
- {
- String source = cu.getBuffer().getContents();
- Document document= new Document(source);
-
- // computation of the text edits
- TextEdit edits = astRoot.rewrite(document, cu.getJavaProject().getOptions(true));
-
- // computation of the new source code
- edits.apply(document);
- String newSource = document.get();
-
- // update of the compilation unit
- cu.getBuffer().setContents(newSource);
- cu.commitWorkingCopy(true, null);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIMapTypeDescriptor.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIMapTypeDescriptor.java
deleted file mode 100644
index c59b321..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIMapTypeDescriptor.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
-import org.eclipse.jst.jsf.designtime.internal.symbols.ResourceBundleMapSourceFactory;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-
-public class TestIMapTypeDescriptor extends ModelBaseTestCase
-{
- private IFile _propertyFile;
-
- protected void setUp() throws Exception
- {
- super.setUp();
- // add a resource bundle to the default package to test regression on
- // bug 144525
- final TestFileResource resource = new TestFileResource();
- resource.load(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/bundle.properties.data");
- _propertyFile = _jdtTestEnvironment.addResourceFile("src",
- new ByteArrayInputStream(resource.toBytes()), "res",
- "Bundle.properties");
- assertTrue(_propertyFile.isAccessible());
- }
-
- public void testResBoundDescriptor() throws JavaModelException,
- IOException, CoreException
- {
- final Map mapSource = ResourceBundleMapSourceFactory
- .getResourceBundleMapSource(_jdtTestEnvironment
- .getProjectEnvironment().getTestProject(), "res.Bundle");
- final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE
- .createIMapTypeDescriptor();
- typeDesc.setMapSource(mapSource);
- Map<String, IPropertySymbol> map = createMap(typeDesc);
- assertEquals(3, map.size());
-
- assertTrue(map.containsKey("simpleprop"));
- assertFalse(map.get("simpleprop").isIntermediate());
- assertTrue(map.containsKey("two"));
- assertTrue(map.get("two").isIntermediate());
- assertTrue(map.containsKey("three"));
- assertTrue(map.get("three").isIntermediate());
- }
-
- public void testDeleteBundle() throws Exception
- {
- final Map mapSource = ResourceBundleMapSourceFactory
- .getResourceBundleMapSource(_jdtTestEnvironment
- .getProjectEnvironment().getTestProject(), "res.Bundle");
- final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE
- .createIMapTypeDescriptor();
- typeDesc.setMapSource(mapSource);
- Map<String, IPropertySymbol> map = createMap(typeDesc);
- assertEquals(3, map.size());
- deleteAndWaitFor(_propertyFile);
- EList properties = typeDesc.getProperties();
- assertEquals(0, properties.size());
- }
-
- public void testDeleteAndRecreate() throws Exception
- {
- {
- final Map mapSource = ResourceBundleMapSourceFactory
- .getResourceBundleMapSource(_jdtTestEnvironment
- .getProjectEnvironment().getTestProject(),
- "res.Bundle");
- final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE
- .createIMapTypeDescriptor();
- typeDesc.setMapSource(mapSource);
- Map<String, IPropertySymbol> map = createMap(typeDesc);
- assertEquals(3, map.size());
- }
-
- deleteAndWaitFor(_propertyFile);
-
- {
- final TestFileResource resource = new TestFileResource();
- resource.load(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/bundle2.properties.data");
- _propertyFile = _jdtTestEnvironment.addResourceFile("src",
- new ByteArrayInputStream(resource.toBytes()), "res",
- "Bundle.properties");
-
- final Map mapSource = ResourceBundleMapSourceFactory
- .getResourceBundleMapSource(_jdtTestEnvironment
- .getProjectEnvironment().getTestProject(),
- "res.Bundle");
- final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE
- .createIMapTypeDescriptor();
- typeDesc.setMapSource(mapSource);
- Map<String, IPropertySymbol> map = createMap(typeDesc);
- // it's different bundle but with the same name
- assertEquals(4, map.size());
- }
- }
-
- private void deleteAndWaitFor(final IResource res)
- {
- JSFTestUtil.safeDelete(res, 10, 500);
- for (int i = 0; i < 10; i++)
- {
- if (res.isAccessible())
- {
- try
- {
- Thread.sleep(500);
- } catch (InterruptedException e)
- {
- // do nothing
- }
- }
- }
- assertFalse(res.isAccessible());
- }
-
- private Map<String, IPropertySymbol> createMap(final IMapTypeDescriptor desc)
- {
- final Map<String, IPropertySymbol> map = new HashMap<String, IPropertySymbol>();
- EList properties = desc.getProperties();
- for (final Iterator it = properties.iterator(); it.hasNext();)
- {
- IPropertySymbol prop = (IPropertySymbol) it.next();
- map.put(prop.getName(), prop);
- }
- return map;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
deleted file mode 100644
index 4873854..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsf.context.symbol.IComponentSymbol;
-import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.ISymbol;
-import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
-import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider;
-import org.eclipse.jst.jsf.context.symbol.provider.ProposalCreationFactoryAdapter;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Tests for TestIPropertySymbolItemProvider
- *
- * @author cbateman
- *
- */
-public class TestIPropertySymbolItemProvider extends TestCase
-{
- private Properties props;
-
- protected void setUp() throws Exception
- {
- super.setUp();
- TestFileResource propertiesFile = new TestFileResource();
- propertiesFile.load(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/bundle.properties.data");
- props = new Properties();
- props.load(new ByteArrayInputStream(propertiesFile.toBytes()));
- }
-
- /**
- * Ensure test is in sync with test data and other sanity checks
- */
- public void testSanity()
- {
- assertEquals(props.size(), 3);
- }
-
- /**
- * Test completion proposal construction for a properties map
- */
- public void testProposalConstructionForMap()
- {
- IMapTypeDescriptor mapDesc =
- SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
- mapDesc.setImmutable(true);
- mapDesc.setMapSource(props);
-
- final IComponentSymbol symbol =
- SymbolFactory.eINSTANCE.createIComponentSymbol();
- symbol.setName("myTestSymbol");
- symbol.setTypeDescriptor(mapDesc);
-
- final ComposedAdapterFactory factory =
- new ComposedAdapterFactory(
- ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- final MyCompletionFactory creationInfo = new MyCompletionFactory();
-
- for (final Iterator it = symbol.getTypeDescriptor().getProperties().iterator(); it.hasNext();)
- {
- final ISymbol propSymbol = (ISymbol) it.next();
- final Object provider =
- factory.adapt(propSymbol, IContentProposalProvider.class);
-
- assertTrue(provider instanceof IContentProposalProvider);
-
- final ICompletionProposal[] proposal =
- ((IContentProposalProvider) provider).
- getProposals(propSymbol, creationInfo);
-
- assertNotNull(proposal);
- }
-
- List list = creationInfo._replacementText;
-
- assertEquals(list.size(), 3);
-
- for (final Iterator it = list.iterator();it.hasNext();)
- {
- String replacementText = (String) it.next();
-
- if (replacementText.startsWith("['"))
- {
- replacementText = replacementText.substring(2);
- replacementText = replacementText.substring(0, replacementText.length()-2);
- }
- assertTrue(props.containsKey(replacementText));
- }
- }
-
- private class MyCompletionFactory extends ProposalCreationFactoryAdapter
- {
- final List<String> _replacementText;
-
- /**
- *
- */
- public MyCompletionFactory()
- {
- super(0, 0);
- _replacementText = new ArrayList<String>();
- }
-
- public ICompletionProposal createProposal(String replacementText, String displayText, String additionalText, Image displayImage, Object targetObject)
- {
- _replacementText.add(replacementText);
-
- return super.createProposal(replacementText, displayText, additionalText,
- displayImage, targetObject);
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestTypeCoercion.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestTypeCoercion.java
deleted file mode 100644
index cea4f35..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestTypeCoercion.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-import org.eclipse.jst.jsf.common.internal.types.ValueType;
-import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
-import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor;
-import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
-import org.eclipse.jst.jsf.context.symbol.ISymbol;
-import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor;
-
-/**
- *
- * @author cbateman
- *
- */
-public class TestTypeCoercion extends ModelBaseTestCase
-{
- private final static String packageName = "com.test";
- private IBeanInstanceSymbol _testMapBeanSymbol;
- private IBeanInstanceSymbol _testListBeanSymbol;
- private IBeanInstanceSymbol _testBeanWithGenericProperties;
- private Map<String, IPropertySymbol> _genericProperties;
-
- // used as the int argument to List.get(int)
- private final static ValueType LIST_GETTER_ARG = new ValueType(Signature.SIG_INT, ValueType.ASSIGNMENT_TYPE_RHS);
-
- // used as a String argument to List.get(String)
- private final static ValueType MAP_GETTER_ARG_STRING = new ValueType(TypeConstants.TYPE_STRING, ValueType.ASSIGNMENT_TYPE_RHS);
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- _testMapBeanSymbol =
- setupBeanProperty(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/TestBeanMap.java.data", packageName,
- "TestBeanMap", new HashMap<String, IPropertySymbol>());
-
- _testListBeanSymbol =
- setupBeanProperty(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/MyListBean.java.data", packageName,
- "MyListBean", new HashMap<String, IPropertySymbol>());
-
- _genericProperties = new HashMap<String, IPropertySymbol>();
-
- _testBeanWithGenericProperties =
- setupBeanProperty(ContextSymbolTestPlugin.getDefault().getBundle(),
- "/testdata/TestBeanWithGenericProperties.java.data", packageName,
- "TestBeanWithGenericProperties",_genericProperties);
- }
-
- /**
- * Test Sanity of setup
- */
- public void testSanity()
- {
- assertNotNull(_testMapBeanSymbol);
- assertNotNull(_testListBeanSymbol);
- assertNotNull(_testBeanWithGenericProperties);
- }
-
- /**
- * Test the basic semantics of a bean that implements Map
- */
- public void testBasicMapBean()
- {
- assertTrue(_testMapBeanSymbol.getTypeDescriptor().instanceOf(TypeConstants.TYPE_MAP));
- assertTrue(_testMapBeanSymbol.supportsCoercion(TypeConstants.TYPE_MAP));
- final ITypeDescriptor typeDesc =
- _testMapBeanSymbol.coerce(TypeConstants.TYPE_MAP);
- assertNotNull(typeDesc);
- assertTrue(typeDesc.instanceOf(TypeConstants.TYPE_MAP));
- assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
- assertTrue(((IBoundedMapTypeDescriptor)typeDesc).isUnboundedForType(TypeConstants.TYPE_MAP));
- final String testSymbolName = "chelsea";
- ISymbol symbol =
- ((IBoundedMapTypeDescriptor)typeDesc).
- getUnboundedProperty(testSymbolName, TypeConstants.TYPE_MAP);
-
- assertEquals(testSymbolName, symbol.getName());
- }
-
- /**
- * Test basic bean coercion to a list
- */
- public void testBasicListBean()
- {
- assertTrue(_testListBeanSymbol.getTypeDescriptor().instanceOf(TypeConstants.TYPE_LIST));
- assertTrue(_testListBeanSymbol.supportsCoercion(TypeConstants.TYPE_LIST));
- final ITypeDescriptor typeDesc =
- _testListBeanSymbol.coerce(TypeConstants.TYPE_LIST);
- assertNotNull(typeDesc);
- assertTrue(typeDesc.instanceOf(TypeConstants.TYPE_LIST));
- assertTrue(typeDesc instanceof IBoundedListTypeDescriptor);
-
- // a list can only be indexed numerically (i.e. get(int))
- assertTrue(((IBoundedListTypeDescriptor)typeDesc).isUnboundedForType(TypeConstants.TYPE_BOXED_INTEGER));
- final Integer symbolKey = Integer.valueOf(0);
- ISymbol symbol =
- ((IBoundedListTypeDescriptor)typeDesc).
- getUnboundedProperty(symbolKey, TypeConstants.TYPE_BOXED_INTEGER);
-
- assertEquals(symbolKey.toString(), symbol.getName());
-
- }
-
- public void testListGetCall()
- {
- assertTrue(_testListBeanSymbol.getTypeDescriptor().instanceOf(TypeConstants.TYPE_LIST));
- assertTrue(_testListBeanSymbol.supportsCoercion(TypeConstants.TYPE_LIST));
-
- EList<ValueType> valueTypes = new BasicEList<ValueType>();
- valueTypes.add(LIST_GETTER_ARG);
- ISymbol symbol = _testListBeanSymbol.call("get", valueTypes, "listBean[0]");
- assertNotNull(symbol);
- assertTrue(symbol instanceof IPropertySymbol);
- assertEquals(TypeConstants.TYPE_JAVAOBJECT, ((IPropertySymbol)symbol).getTypeDescriptor().getTypeSignature());
- }
-
- public void testMapGetCall()
- {
- assertTrue(_testMapBeanSymbol.getTypeDescriptor().instanceOf(TypeConstants.TYPE_MAP));
- assertTrue(_testMapBeanSymbol.supportsCoercion(TypeConstants.TYPE_MAP));
-
- EList<ValueType> valueTypes = new BasicEList<ValueType>();
- valueTypes.add(MAP_GETTER_ARG_STRING);
- ISymbol symbol = _testMapBeanSymbol.call("get", valueTypes, "foo");
- assertNotNull(symbol);
- assertTrue(symbol instanceof IPropertySymbol);
- assertEquals(TypeConstants.TYPE_JAVAOBJECT, ((IPropertySymbol)symbol).getTypeDescriptor().getTypeSignature());
-
- }
-
- public void testListGetCallWithSimpleTypeArguments()
- {
- final EList<ValueType> valueTypes = new BasicEList<ValueType>();
- valueTypes.add(LIST_GETTER_ARG);
-
- final IPropertySymbol propSymbol =
- _genericProperties.get("listOfStrings");
- assertNotNull(propSymbol);
- assertTrue(propSymbol.supportsCoercion(TypeConstants.TYPE_LIST));
- assertFalse(propSymbol.supportsCoercion(TypeConstants.TYPE_MAP));
- assertEquals(TypeConstants.TYPE_LIST, propSymbol.getTypeDescriptor().getTypeSignature());
- assertEquals(1, propSymbol.getTypeDescriptor().getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, propSymbol.getTypeDescriptor().getTypeParameterSignatures().get(0));
-
- ISymbol symbol = propSymbol.call("get", valueTypes, "listBean[0]");
- assertNotNull(symbol);
- assertTrue(symbol instanceof IPropertySymbol);
- assertEquals(TypeConstants.TYPE_STRING, ((IPropertySymbol)symbol).getTypeDescriptor().getTypeSignature());
- }
-
- public void testMapGetCallWithSimpleTypeArguments()
- {
- final EList<ValueType> valueTypes = new BasicEList<ValueType>();
- valueTypes.add(MAP_GETTER_ARG_STRING);
-
- final IPropertySymbol propSymbol =
- _genericProperties.get("mapOfStringsKeyedByString");
- assertNotNull(propSymbol);
- assertTrue(propSymbol.supportsCoercion(TypeConstants.TYPE_MAP));
- assertFalse(propSymbol.supportsCoercion(TypeConstants.TYPE_LIST));
- assertEquals(TypeConstants.TYPE_MAP, propSymbol.getTypeDescriptor().getTypeSignature());
- assertEquals(2, propSymbol.getTypeDescriptor().getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, propSymbol.getTypeDescriptor().getTypeParameterSignatures().get(0));
- assertEquals(TypeConstants.TYPE_STRING, propSymbol.getTypeDescriptor().getTypeParameterSignatures().get(1));
-
- ISymbol symbol = propSymbol.call("get", valueTypes, "mapBean['someKey']");
- assertNotNull(symbol);
- assertTrue(symbol instanceof IPropertySymbol);
- assertEquals(TypeConstants.TYPE_STRING, ((IPropertySymbol)symbol).getTypeDescriptor().getTypeSignature());
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/test.xml
deleted file mode 100644
index 67d6320..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<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}\..\.."/> -->
- <echo message="basedir ${basedir}" />
- <echo message="eclipse place ${eclipse-home}" />
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.jst.jsf.context.symbol.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/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.eclipse.jst.jsf.context.symbol.tests.*xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="jsf-folder" value="${eclipse-home}/jsf_folder"/>
- <delete dir="${jsf-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jsf-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jst.jsf.context.symbol.tests.AllTests" />
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- </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.eclipse.jst.jsf.context.symbol.tests.*xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/ITestBean2.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/ITestBean2.java.data
deleted file mode 100644
index e837d65..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/ITestBean2.java.data
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.test;
-
-public interface ITestBean2
-{
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/MyListBean.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/MyListBean.java.data
deleted file mode 100644
index 95da5d5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/MyListBean.java.data
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.test;
-
-import java.util.AbstractList;
-
-/**
- * A bean class that implements java.util.List
- *
- * @author cbateman
- *
- */
-public class MyListBean extends AbstractList
-{
- public Object get(int index) {
- return null;
- }
-
- public int size() {
- return 0;
- }
-
- /**
- * Simulate a
- * @return
- */
- public String getStringProperty()
- {
- return "";
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2.java.data
deleted file mode 100644
index 34d25e9..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2.java.data
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.test
-
-public class TestBean2 implements ITestBean2
-{
- public boolean aBooleanMethodWithNoArgs()
- {
- return false;
- }
-
- public String aStringMethodWithNoArgs()
- {
- return true;
- }
-
- public boolean isAnIsAccessor()
- {
- return false;
- }
-
- public int aIntegerMethodThatTakesAString(String arg)
- {
- return -1;
- }
-
- public int aIntegerMethodThatTakesAStringAndLong(String arg1, Long arg2)
- {
- return -1;
- }
-
- public void overloadedMethod(int a)
- {
- }
-
- public void overloadedMethod(String a)
- {
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2Subclass.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2Subclass.java.data
deleted file mode 100644
index cbe2224..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2Subclass.java.data
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.test
-
-public class TestBean2Subclass extends TestBean2
-{
- public void validate(TestBean2 parentBean)
- {
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanMap.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanMap.java.data
deleted file mode 100644
index 1dcf356..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanMap.java.data
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.jst.jsf.context.symbol.tests;
-
-import java.util.AbstractMap;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Test bean class that implements java.util.Map via AbstractMap
- * @author cbateman
- *
- */
-public class TestBeanMap extends AbstractMap {
-
- public Set entrySet()
- {
- return new HashSet();
- }
-
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanWithGenericProperties.java.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanWithGenericProperties.java.data
deleted file mode 100644
index 733c557..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanWithGenericProperties.java.data
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.test;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-
-public class TestBeanWithGenericProperties
-{
- public List<String> getListOfStrings()
- {
- return new ArrayList<String>();
- }
-
- public Map<String, String> getMapOfStringsKeyedByString()
- {
- return new HashMap<String, String>();
- }
-
- public Map<String, TestBean1> getMapOfTestBeansByString()
- {
- return new HashMap<String, TestBean2>();
- }
-
- public Map<String, String> getMutableMapOfStringByString()
- {
- return new HashMap<String, String>();
- }
-
- public void setMutableMapOfStringByString(Map<String,String> map)
- {
- // do nothing, method sig is all that's required
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle.properties.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle.properties.data
deleted file mode 100644
index 02979fd..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle.properties.data
+++ /dev/null
@@ -1,3 +0,0 @@
-simpleprop=blah
-two.dot=value
-three.dot.property=chicken \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle2.properties.data b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle2.properties.data
deleted file mode 100644
index 38989d9..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle2.properties.data
+++ /dev/null
@@ -1,4 +0,0 @@
-simpleprop=blah
-two.dot=value
-three.dot.property=chicken
-anotherProperty=foobar
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.core.tests/.classpath
deleted file mode 100644
index 304e861..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.core.tests/.cvsignore
deleted file mode 100644
index 3bb4cae..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-temp.folder
-build.xml
-javaCompiler.jsfcoretests.jar.args
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/.project b/jsf/tests/org.eclipse.jst.jsf.core.tests/.project
deleted file mode 100644
index bcb3609..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsf.core.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index efa5488..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun May 27 16:02:25 EDT 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fe5af64..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Fri Aug 24 19:12:00 PDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-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=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-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.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=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.unusedParameterIncludeDocCommentReference=enabled
-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.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index f183241..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,58 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.jst.jsf.core.tests;singleton:=true
-Bundle-Version: 1.2.100.qualifier
-Bundle-Activator: org.eclipse.jst.jsf.core.tests.TestsPlugin
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
-Bundle-ClassPath: jsfcoretests.jar
-Require-Bundle: org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.common.project.facet.core;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.core.runtime.compatibility;bundle-version="[3.1.100,4.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.jsf.test.util;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jst.jsf.common;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.jsf.facesconfig;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jface.text,
- org.eclipse.core.net,
- org.eclipse.jst.jsp.core,
- org.eclipse.wst.html.core,
- org.eclipse.ui.ide;bundle-version="3.4.0",
- org.eclipse.jst.common.frameworks,
- org.eclipse.jst.common.project.facet.core,
- org.eclipse.jst.j2ee.core,
- org.eclipse.jem;bundle-version="2.0.400",
- org.junit;bundle-version="3.8.1",
- org.eclipse.jst.jsf.common.runtime;bundle-version="1.1.0"
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.jst.jsf.core.tests;x-friends:="org.eclipse.jst.jsf.ui.tests,org.eclipse.jst.jsf.context.symbol.tests,org.eclipse.jst.jsf.designtime.tests",
- org.eclipse.jst.jsf.core.tests.appconfig.provider;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.appconfig.validation;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.jsflibraryconfig;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.jsflibraryconfiguration;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.jsflibraryregistry;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.jsflibraryregistry.migration;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.project.facet;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.sanity;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.set;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.tagmatcher;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.types;x-internal:=true,
- org.eclipse.jst.jsf.core.tests.util;
- x-friends:="org.eclipse.jst.jsf.contentassist.tests,
- org.eclipse.jst.jsf.designtime.tests,
- org.eclipse.jst.jsf.validation.el.tests,
- org.eclipse.jst.jsf.ui.tests,
- org.eclipse.jst.pagedesigner.tests",
- org.eclipse.jst.jsf.core.tests.validation
-Plugin-Class: org.eclipse.jst.jsf.core.tests.TestsPlugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.core.tests/about.html
deleted file mode 100644
index 7c80c6c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 06, 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/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>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.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.core.tests/build.properties
deleted file mode 100644
index e9e65fe..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Oracle Corporation.
-# 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:
-# Gerry Kessler - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- test.xml,\
- jsfcoretests.jar,\
- testfiles/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = jsfcoretests.jar
-source.jsfcoretests.jar = src/
-output.jsfcoretests.jar = bin/
-javacSource=1.5
-javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties
deleted file mode 100644
index 0691ded..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 Oracle 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:
-# Oracle Corporation - initial API and implementation
-###############################################################################
-
-jsfLibrary.label.0 = FAKE LIB FROM jsf.core.tests (1)
-jsfLibrary.label.1 = FAKE LIB FROM jsf.core.tests (2)
-Bundle-Vendor.0 = Eclipse.org
-Bundle-Name.0 = JavaServer Faces Tools - Core Tests Plug-in \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml
deleted file mode 100644
index 315af5a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="id1"
- point="org.eclipse.jst.jsf.core.pluginProvidedJsfLibraries">
- <jsfLibrary
- archiveFilesDelegate="org.eclipse.jst.jsf.core.tests.jsflibraryregistry.TEST_PP_LIBArchiveFilesDelegate"
- isImplementation="true"
- label="%jsfLibrary.label.0"
- maxVersionSupported="v1_1"
- name="TEST_PP_LIB_2">
- </jsfLibrary>
- <jsfLibrary
- archiveFilesDelegate="org.eclipse.jst.jsf.core.tests.jsflibraryregistry.TEST_PP_LIB_EMPTYArchiveFilesDelegate"
- isImplementation="false"
- label="%jsfLibrary.label.1"
- maxVersionSupported="v1_2"
- name="TEST_PP_LIB_EMPTY">
- </jsfLibrary>
- </extension>
-
-<!--
- <extension
- point="org.eclipse.jst.jsf.core.jsfAppConfigManagerFactory">
- <factory
- class="org.eclipse.jst.jsf.core.tests.appconfig.TestJSFAppConfigManagerFactoryFromExtension">
- </factory>
- </extension>
--->
-<!--
- <extension
- point="org.eclipse.jst.jsf.core.jsfAppConfigLocatorProviderFactory">
- <locatorProvider
- class="org.eclipse.jst.jsf.core.tests.appconfig.TestLocatorProvider">
- </locatorProvider>
- </extension>
--->
-</plugin>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java
deleted file mode 100644
index f823bfe..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.jsf.core.tests.appconfig.CompositeJSFAppConfigLocatorProviderStrategyTests;
-import org.eclipse.jst.jsf.core.tests.appconfig.JSFAppConfigManagerFactoryTests;
-import org.eclipse.jst.jsf.core.tests.appconfig.validation.AppConfigValidationUtilTestCase;
-import org.eclipse.jst.jsf.core.tests.contenttype.TestContentTypes;
-import org.eclipse.jst.jsf.core.tests.facet.JsfLibraryProviderTests;
-import org.eclipse.jst.jsf.core.tests.facet.JsfLibraryValidatorTest;
-import org.eclipse.jst.jsf.core.tests.facet.VendorSpecificWebXmlConfigurationForJ2EETest;
-import org.eclipse.jst.jsf.core.tests.facet.VendorSpecificWebXmlConfigurationForJavaEETest;
-import org.eclipse.jst.jsf.core.tests.jsflibraryconfig.JSFLibraryRegistryUtilTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryconfig.JSFProjectLibraryReferenceTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryconfiguration.JSFLibraryReferenceTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryconfiguration.JSFLibraryServerSuppliedReferenceTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.ArchiveFileTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.JSFLibraryRegistryPackageTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.JSFLibraryRegistryTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.JSFLibraryTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.MaintainDefaultImplementationAdapterTestCases;
-import org.eclipse.jst.jsf.core.tests.jsflibraryregistry.migration.MigrationV1toV2Test;
-import org.eclipse.jst.jsf.core.tests.project.facet.JSFFacetInstallDataModelProviderTestCases;
-import org.eclipse.jst.jsf.core.tests.set.ConcreteAxiomaticSetTest;
-import org.eclipse.jst.jsf.core.tests.set.NodeSetTest;
-import org.eclipse.jst.jsf.core.tests.set.TestMemberConstraint;
-import org.eclipse.jst.jsf.core.tests.set.TestXPathValidation;
-import org.eclipse.jst.jsf.core.tests.tagmatcher.TestXPathTagMatcher;
-import org.eclipse.jst.jsf.core.tests.types.TypeComparatorTests;
-import org.eclipse.jst.jsf.core.tests.types.TypeTransformerTests;
-import org.eclipse.jst.jsf.core.tests.util.TestJDTBeanIntrospector;
-import org.eclipse.jst.jsf.core.tests.util.TestJDTBeanPropertyWorkingCopy;
-import org.eclipse.jst.jsf.core.tests.util.TestTypeUtil;
-import org.eclipse.jst.jsf.core.tests.validation.TestJSPSemanticsValidator_AttributeValues;
-import org.eclipse.jst.jsf.core.tests.validation.TestJSPSemanticsValidator_Containment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-
-/**
- * The full test suite for core.tests
- * @author cbateman
- *
- */
-public class AllTests
-{
- /**
- * @return the test suite
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.jsf.core.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(JSFTestUtil.getPreventJavaScriptJobsTestCase());
-
- suite.addTestSuite(TestContentTypes.class);
-
- suite.addTestSuite(TestJDTBeanPropertyWorkingCopy.class);
- suite.addTestSuite(TestJDTBeanIntrospector.class);
- suite.addTestSuite(TestTypeUtil.class);
-
- suite.addTestSuite(TypeComparatorTests.class);
- suite.addTestSuite(TypeTransformerTests.class);
-
- suite.addTestSuite(JSFLibraryRegistryTestCases.class);
- suite.addTestSuite(JSFLibraryTestCases.class);
- suite.addTestSuite(ArchiveFileTestCases.class);
- suite.addTestSuite(MaintainDefaultImplementationAdapterTestCases.class);
- suite.addTestSuite(JSFLibraryRegistryPackageTestCases.class);
-
- // comment out temporarily. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=214417
- //suite.addTestSuite(TestLifecycleListener.class);
-
- suite.addTestSuite(JSFFacetInstallDataModelProviderTestCases.class);
-
- // test the jar file appconfig provider
- // TODO C.B: add this back suite.addTestSuite(TestJARFileJSFAppConfigProvider.class);
-
-// suite.addTestSuite(JSFLibraryConfigDialogSettingDataTestCases.class);
- suite.addTestSuite(JSFProjectLibraryReferenceTestCases.class);
-// suite.addTestSuite(JSFLibraryConfigModelTestCases.class);
- suite.addTestSuite(JSFLibraryRegistryUtilTestCases.class);
- suite.addTestSuite(JsfLibraryValidatorTest.class);
-
- suite.addTestSuite(TestJSPSemanticsValidator_Containment.class);
- suite.addTestSuite(TestJSPSemanticsValidator_AttributeValues.class);
- suite.addTestSuite(AppConfigValidationUtilTestCase.class);
- suite.addTestSuite(TestMemberConstraint.class);
- suite.addTestSuite(TestXPathValidation.class);
- suite.addTestSuite(TestXPathTagMatcher.class);
- suite.addTestSuite(ConcreteAxiomaticSetTest.class);
- suite.addTestSuite(NodeSetTest.class);
-
- // NOTE: migration tests affect workspace meta-data files, but they
- // should play nice with others
- // BUT, to be on the safe side, always run them LAST.
- suite.addTestSuite(MigrationV1toV2Test.class);
-
- suite.addTestSuite(JSFLibraryReferenceTestCases.class);
- suite.addTestSuite(JSFLibraryServerSuppliedReferenceTestCases.class);
-
- // Vendor-specific web.xml configuration tests
- suite.addTestSuite(VendorSpecificWebXmlConfigurationForJavaEETest.class);
- suite.addTestSuite(VendorSpecificWebXmlConfigurationForJ2EETest.class);
-
- // Jsf library provider tests
- suite.addTestSuite(JsfLibraryProviderTests.class);
-
- //JSFAppConfig Tests
- suite.addTestSuite(CompositeJSFAppConfigLocatorProviderStrategyTests.class);
- suite.addTestSuite(JSFAppConfigManagerFactoryTests.class);
-
- suite.addTestSuite(JSFTestUtil.getAllowJavaScriptJobsTestCase());
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/DualModeCoreTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/DualModeCoreTests.java
deleted file mode 100644
index 7823c5f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/DualModeCoreTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.jst.jsf.core.tests;
-
-import org.eclipse.jst.jsf.core.tests.resource.AllLifecycleListenerTests;
-import org.eclipse.jst.jsf.core.tests.resource.FastClasspathEntryLifecycleTests;
-import org.eclipse.jst.jsf.core.tests.resource.TestDefaultJarLocator;
-import org.eclipse.jst.jsf.core.tests.resource.TestResourceTracker;
-import org.eclipse.jst.jsf.core.tests.serialization.TLDAttributeSerializationTests;
-import org.eclipse.jst.jsf.test.util.junit4.DualModeEnvironment;
-import org.junit.experimental.categories.Categories.IncludeCategory;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * Tests that can be run as either plugin or regular JUnit tests.
- * @author cbateman
- *
- */
-@RunWith(Suite.class)
-@IncludeCategory(DualModeEnvironment.class)
-@SuiteClasses(
-{ AllLifecycleListenerTests.class,
- TestResourceTracker.class,TLDAttributeSerializationTests.class ,
- FastClasspathEntryLifecycleTests.class, TestDefaultJarLocator.class})
-public class DualModeCoreTests
-{
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/JSFCoreFastTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/JSFCoreFastTests.java
deleted file mode 100644
index 479cd21..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/JSFCoreFastTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jst.jsf.core.tests;
-
-import org.eclipse.jst.jsf.core.tests.resource.AllLifecycleListenerTests;
-import org.eclipse.jst.jsf.core.tests.resource.FastClasspathEntryLifecycleTests;
-import org.eclipse.jst.jsf.core.tests.resource.TestDefaultJarLocator;
-import org.eclipse.jst.jsf.core.tests.resource.TestResourceTracker;
-import org.eclipse.jst.jsf.core.tests.serialization.TLDAttributeSerializationTests;
-import org.eclipse.jst.jsf.test.util.junit4.FastTest;
-import org.junit.experimental.categories.Categories;
-import org.junit.experimental.categories.Categories.IncludeCategory;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Categories.class)
-@IncludeCategory(FastTest.class)
-@SuiteClasses(
-{ AllLifecycleListenerTests.class,
- TestResourceTracker.class, TLDAttributeSerializationTests.class ,
- FastClasspathEntryLifecycleTests.class, TestDefaultJarLocator.class})
-public class JSFCoreFastTests
-{
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/TestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/TestsPlugin.java
deleted file mode 100644
index bbddf88..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/TestsPlugin.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class TestsPlugin extends AbstractUIPlugin {
- private static String ID_BUNDLE = "org.eclipse.jst.jsf.core.tests";
-
- //The shared instance.
- private static TestsPlugin plugin;
-
- /**
- * The constructor.
- */
- public TestsPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- * @return the plugin
- */
- public static TestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.jst.jsf.core.tests", path);
- }
-
- /**
- * @return the url corresponding to the bundle's install location
- */
- public static URL getInstallLocation() {
- URL installLocation = Platform.getBundle(TestsPlugin.ID_BUNDLE).getEntry("/");
- URL resolvedLocation = null;
- try {
- resolvedLocation = FileLocator.resolve(installLocation);
- }
- catch (IOException e) {
- // impossible
- throw new Error(e);
- }
- return resolvedLocation;
- }
-
- /**
- * @param filepath
- * @return the File for the given path relative to the bundle install location
- */
- public static File getTestFile(String filepath) {
- URL installURL = getInstallLocation();
- //String scheme = installURL.getProtocol();
- String path = installURL.getPath();
- String location = path + filepath;
- File result = new File(location);
- return result;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/CompositeJSFAppConfigLocatorProviderStrategyTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/CompositeJSFAppConfigLocatorProviderStrategyTests.java
deleted file mode 100644
index 5b0cc23..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/CompositeJSFAppConfigLocatorProviderStrategyTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.CompositeJSFAppConfigLocatorProviderStrategy;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigLocatorProvider;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.junit.Test;
-
-public class CompositeJSFAppConfigLocatorProviderStrategyTests extends TestCase {
- WebProjectTestEnvironment projectTestEnvironment;
- JDTTestEnvironment jdtTestEnv;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
-
- projectTestEnvironment =
- new WebProjectTestEnvironment("CompositeJSFAppConfigLocatorProviderStrategyTests"+"_"+getName());
- boolean created = projectTestEnvironment.createProject(true);
-
- assertNotNull(projectTestEnvironment);
- assertNotNull(projectTestEnvironment.getTestProject());
- assertTrue(projectTestEnvironment.getTestProject().isAccessible());
-
- if (created) {
- // initialize test case for faces 1.1
- JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(projectTestEnvironment);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- }
- }
-
-//test ext-pt removed as it causes other tests to fail
-// @Test
-// public void testExtPtLocatorProvider() {
-// //uses the TestLocatorProvider that was loaded using ext-pt (currently)
-// CompositeLocatorProviderStrategy strategy = new CompositeLocatorProviderStrategy(projectTestEnvironment.getTestProject(), null);
-// assertNotNull(strategy.getLocators());
-// assertEquals(5, strategy.getLocators().size());//expecting FakeProvider + default set
-// assertTrue(strategy.getLocators().get(0).getClass().getSimpleName().equals("FakeLocator"));
-//
-// IJSFAppConfigManager mgr = JSFAppConfigManagerFactory.getInstance(projectTestEnvironment.getTestProject());
-// assertNotNull(mgr.getManagedBeans());
-// assertEquals(TestLocatorProvider.MANAGED_BEAN_COUNT, mgr.getManagedBeans().size());
-// ManagedBeanType bean = (ManagedBeanType)mgr.getManagedBeans().get(0);
-// assertTrue( bean.getManagedBeanName().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_NAME_PREFIX));
-// assertTrue( bean.getManagedBeanClass().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_CLASS_PREFIX));
-// }
-
- @Test
- public void testTestableLocatorProvider() throws Exception {
- //uses the TestLocatorProvider
- int EXPECTED_BEAN_COUNT = 3;
- IJSFAppConfigLocatorProvider testLocatorProvider = new TestLocatorProvider(EXPECTED_BEAN_COUNT);
- projectTestEnvironment.getTestProject().setSessionProperty(CompositeJSFAppConfigLocatorProviderStrategy.TESTABLE_FACTORY_SESSION_KEY, testLocatorProvider);
- CompositeJSFAppConfigLocatorProviderStrategy strategy = new CompositeJSFAppConfigLocatorProviderStrategy(projectTestEnvironment.getTestProject());
- assertNotNull(strategy.getLocators());
- assertEquals(5, strategy.getLocators().size());//expecting FakeProvider + default set
- assertTrue(strategy.getLocators().get(0).getClass().getSimpleName().equals("FakeLocator"));
- }
-
- public void testDefaultLocatorProvider() {
- //since we are not using an extension, if no testable is provided, must be using default
- CompositeJSFAppConfigLocatorProviderStrategy strategy = new CompositeJSFAppConfigLocatorProviderStrategy(projectTestEnvironment.getTestProject());
- assertNotNull(strategy.getLocators());
- assertEquals(4, strategy.getLocators().size());//expecting default set only
- assertTrue(strategy.getLocators().get(0).getClass().getSimpleName().equals("ImplicitRuntimeJSFAppConfigLocater"));
-
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/JSFAppConfigManagerFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/JSFAppConfigManagerFactoryTests.java
deleted file mode 100644
index 90ba9b2..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/JSFAppConfigManagerFactoryTests.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.JSFAppConfigManagerFactory;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class JSFAppConfigManagerFactoryTests extends TestCase {
- WebProjectTestEnvironment projectTestEnvironment;
- JDTTestEnvironment jdtTestEnv;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
-
- projectTestEnvironment =
- new WebProjectTestEnvironment("JSFAppConfigManagerFactoryTests"+"_"+getName());
- boolean created = projectTestEnvironment.createProject(true);
-
- assertNotNull(projectTestEnvironment);
- assertNotNull(projectTestEnvironment.getTestProject());
- assertTrue(projectTestEnvironment.getTestProject().isAccessible());
-
- if (created) {
- // initialize test case for faces 1.1
- JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(projectTestEnvironment);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- }
- }
-
- public void testDefaultJSFAppConfigManagerSetup() {
- //test extension must be removed for this to work
- IJSFAppConfigManager mgr = JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(projectTestEnvironment.getTestProject());
- assertNotNull(mgr);
- assertEquals("org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager", mgr.getClass().getName());
-
- //verify getting same instance when called the second time
- IJSFAppConfigManager mgr2 = JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(projectTestEnvironment.getTestProject());
- assertNotNull(mgr2);
- assertEquals(mgr, mgr2);
-
- //verify that the deprecated call results in same instance
- JSFAppConfigManager mgr3 = JSFAppConfigManager.getInstance(projectTestEnvironment.getTestProject());
- assertNotNull(mgr3);
- assertEquals(mgr, mgr3);
- assertNotNull(mgr3.getManagedBeans());
- }
-
-// test extension disabled becuz it screws up tests
-// public void testExtPtJSFAppConfigManagerSetup() {
-// IJSFAppConfigManager mgr = JSFAppConfigManagerFactory.getInstance(projectTestEnvironment.getTestProject());
-// assertNotNull(mgr);
-// assertEquals("TestJSFAppConfigManager", mgr.getClass().getSimpleName());
-// assertNotNull(mgr.getManagedBeans());
-// assertEquals(TestLocatorProvider.MANAGED_BEAN_COUNT, mgr.getManagedBeans().size());
-// ManagedBeanType bean = (ManagedBeanType)mgr.getManagedBeans().get(0);
-// assertTrue( bean.getManagedBeanName().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_NAME_PREFIX));
-// assertTrue( bean.getManagedBeanClass().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_CLASS_PREFIX));
-// }
-
- public void testTestableJSFAppConfigManagerSetup() throws Exception {
- projectTestEnvironment.getTestProject().setSessionProperty(JSFAppConfigManagerFactory.TESTABLE_FACTORY_SESSION_KEY, new TestJSFAppConfigManagerFactory());
- IJSFAppConfigManager mgr = JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(projectTestEnvironment.getTestProject());
- assertNotNull(mgr);
- assertEquals("TestJSFAppConfigManager", mgr.getClass().getSimpleName());
- assertNotNull(mgr.getManagedBeans());
- assertEquals(TestLocatorProvider.MANAGED_BEAN_COUNT, mgr.getManagedBeans().size());
- ManagedBeanType bean = (ManagedBeanType)mgr.getManagedBeans().get(0);
- assertTrue( bean.getManagedBeanName().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_NAME_PREFIX));
- assertTrue( bean.getManagedBeanClass().getTextContent().contains(TestLocatorProvider.MANAGED_BEAN_CLASS_PREFIX));
-
- IJSFAppConfigManager mgr2 = JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(projectTestEnvironment.getTestProject());
- assertNotNull(mgr2);
- assertEquals(mgr, mgr2);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManager.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManager.java
deleted file mode 100644
index 3744a71..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManager.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.jst.jsf.core.jsfappconfig.IFacesConfigChangeListener;
-import org.eclipse.jst.jsf.core.jsfappconfig.IJSFAppConfigProvider;
-import org.eclipse.jst.jsf.core.jsfappconfig.IJSFAppConfigProvidersChangeListener;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.CompositeJSFAppConfigLocatorProviderStrategy;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
-import org.eclipse.jst.jsf.facesconfig.emf.BehaviorType;
-import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
-import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigExtensionType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
-import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
-import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
-import org.eclipse.jst.jsf.facesconfig.emf.ReferencedBeanType;
-import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
-import org.eclipse.jst.jsf.facesconfig.emf.ResourceBundleType;
-import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
-
-public class TestJSFAppConfigManager implements IJSFAppConfigManager {
-
- private IProject _project;
- private IJSFAppConfigManager _manager;
- private final AtomicBoolean _isDisposed = new AtomicBoolean(false);
-
- public TestJSFAppConfigManager(final IProject project,
- final TestLocatorProvider testLocatorProvider) throws Exception{
-
- _project = project;
- _project.setSessionProperty(CompositeJSFAppConfigLocatorProviderStrategy.TESTABLE_FACTORY_SESSION_KEY, testLocatorProvider);
-
- }
-
- public IProject getProject() {
- return _project;
- }
-
- private IJSFAppConfigManager getManager() {
- if (_manager == null) {
- //deprecated is to be expected
- _manager = JSFAppConfigManager.getInstance(_project);
- }
- return _manager;
- }
- public boolean addJSFAppConfigProvidersChangeListener(
- IJSFAppConfigProvidersChangeListener listener) {
- return getManager().addJSFAppConfigProvidersChangeListener(listener);
- }
-
- public boolean removeJSFAppConfigProvidersChangeListener(
- IJSFAppConfigProvidersChangeListener listener) {
- return getManager().removeJSFAppConfigProvidersChangeListener(listener);
- }
-
- public void notifyJSFAppConfigProvidersChangeListeners(
- IJSFAppConfigProvider configProvider, int eventType) {
-
- getManager().notifyJSFAppConfigProvidersChangeListeners(configProvider, eventType);
- }
-
- @SuppressWarnings("rawtypes")
- public Object addFacesConfigChangeListener(Class emfClass,
- IFacesConfigChangeListener listener) {
-
- return getManager().addFacesConfigChangeListener(emfClass, listener);
- }
-
- @SuppressWarnings("rawtypes")
- public Object removeFacesConfigChangeListener(Class emfClass) {
- return getManager().removeFacesConfigChangeListener(emfClass);
- }
-
- public void notifyFacesConfigChangeListeners(Notification notification) {
- getManager().notifyFacesConfigChangeListeners(notification);
- }
-
-// public Set<IJSFAppConfigProvider> getJSFAppConfigProviders() {
-// return getManager().getJSFAppConfigProviders();
-// }
-
-// public List<FacesConfigType> getFacesConfigModels() {
-// return getManager().getFacesConfigModels();
-// }
-
- public List<ManagedBeanType> getManagedBeans() {
- return getManager().getManagedBeans();
- }
-
- public List<String> getPropertyResolvers() {
- return getManager().getPropertyResolvers();
- }
-
- public List<ValidatorType> getValidators() {
- return getManager().getValidators();
- }
-
- public List<String> getVariableResolvers() {
- return getManager().getVariableResolvers();
- }
-
- public List<ConverterType> getConverters() {
- return getManager().getConverters();
- }
-
- public List<NavigationRuleType> getNavigationRules() {
- return getManager().getNavigationRules();
- }
-
- public List<NavigationRuleType> getNavigationRulesForPage(IFile pageFile) {
- return getManager().getNavigationRulesForPage(pageFile);
- }
-
- public List<ApplicationType> getApplications() {
- return getManager().getApplications();
- }
-
- public List<FactoryType> getFactories() {
- return getManager().getFactories();
- }
-
- public List<ComponentType> getComponents() {
- return getManager().getComponents();
- }
-
- public List<ReferencedBeanType> getReferencedBeans() {
- return getManager().getReferencedBeans();
- }
-
- public List<RenderKitType> getRenderKits() {
- return getManager().getRenderKits();
- }
-
- public List<LifecycleType> getLifecycles() {
- return getManager().getLifecycles();
- }
-
- public List<ResourceBundleType> getResourceBundles() {
- return getManager().getResourceBundles();
- }
-
- public List<FacesConfigExtensionType> getFacesConfigExtensions() {
- return getManager().getFacesConfigExtensions();
- }
-
- public List<BehaviorType> getBehaviors() {
- return getManager().getBehaviors();
- }
-
- public void addFacesConfigChangeAdapter(FacesConfigType facesConfig) {
- getManager().addFacesConfigChangeAdapter(facesConfig);
-
- }
-
- public void removeFacesConfigChangeAdapter(FacesConfigType facesConfig) {
- getManager().removeFacesConfigChangeAdapter(facesConfig);
- }
-
- public void dispose() {
- _isDisposed.compareAndSet(false, true);
- }
-
- public void destroy() {
- // TODO Auto-generated method stub
-
- }
-
- public void checkpoint() {
- // TODO Auto-generated method stub
-
- }
-
- public boolean isDisposed() {
- return _isDisposed.get();
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactory.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactory.java
deleted file mode 100644
index c14fcdb..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManagerFactory;
-
-public class TestJSFAppConfigManagerFactory implements IJSFAppConfigManagerFactory {
-
- public IJSFAppConfigManager getInstance(IProject project) {
- try {
- return new TestJSFAppConfigManager(project, new TestLocatorProvider());
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public void destroy() {
- // TODO Auto-generated method stub
-
- }
-
- public void checkpoint() {
- // TODO Auto-generated method stub
-
- }
-
- public boolean isDisposed() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactoryFromExtension.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactoryFromExtension.java
deleted file mode 100644
index eb3206e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactoryFromExtension.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.internal.managedobject.AbstractManagedObject;
-import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManagerFactory;
-
-public class TestJSFAppConfigManagerFactoryFromExtension
- extends AbstractManagedObject
- implements IJSFAppConfigManagerFactory {
-
- public IJSFAppConfigManager getInstance(final IProject project) throws ManagedObjectException {
- return new TestJSFAppConfigManagerFromExtension(project);
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
- }
-
- public void destroy() {
- // TODO Auto-generated method stub
- }
-
- public void checkpoint() {
- // TODO Auto-generated method stub
- }
-
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFromExtension.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFromExtension.java
deleted file mode 100644
index 288e909..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFromExtension.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.AbstractJSFAppConfigManager;
-
-public class TestJSFAppConfigManagerFromExtension extends
- AbstractJSFAppConfigManager {
-
- public TestJSFAppConfigManagerFromExtension(IProject project) {
- super(project);
- }
-
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestLocatorProvider.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestLocatorProvider.java
deleted file mode 100644
index 50d5c9d..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestLocatorProvider.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.appconfig;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jst.jsf.core.jsfappconfig.AbstractJSFAppConfigLocater;
-import org.eclipse.jst.jsf.core.jsfappconfig.AbstractJSFAppConfigProvider;
-import org.eclipse.jst.jsf.core.jsfappconfig.IJSFAppConfigLocater;
-import org.eclipse.jst.jsf.core.jsfappconfig.IJSFAppConfigProvider;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.DefaultJSFAppConfigLocatorProviderStrategy;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigLocatorProvider;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanClassType;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanNameType;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
-
-/**
- * An {@link IJSFAppConfigLocatorProvider} that adds a faked {@link IJSFAppConfigLocater} and all of the default platform locators
- *
- */
-public class TestLocatorProvider implements IJSFAppConfigLocatorProvider {
-
- public static final String MANAGED_BEAN_NAME_PREFIX = "MyManagedBean";
- public static final String MANAGED_BEAN_CLASS_PREFIX = "com.foo.MyManagedBeanClass";
- public static final int MANAGED_BEAN_COUNT = 10;
- public int managed_bean_count = 0;
-
- public TestLocatorProvider(int count) {
- managed_bean_count = count;
- }
-
- public TestLocatorProvider() {
- managed_bean_count = MANAGED_BEAN_COUNT;
- }
-
- public List<IJSFAppConfigLocater> getLocators() {
- List<IJSFAppConfigLocater> ret = new ArrayList<IJSFAppConfigLocater>();
- ret.add(new FakeLocator());
- ret.addAll(new DefaultJSFAppConfigLocatorProviderStrategy().getLocators());
- return Collections.unmodifiableList(ret);
- }
-
- /**
- * Set how many beans should be created by the Provider
- * @param count
- */
- public void setBeanCreationCount(int count) {
- managed_bean_count = count;
- }
-
- private class FakeLocator extends AbstractJSFAppConfigLocater {
-
- private Set<IJSFAppConfigProvider> _providers;
-
- @Override
- public Set<IJSFAppConfigProvider> getJSFAppConfigProviders() {
- if (_providers == null) {
- _providers = new HashSet<IJSFAppConfigProvider>();
- _providers.add(new FakeProvider());
- }
- return Collections.unmodifiableSet(_providers);
- }
-
- @Override
- public void startLocating() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void stopLocating() {
- // TODO Auto-generated method stub
- }
- }
-
- private class FakeProvider extends AbstractJSFAppConfigProvider {
-
- private FacesConfigType _model;
-
- @Override
- public FacesConfigType getFacesConfigModel() {
- if (_model == null) {
- FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
- _model = fac.createFacesConfigType();
- addFakeBeans(fac, _model);
- }
- return _model;
- }
-
- @SuppressWarnings("unchecked")
- private void addFakeBeans(FacesConfigFactory fac, FacesConfigType model) {
- for (int i=0; i<TestLocatorProvider.this.managed_bean_count; i++) {
- ManagedBeanType bean = fac.createManagedBeanType();
-
- ManagedBeanNameType name = fac.createManagedBeanNameType();
- name.setTextContent(MANAGED_BEAN_NAME_PREFIX+i);
- bean.setManagedBeanName(name);
-
- ManagedBeanClassType klass = fac.createManagedBeanClassType();
- klass.setTextContent(MANAGED_BEAN_CLASS_PREFIX+i);
- bean.setManagedBeanClass(klass);
-
- model.getManagedBean().add(bean);
- }
- }
-
- @Override
- public void releaseFacesConfigModel() {
- _model = null;
- }
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/provider/TestJARFileJSFAppConfigProvider.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/provider/TestJARFileJSFAppConfigProvider.java
deleted file mode 100644
index 554de1d..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/provider/TestJARFileJSFAppConfigProvider.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.appconfig.provider;
-
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.net.ProxyData;
-import org.eclipse.core.internal.net.ProxyManager;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.jsfappconfig.IJSFAppConfigLocater;
-import org.eclipse.jst.jsf.core.jsfappconfig.JARFileJSFAppConfigProvider;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils;
-import org.eclipse.jst.jsf.core.jsfappconfig.RuntimeClasspathJSFAppConfigLocater;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.facesconfig.emf.ComponentExtensionType;
-import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
-
-/**
- * Unit test for JARFileJSFAppConfigProvider, the app config provider used to
- * load faces-config models from jars (i.e. classpath libraries).
- *
- * @author cbateman
- *
- */
-public class TestJARFileJSFAppConfigProvider extends TestCase
-{
- private final static String NO_EXT_DATA_JAR_PATH =
- "/testfiles/appconfig/noextdata.jar";
- private final static String WITH_EXT_DATA_JAR_PATH =
- "/testfiles/appconfig/withextdata.jar";
- private final static String NO_FACES_CONFIG_FILE =
- "/testfiles/appconfig/fail2_nofacesconfig.jar";
-
- private final static String FAIL_JAR_PATH =
- "/testfiles/appconfig/fail2.jar";
-
- private WebProjectTestEnvironment _testEnv;
- private JDTTestEnvironment _jdtTestEnv;
-
- private IClasspathEntry _noExtData;
- private IClasspathEntry _withExtData;
- private IClasspathEntry _noFacesConfigFile;
- private IResource _copiedIntoProject;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- setInternetPrefs();
- // JSFTestUtil.setInternetProxyPreferences
- // (true, "www-proxy.us.oracle.com", "80");
-
- _testEnv =
- new WebProjectTestEnvironment("ELValidationTest_"
- + this.getClass().getName() + "_" + getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- _copiedIntoProject =
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault()
- .getBundle(), FAIL_JAR_PATH, "WEB-INF/lib/fail2.jar");
- assertNotNull(_copiedIntoProject);
- assertTrue(_copiedIntoProject.exists());
-
- _jdtTestEnv = new JDTTestEnvironment(_testEnv);
- _noExtData =
- _jdtTestEnv.addJarClasspathEntry(TestsPlugin.getDefault()
- .getBundle(), NO_EXT_DATA_JAR_PATH);
- assertNotNull(_noExtData);
-
- _withExtData =
- _jdtTestEnv.addJarClasspathEntry(TestsPlugin.getDefault()
- .getBundle(), WITH_EXT_DATA_JAR_PATH);
- assertNotNull(_withExtData);
-
- _noFacesConfigFile =
- _jdtTestEnv.addJarClasspathEntry(TestsPlugin.getDefault()
- .getBundle(), NO_FACES_CONFIG_FILE);
- assertNotNull(_noFacesConfigFile);
-
- // initialize test case for faces 1.1
- final JSFFacetedTestEnvironment jsfFacedEnv =
- new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- // ensure the project can be deleted (no jar lock:
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195867)
- final IVirtualContainer container = _testEnv.getWebRoot(false, false);
- assertNotNull(container);
- final IFile file =
- container.getFile("WEB-INF/lib/fail2.jar").getUnderlyingFile();
- assertNotNull(file);
- assertTrue(file.exists());
- _testEnv.getTestProject().delete(true, null);
- assertFalse(_testEnv.getTestProject().exists());
- assertFalse(file.exists());
- }
-
- /**
- * Tests model load of a simple jar-based faces config file that has no
- * extension data in it.
- */
- public void testNoExtensionData() throws Exception
- {
- final JARFileJSFAppConfigProvider provider = createProvider(_noExtData, true);
- final FacesConfigType facesConfig = provider.getFacesConfigModel();
- assertNotNull(facesConfig);
-
- verifyCommonElements(facesConfig);
- }
-
- /**
- * This is a regression for
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=181643
- *
- * At the present time we are not able to support extension data inside of
- * jar file-based facesConfig files because the EMF2DOMSEE adapter doesn't
- * support jar-loading and we rely on this class for our renderer
- * workarounds.
- *
- * @throws Exception
- */
- public void testWithExtensionData() throws Exception
- {
- final JARFileJSFAppConfigProvider provider =
- createProvider(_withExtData, true);
- final FacesConfigType facesConfig = provider.getFacesConfigModel();
- assertNotNull(facesConfig);
-
- verifyCommonElements(facesConfig);
-
- final ComponentType componentType =
- (ComponentType) facesConfig.getComponent().get(0);
- assertEquals(1, componentType.getComponentExtension().size());
-
- final ComponentExtensionType extType =
- (ComponentExtensionType) componentType.getComponentExtension()
- .get(0);
- // this value should actually be 1, but we are not able to use our
- // worked-around
- // translation renderer for jar files. This assertion is intended to
- // break
- // once translation of ANY content is fixed for JAR-contained
- // faces-config models
- assertEquals(0, extType.getChildNodes().size());
- }
-
- public void testJarCopiedInProject() throws Exception
- {
- final JARFileJSFAppConfigProvider provider =
- createProvider((IFile) _copiedIntoProject);
- final FacesConfigType facesConfig = provider.getFacesConfigModel();
- assertNotNull(facesConfig);
- }
-
- public void testNoFacesConfigJar() throws Exception
- {
- final JARFileJSFAppConfigProvider provider =
- createProvider(_noFacesConfigFile, false);
- final FacesConfigType facesConfig = provider.getFacesConfigModel();
- assertNull(facesConfig);
- }
-
- private void verifyCommonElements(final FacesConfigType facesConfig)
- {
- assertEquals(1, facesConfig.getComponent().size());
- final ComponentType component =
- (ComponentType) facesConfig.getComponent().get(0);
- assertEquals("com.ibm.odc.jsf.RichTextEditor", component
- .getComponentType().getTextContent());
- assertEquals(
- "com.ibm.odc.jsf.components.components.rte.UIRichTextEditor",
- component.getComponentClass().getTextContent());
-
- assertEquals(1, facesConfig.getManagedBean().size());
- final ManagedBeanType managedBean =
- (ManagedBeanType) facesConfig.getManagedBean().get(0);
- assertEquals("jarBean", managedBean.getManagedBeanName()
- .getTextContent());
- assertEquals("java.util.List", managedBean.getManagedBeanClass()
- .getTextContent());
- assertEquals("request", managedBean.getManagedBeanScope()
- .getTextContent());
- }
-
- private JARFileJSFAppConfigProvider createProvider(final IFile file)
- throws Exception
- {
- final String libName = file.getLocation().toOSString();
-
- final IJSFAppConfigLocater locator =
- new RuntimeClasspathJSFAppConfigLocater();
-
- //until setJSFAppConfigManager accepts IJSFAppConfigManagers, leave deprecated method call
- locator.setJSFAppConfigManager((IJSFAppConfigManager)JSFAppConfigManager.getInstance(_testEnv
- .getTestProject()));
- final JARFileJSFAppConfigProvider provider =
- new JARFileJSFAppConfigProvider(libName);
- provider.setJSFAppConfigLocater(locator);
- return provider;
- }
-
- private JARFileJSFAppConfigProvider createProvider(final IClasspathEntry forJar,
- final boolean assertFacesConfig) throws Exception
- {
- final String libName = getLibraryName(forJar, assertFacesConfig);
-
- final IJSFAppConfigLocater locator =
- new RuntimeClasspathJSFAppConfigLocater();
-
- //until setJSFAppConfigManager accepts IJSFAppConfigManagers, leave deprecated method call
- locator.setJSFAppConfigManager((IJSFAppConfigManager)JSFAppConfigManager.getInstance(_testEnv
- .getTestProject()));
- final JARFileJSFAppConfigProvider provider =
- new JARFileJSFAppConfigProvider(libName);
- provider.setJSFAppConfigLocater(locator);
- return provider;
- }
-
- private static String getLibraryName(final IClasspathEntry classPathEntry,
- final boolean assertFacesConfig) throws Exception
- {
- final IPath libraryPath = classPathEntry.getPath();
-
- final String libraryPathString = libraryPath.toOSString();
-
- if (assertFacesConfig)
- {
- JarFile jarFile = null;
-
- try
- {
- jarFile = new JarFile(libraryPathString, false);
- if (jarFile != null)
- {
- final JarEntry jarEntry =
- jarFile
- .getJarEntry(JSFAppConfigUtils.FACES_CONFIG_IN_JAR_PATH);
- assertNotNull(jarEntry);
- }
- }
- finally
- {
- if (jarFile != null)
- {
- jarFile.close();
- }
- }
- }
-
- return libraryPathString;
- }
-
- private static void setInternetPrefs() throws Exception
- {
- final IProxyService proxy = ProxyManager.getProxyManager();
-
- final ProxyData proxyData = new ProxyData(IProxyData.HTTP_PROXY_TYPE);
- proxyData.setHost("www-proxy.us.oracle.com");
- proxyData.setPassword("80");
- proxy.setProxyData(new ProxyData[]
- { proxyData });
- proxy.setProxiesEnabled(true);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/validation/AppConfigValidationUtilTestCase.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/validation/AppConfigValidationUtilTestCase.java
deleted file mode 100644
index b119d37..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/validation/AppConfigValidationUtilTestCase.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.appconfig.validation;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.ProjectTestEnvironment;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidationUtil;
-import org.eclipse.jst.jsf.validation.internal.appconfig.DiagnosticFactory;
-import org.eclipse.jst.jsf.validation.internal.appconfig.ILocalizedMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-/**
- * Unit tests for AppConfigValidationUtil
- *
- * @author cbateman
- *
- */
-public class AppConfigValidationUtilTestCase extends TestCase
-{
- private ProjectTestEnvironment _testEnvironment;
- private JDTTestEnvironment _jdtTestEnvironment;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
-
- _testEnvironment =
- new WebProjectTestEnvironment("AppConfigValidationUtilTestCase_"+getName());
- _testEnvironment.createProject(true);
-
- _jdtTestEnvironment = new JDTTestEnvironment(_testEnvironment);
-
- TestFileResource resource = new TestFileResource();
- resource.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestEnum1.java.data");
-
- _jdtTestEnvironment.addSourceFile("src", "org.eclipse.jst.jsf.core.tests.util", "TestEnum1", resource.toString());
-
- resource = new TestFileResource();
- resource.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data");
- _jdtTestEnvironment.addSourceFile("src", "com.test", "TestBean1", resource.toString());
-
- resource = new TestFileResource();
- resource.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1Subclass.java.data");
- _jdtTestEnvironment.addSourceFile("src", "com.test", "TestBean1Subclass", resource.toString());
- }
-
- /**
- * test validateELExpression method
- */
- public void testValidateELExpression()
- {
- final String validELString1 = "#{x.y}";
- final String validELString2 = "#{a.b.c}";
- final String inValidEmptyExpr = "#{}";
- final String inValidNoBraces = "x.y";
- final String inValidSyntaxInEL = "#{x.[}";
-
- assertNull(AppConfigValidationUtil.validateELExpression(validELString1));
- assertNull(AppConfigValidationUtil.validateELExpression(validELString2));
-
- IMessage message = AppConfigValidationUtil.validateELExpression(inValidEmptyExpr);
- assertNotNull(message);
- assertEquals(DiagnosticFactory.SYNTAX_ERROR_IN_EL_ID,
- ((ILocalizedMessage)message).getErrorCode());
-
- message = AppConfigValidationUtil.validateELExpression(inValidNoBraces);
- assertNotNull(message);
- assertEquals(DiagnosticFactory.EL_EXPR_MUST_BE_IN_HASH_BRACES_ID,
- ((ILocalizedMessage)message).getErrorCode());
-
- message = AppConfigValidationUtil.validateELExpression(inValidSyntaxInEL);
- assertNotNull(message);
- assertEquals(DiagnosticFactory.SYNTAX_ERROR_IN_EL_ID,
- ((ILocalizedMessage)message).getErrorCode());
- }
-
- public void testValidateClassName_NoError() throws Exception
- {
- final IProject project = _testEnvironment.getTestProject();
-
-
- // null indicates no problem
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1", null, true, project));
- // TestBean1 is a class, so mustBeClass should have no effect on outcome
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1", null, false, project));
-
- // should react the same as TestBean1 since is a class
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1Subclass", null, true, project));
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1Subclass", null, false, project));
- // TestBean1Subclass is-a TestBean1
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1Subclass", "com.test.TestBean1", true, project));
- assertNull(AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1Subclass", "com.test.TestBean1", false, project));
-
- // will succeed for enums if mustBeClass == false
- assertNull(AppConfigValidationUtil.validateClassName
- ("org.eclipse.jst.jsf.core.tests.util.TestEnum1", null, false, project));
- // the enum is-a Enum
- assertNull(AppConfigValidationUtil.validateClassName
- ("org.eclipse.jst.jsf.core.tests.util.TestEnum1", "java.lang.Enum", false, project));
- }
-
- public void testValidateClassName_Errors() throws Exception
- {
- final IProject project = _testEnvironment.getTestProject();
-
- // invalid name
- IMessage error = AppConfigValidationUtil.validateClassName
- ("com.test.NoTaVAliDClAss", null, false, project);
- assertNotNull(error);
- assertEquals(DiagnosticFactory.CANNOT_FIND_CLASS_NAME_ID, ((ILocalizedMessage)error).getErrorCode());
-
- // must be a class but is an enum
- error = AppConfigValidationUtil.validateClassName
- ("org.eclipse.jst.jsf.core.tests.util.TestEnum1", null, true, project);
- assertNotNull(error);
- assertEquals(DiagnosticFactory.FULLY_QUALIFIED_NAME_MUST_BE_A_CLASS_ID, ((ILocalizedMessage)error).getErrorCode());
-
- // must be an instanceof javax.faces.Converter but is not
- error = AppConfigValidationUtil.validateClassName
- ("com.test.TestBean1", "javax.faces.Converter", true, project);
- assertNotNull(error);
- assertEquals(DiagnosticFactory.CLASS_MUST_BE_INSTANCE_OF_ID, ((ILocalizedMessage)error).getErrorCode());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/contenttype/TestContentTypes.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/contenttype/TestContentTypes.java
deleted file mode 100644
index 5ac1f55..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/contenttype/TestContentTypes.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.contenttype;
-
-import java.util.zip.ZipFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.osgi.framework.Bundle;
-
-/**
- * Test that content types are being calculated correctly.
- *
- * @author Ian Trimble - Oracle
- */
-public class TestContentTypes extends TestCase {
-
- private static final String FACELET_FILENAME =
- "WebContent/contentType_jsf_facelet.xhtml"; //$NON-NLS-1$
- private static final String FACELET_COMPOSITE_FILENAME =
- "WebContent/resources/ezcomp/contentType_jsf_facelet_composite.xhtml"; //$NON-NLS-1$
-
- private WebProjectTestEnvironment _webProject;
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80"); //$NON-NLS-1$ //$NON-NLS-2$
-
- final ZipFile zipFile = JSFTestUtil.createZipFile(
- TestsPlugin.getDefault().getBundle(),
- "/testfiles/testzips/TestProject1.zip"); //$NON-NLS-1$
- _webProject = new WebProjectTestEnvironment(
- this,
- JavaFacet.VERSION_1_5,
- ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5")); //$NON-NLS-1$ //$NON-NLS-2$
- _webProject.createFromZip2(zipFile, true);
- Job.getJobManager().beginRule(_webProject.getTestProject(), null);
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- @Override
- protected void tearDown() throws Exception {
- Job.getJobManager().endRule(_webProject.getTestProject());
- super.tearDown();
- }
-
- /**
- * Sanity check.
- * @throws Exception when one or more errors occur during test.
- */
- public void testSanity() throws Exception {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile faceletFile = project.getFile(new Path(FACELET_FILENAME));
- assertTrue(faceletFile.isAccessible());
-
- final IFile faceletCompositeFile = project.getFile(new Path(FACELET_COMPOSITE_FILENAME));
- assertTrue(faceletCompositeFile.isAccessible());
- }
-
- /**
- * Test that accessing describer class does not change the bundle state.
- * @throws Exception when one or more errors occur during test.
- */
- public void testNoBundleStateChange() throws Exception {
- //assert bundle is available
- final Bundle bundle = Platform.getBundle("org.eclipse.jst.jsf.core"); //$NON-NLS-1$
- assertNotNull(bundle);
-
- //get initial bundle state
- final int initialBundleState = bundle.getState();
-
- //assert test file has expected content type (and, therefore, describer class was loaded)
- final IFile faceletFile = _webProject.getTestProject().getFile(new Path(FACELET_FILENAME));
- assertTrue(hasContentType(
- faceletFile.getFullPath().toString(), "jsf.facelet")); //$NON-NLS-1$
-
- //assert bundle state has not been changed
- assertEquals(
- "Bundle state changed while querying content type", //$NON-NLS-1$
- initialBundleState, bundle.getState());
- }
-
- /**
- * Test that the "jsf.facelet" content type is being calculated correctly.
- * @throws Exception when one or more errors occur during test.
- */
- public void testJSFFaceletContentType() throws Exception {
- final IFile faceletFile = _webProject.getTestProject().getFile(
- new Path(FACELET_FILENAME));
- assertTrue(hasContentType(
- faceletFile.getFullPath().toString(), "jsf.facelet")); //$NON-NLS-1$
- }
-
- /**
- * Test that the "jsf.facelet.composite" content type is being calculated correctly.
- * @throws Exception when one or more errors occur during test.
- */
- public void testJSFFaceletCompositeContentType() throws Exception {
- final IFile faceletFile = _webProject.getTestProject().getFile(
- new Path(FACELET_COMPOSITE_FILENAME));
- assertTrue(hasContentType(
- faceletFile.getFullPath().toString(), "jsf.facelet.composite")); //$NON-NLS-1$
- }
-
- private boolean hasContentType(String filename, String contentTypeId) {
- boolean hasContentType = false;
- final IContentType[] contentTypes =
- Platform.getContentTypeManager().findContentTypesFor(filename);
- for (final IContentType contentType: contentTypes) {
- if (contentTypeId.equals(contentType.getId())) {
- hasContentType = true;
- break;
- }
- }
- return hasContentType;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryProviderTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryProviderTests.java
deleted file mode 100644
index c497a6a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryProviderTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 Oracle 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:
- * Debajit Adhikary - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
-import org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderInstallOperationConfig;
-import org.eclipse.jst.common.project.facet.core.libprov.osgi.OsgiBundlesLibraryProviderInstallOperationConfig;
-import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperationConfig;
-import org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate;
-
-
-/**
- * @author Debajit Adhikary
- *
- */
-public class JsfLibraryProviderTests extends TestCase
-{
- /**
- * @param name
- */
- public JsfLibraryProviderTests (final String name)
- {
- super(name);
- }
-
-
- public void testGetUserLibProviderFromLibConfig ()
- {
- assertNull(JSFFacetInstallDelegate.getUserLibConfig(new LibraryProviderOperationConfig()));
- assertNull(JSFFacetInstallDelegate.getUserLibConfig(new NoOpLibraryProviderInstallOperationConfig()));
- assertNull(JSFFacetInstallDelegate.getUserLibConfig(new OsgiBundlesLibraryProviderInstallOperationConfig()));
-
- assertNotNull(JSFFacetInstallDelegate.getUserLibConfig(new UserLibraryProviderInstallOperationConfig()));
- assertNotNull(JSFFacetInstallDelegate.getUserLibConfig(new WtpUserLibraryProviderInstallOperationConfig()));
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryValidatorTest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryValidatorTest.java
deleted file mode 100644
index 1b58f51..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryValidatorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-
-/**
- * @author Debajit Adhikary
- *
- */
-public class JsfLibraryValidatorTest extends LibraryValidatorTest
-{
- private static final String CLASS_NAME_IDENTIFYING_IMPLEMENTATION_JAR = "javax/faces/render/RenderKit.class"; //$NON-NLS-1$
- private static final String JARFILE = "testfiles/facet/jsflibrary-api-1.1.3.jar"; //$NON-NLS-1$
- private static final String JARFILE_WITHOUT_IMPLEMENTATION_VERSION_ENTRY = "testfiles/facet/no-version-entry/jsflibrary-api-1.1.3.jar"; //$NON-NLS-1$
- private static final String JARFILE_WITH_NONSTANDARD_IMPLEMENTATION_VERSION_ENTRY = "testfiles/facet/nonstandard_implementation_version/jsflibrary-api-1.1.3.jar"; //$NON-NLS-1$
- private static final String EXPECTED_LIBRARY_VERSION = "1.1.3"; //$NON-NLS-1$
-
-
- /**
- * @param name
- */
- public JsfLibraryValidatorTest (final String name)
- {
- super(name,
- CLASS_NAME_IDENTIFYING_IMPLEMENTATION_JAR,
- JARFILE,
- JARFILE_WITHOUT_IMPLEMENTATION_VERSION_ENTRY,
- JARFILE_WITH_NONSTANDARD_IMPLEMENTATION_VERSION_ENTRY,
- EXPECTED_LIBRARY_VERSION);
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/LibraryValidatorTest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/LibraryValidatorTest.java
deleted file mode 100644
index ccd3c29..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/LibraryValidatorTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.jar.JarFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.osgi.framework.Bundle;
-
-
-/**
- * @author Debajit Adhikary
- *
- */
-public abstract class LibraryValidatorTest extends TestCase
-{
- private String classNameIdentifyingJarToUse;
- private String jarPath;
- private String jarPathWithoutImplementationVersionEntry;
- private String jarPathWithNonstandardImplementationVersionEntry;
- private String expectedLibraryVersion;
- private UserLibraryVersionValidatorProxy validator;
-
-
- /**
- * @param name
- */
- public LibraryValidatorTest (final String name)
- {
- super(name);
- }
-
-
- public LibraryValidatorTest (final String name,
- final String classNameIdentifyingJarToUse,
- final String jarPath,
- final String jarPathWithoutImplementationVersionEntry,
- final String jarPathWithNonstandardImplementationVersionEntry,
- final String expectedLibraryVersion)
- {
- super(name);
-
- this.classNameIdentifyingJarToUse = classNameIdentifyingJarToUse;
- this.jarPath = jarPath;
- this.jarPathWithoutImplementationVersionEntry = jarPathWithoutImplementationVersionEntry;
- this.jarPathWithNonstandardImplementationVersionEntry = jarPathWithNonstandardImplementationVersionEntry;
- this.expectedLibraryVersion = expectedLibraryVersion;
-
- this.validator = new UserLibraryVersionValidatorProxy(this.classNameIdentifyingJarToUse);
- }
-
-
- public void testVersionStringSuffixMatch ()
- {
- assertNotNull(validator);
-
- final IStatus status = validator.validateVersionStrings("1.2", "1.1.2");
- assertEquals(IStatus.WARNING, status.getSeverity());
- }
-
-
- public void testVersionStringPrefixMatch ()
- {
- assertNotNull(validator);
-
- final IStatus status = validator.validateVersionStrings("1.2", "1.2.11");
- assertEquals(IStatus.OK, status.getSeverity());
- }
-
-
- public void testNullLibraryVersionString ()
- {
- assertNotNull(validator);
-
- final IStatus status = validator.validateVersionStrings("1.2", null);
- assertEquals(IStatus.WARNING, status.getSeverity());
- }
-
-
- public void testNullFacetVersionString ()
- {
- assertNotNull(validator);
-
- try
- {
- validator.validateVersionStrings(null, "1.0.1.2.11"); // Fails
- }
- catch (final IllegalArgumentException e)
- {
- assertEquals("Cannot read facet version", e.getLocalizedMessage());
- return;
- }
-
- fail();
- }
-
-
- protected File getFileFromPlugin (final String relativePathToFile,
- final Plugin plugin)
- throws IOException, URISyntaxException
- {
- final Bundle bundle = TestsPlugin.getDefault().getBundle();
-
- final URL bundleUrl = bundle.getEntry(relativePathToFile);
- assertNotNull(bundleUrl);
-
- final URL fileUrl = FileLocator.toFileURL(bundleUrl);
- final File file = new File(fileUrl.getPath());
- assertTrue(file.exists());
- return file;
- }
-
-
- public void testReadLibraryVersionFromJarWithManifestEntry ()
- throws IOException, URISyntaxException
- {
- final JarFile jarFile = new JarFile(getFileFromPlugin(jarPath, TestsPlugin.getDefault()));
- assertEquals(expectedLibraryVersion, validator.getLibraryVersion(jarFile));
- }
-
-
- public void testReadLibraryVersionFromJarWithoutManifestEntry ()
- throws IOException, URISyntaxException
- {
- final JarFile jarFile = new JarFile(getFileFromPlugin(jarPathWithoutImplementationVersionEntry, TestsPlugin.getDefault()));
- assertNull("Was expecting library-version string to be null", validator.getLibraryVersion(jarFile)); //$NON-NLS-1$
- }
-
-
- /**
- * Regression test-case. This would fail earlier without the patch in
- *
- * "JSF Facet version validator fails to validate some non-standard jars"
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=286351
- *
- * @throws IOException
- * @throws URISyntaxException
- *
- */
- public void testReadLibraryVersionFromJarWithNonstandardImplementationVersion()
- throws IOException, URISyntaxException
- {
- final JarFile jarFile = new JarFile(getFileFromPlugin(jarPathWithNonstandardImplementationVersionEntry, TestsPlugin.getDefault()));
- assertNotNull("Was expecting library-version string to be non-null", validator.getLibraryVersion(jarFile)); //$NON-NLS-1$
- assertEquals(expectedLibraryVersion, validator.getLibraryVersion(jarFile));
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/UserLibraryVersionValidatorProxy.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/UserLibraryVersionValidatorProxy.java
deleted file mode 100644
index 0db8552..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/UserLibraryVersionValidatorProxy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-import java.io.IOException;
-import java.util.jar.JarFile;
-
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.jsf.common.facet.libraryprovider.UserLibraryVersionValidator;
-
-
-/**
- * "Proxy" class for the actual UserLibraryVersionValidator. This is only used so
- * that the protected methods in UserLibraryVersionValidator can be tested.
- *
- * The test-cases have package-level access to these protected methods.
- *
- * @author Debajit Adhikary
- *
- */
-public class UserLibraryVersionValidatorProxy extends UserLibraryVersionValidator
-{
- public UserLibraryVersionValidatorProxy (final String classNameIdentifyingJar)
- {
- super(classNameIdentifyingJar);
- }
-
-
- @Override
- protected IStatus validateVersionStrings (final String facetVersion, final String libraryVersion)
- {
- return super.validateVersionStrings(facetVersion, libraryVersion);
- }
-
-
- @Override
- protected String getLibraryVersion (final JarFile jarFile) throws IOException
- {
- return super.getLibraryVersion(jarFile);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJ2EETest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJ2EETest.java
deleted file mode 100644
index 218e203..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJ2EETest.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.Listener;
-import org.eclipse.jst.j2ee.common.ParamValue;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.ServletMapping;
-import org.eclipse.jst.j2ee.webapplication.internal.impl.ServletTypeImpl;
-import org.eclipse.jst.jsf.common.webxml.WebXmlUpdater;
-import org.eclipse.jst.jsf.common.webxml.WebXmlUtilsForJ2EE;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-
-/**
- * Tests the web.xml updating functionality used for vendor-specific web.xml
- * configuration
- *
- * @author Debajit Adhikary
- *
- * @see VendorSpecificWebXmlConfigurationForJavaEETest
- *
- */
-public class VendorSpecificWebXmlConfigurationForJ2EETest extends TestCase
-{
- private static final IProjectFacetVersion WEB_MODULE_VERSION = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.4");
-
- private static final IProjectFacetVersion JAVA_VERSION = JavaFacet.VERSION_1_5;
-
- private static final String SERVLET_NAME = "_TEST_SERVLET_NAME";
- private static final String SERVLET_CLASS_NAME = "_TEST_SERVLET_CLASS_NAME";
- private static final String SERVLET_LOAD_ON_STARTUP = "1";
- private static final String SERVLET_URL_PATTERN = "*._TEST_SERVLET_URL_PATTERN";
- private static final String CONTEXT_PARAM_NAME = "_TEST_CONTEXT_PARAM_NAME";
- private static final String CONTEXT_PARAM_VALUE = "_TEST_CONTEXT_PARAM_VALUE";
- private static final String CONTEXT_PARAM_DESCRIPTION = "_TEST_CONTEXT_PARAM_DESCRIPTION";
- private static final String LISTENER_CLASS = "_TEST_LISTENER_CLASS";
-
- private IProject project;
- private WebXmlUpdater updater;
-
- private IProject createProject (final String projectName)
- throws Exception
- {
- final WebProjectTestEnvironment testEnv = new WebProjectTestEnvironment(projectName, JAVA_VERSION, WEB_MODULE_VERSION);
- assertTrue(testEnv.createProject(true));
- return testEnv.getTestProject();
- }
-
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- this.project = createProject(this.getClass().getName() + "_" + getName());
- this.updater = new WebXmlUpdater(project, null);
- }
-
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- System.out.println(JSFTestUtil.safeDelete(project, 3, 500));
- }
-
-
- public void testAddServlet () throws Exception
- {
- setupServlet();
- }
-
-
- private void setupServlet()
- {
- // Write servlet to web.xml
- assertFalse(WebXmlUtilsForJ2EE.existsServlet(updater.getWebAppForJ2EE(), SERVLET_NAME, SERVLET_CLASS_NAME));
- updater.addServlet(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_LOAD_ON_STARTUP);
-
- // Read servlet from web.xml
- final Servlet servlet = WebXmlUtilsForJ2EE.findServlet(updater.getWebAppForJ2EE(), SERVLET_CLASS_NAME);
- assertEquals(SERVLET_NAME, servlet.getServletName());
- assertEquals(SERVLET_CLASS_NAME, ((ServletTypeImpl) servlet.getWebType()).getClassName());
- assertEquals(Integer.parseInt(SERVLET_LOAD_ON_STARTUP), servlet.getLoadOnStartup().intValue());
- }
-
-
- public void testAddContextParam () throws Exception
- {
- // Write param to web.xml
- assertFalse(WebXmlUtilsForJ2EE.existsContextParam(updater.getWebAppForJ2EE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- updater.addContextParam(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE, CONTEXT_PARAM_DESCRIPTION);
-
- // Read param from web.xml
- final ParamValue param = WebXmlUtilsForJ2EE.findContextParam(updater.getWebAppForJ2EE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE);
- assertEquals(CONTEXT_PARAM_NAME, param.getName());
- assertEquals(CONTEXT_PARAM_VALUE, param.getValue());
- assertEquals(CONTEXT_PARAM_DESCRIPTION, ((Description) param.getDescriptions().get(0)).getValue());
- }
-
-
- public void testGetContextParamValue ()
- {
- assertFalse(WebXmlUtilsForJ2EE.existsContextParam(updater.getWebAppForJ2EE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- updater.addContextParam(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE, CONTEXT_PARAM_DESCRIPTION);
-
- final String contextParamValue = updater.getContextParamValue(CONTEXT_PARAM_NAME);
- assertNotNull(contextParamValue);
- assertEquals(CONTEXT_PARAM_VALUE, contextParamValue);
- }
-
-
- public void testGetContextParamValuesAsList ()
- {
- assertFalse(WebXmlUtilsForJ2EE.existsContextParam(updater.getWebAppForJ2EE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- final String delimiter = ";";
- final String paramValue = CONTEXT_PARAM_VALUE + "1" + delimiter + CONTEXT_PARAM_VALUE + "2" + delimiter + CONTEXT_PARAM_VALUE + "3";
- updater.addContextParam(CONTEXT_PARAM_NAME, paramValue, CONTEXT_PARAM_DESCRIPTION);
-
- final List<String> expectedList = Arrays.asList(CONTEXT_PARAM_VALUE + "1", CONTEXT_PARAM_VALUE + "2", CONTEXT_PARAM_VALUE + "3");
- final List<String> actualList = updater.getContextParamValuesAsList(CONTEXT_PARAM_NAME, delimiter);
- assertEquals(expectedList, actualList);
- }
-
-
- public void testSetContextParamValue ()
- {
- assertFalse(WebXmlUtilsForJ2EE.existsContextParam(updater.getWebAppForJ2EE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- updater.setContextParamValue(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE); // Adds new context param
- assertEquals(CONTEXT_PARAM_VALUE, updater.getContextParamValue(CONTEXT_PARAM_NAME));
-
- final String updatedValue = CONTEXT_PARAM_VALUE + "updated";
- assertFalse(updater.getContextParamValue(CONTEXT_PARAM_NAME).equals(updatedValue));
-
- updater.setContextParamValue(CONTEXT_PARAM_NAME, updatedValue);
- assertEquals(updatedValue, updater.getContextParamValue(CONTEXT_PARAM_NAME));
- }
-
-
- public void testAddServletMapping () throws Exception
- {
- setupServlet();
- // Write servlet-mapping to web.xml
- assertFalse(WebXmlUtilsForJ2EE.existsServletMapping(updater.getWebAppForJ2EE(), SERVLET_NAME, SERVLET_URL_PATTERN));
- updater.addServletMapping(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_URL_PATTERN);
-
- // Read from web.xml
- final ServletMapping mapping = WebXmlUtilsForJ2EE.findServletMapping(updater.getWebAppForJ2EE(), SERVLET_NAME, SERVLET_URL_PATTERN);
- assertEquals(SERVLET_NAME, mapping.getName());
- assertEquals(SERVLET_URL_PATTERN, mapping.getUrlPattern());
- }
-
-
- public void testAddListener () throws Exception
- {
- // Write to web.xml
- assertFalse(WebXmlUtilsForJ2EE.existsListener(updater.getWebAppForJ2EE(), LISTENER_CLASS));
- updater.addListener(LISTENER_CLASS);
-
- // Read from web.xml
- final Listener listener = WebXmlUtilsForJ2EE.findListener(updater.getWebAppForJ2EE(), LISTENER_CLASS);
- assertEquals(LISTENER_CLASS, listener.getListenerClassName());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJavaEETest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJavaEETest.java
deleted file mode 100644
index 05b2f80..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJavaEETest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.jst.jsf.core.tests.facet;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.javaee.core.Description;
-import org.eclipse.jst.javaee.core.Listener;
-import org.eclipse.jst.javaee.core.ParamValue;
-import org.eclipse.jst.javaee.core.UrlPatternType;
-import org.eclipse.jst.javaee.web.Servlet;
-import org.eclipse.jst.javaee.web.ServletMapping;
-import org.eclipse.jst.jsf.common.webxml.WebXmlUpdater;
-import org.eclipse.jst.jsf.common.webxml.WebXmlUtilsForJavaEE;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-
-/**
- * Tests the web.xml updating functionality used for vendor-specific web.xml
- * configuration (for Java EE)
- *
- * @author Debajit Adhikary
- *
- * @see VendorSpecificWebXmlConfigurationForJ2EETest
- *
- */
-public class VendorSpecificWebXmlConfigurationForJavaEETest extends TestCase
-{
- private static final IProjectFacetVersion WEB_MODULE_VERSION = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
-
- private static final IProjectFacetVersion JAVA_VERSION = JavaFacet.VERSION_1_5;
-
- private static final String PROJECT_NAME_PREFIX = "_TEST_PROJECT_NAME_FOR_JAVA_EE";
- private static final String SERVLET_NAME = "_TEST_SERVLET_NAME";
- private static final String SERVLET_CLASS_NAME = "_TEST_SERVLET_CLASS_NAME";
- private static final String SERVLET_LOAD_ON_STARTUP = "1";
- private static final String SERVLET_URL_PATTERN = "*._TEST_SERVLET_URL_PATTERN";
- private static final String CONTEXT_PARAM_NAME = "_TEST_CONTEXT_PARAM_NAME";
- private static final String CONTEXT_PARAM_VALUE = "_TEST_CONTEXT_PARAM_VALUE";
- private static final String CONTEXT_PARAM_DESCRIPTION = "_TEST_CONTEXT_PARAM_DESCRIPTION";
- private static final String LISTENER_CLASS = "_TEST_LISTENER_CLASS";
-
- private IProject project;
- private WebXmlUpdater updater;
-
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- project = createProject(PROJECT_NAME_PREFIX + this.getClass().getName() + getName());
- updater = new WebXmlUpdater(project, new NullProgressMonitor());
- }
-
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- JSFTestUtil.safeDelete(project, 3, 500);
- }
-
-
- private IProject createProject (final String projectName)
- throws Exception
- {
- final WebProjectTestEnvironment testEnv = new WebProjectTestEnvironment(projectName, JAVA_VERSION, WEB_MODULE_VERSION);
- testEnv.createProject(true);
- return testEnv.getTestProject();
- }
-
-
- public void testAddServlet () throws Exception
- {
- // Write servlet to web.xml
- updater.addServlet(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_LOAD_ON_STARTUP);
-
- // Read servlet from web.xml
- final Servlet servlet = WebXmlUtilsForJavaEE.findServlet(SERVLET_CLASS_NAME, updater.getWebAppForJavaEE());
- assertNotNull(servlet);
- assertEquals(SERVLET_NAME, servlet.getServletName());
- assertEquals(SERVLET_CLASS_NAME, servlet.getServletClass());
- assertEquals(SERVLET_LOAD_ON_STARTUP, servlet.getLoadOnStartup().toString());
- }
-
-
- public void testAddContextParam () throws Exception
- {
- // Write param to web.xml
- updater.addServlet(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_LOAD_ON_STARTUP);
- updater.addContextParam(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE, CONTEXT_PARAM_DESCRIPTION);
-
- // Read param from web.xml
- final ParamValue param = WebXmlUtilsForJavaEE.findContextParam(updater.getWebAppForJavaEE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE);
- assertNotNull(param);
- assertEquals(CONTEXT_PARAM_NAME, param.getParamName());
- assertEquals(CONTEXT_PARAM_VALUE, param.getParamValue());
- assertEquals(CONTEXT_PARAM_DESCRIPTION, ((Description) param.getDescriptions().get(0)).getValue());
- }
-
-
- public void testGetContextParamValue ()
- {
- assertFalse(WebXmlUtilsForJavaEE.existsContextParam(updater.getWebAppForJavaEE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- updater.addContextParam(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE, CONTEXT_PARAM_DESCRIPTION);
-
- final String contextParamValue = updater.getContextParamValue(CONTEXT_PARAM_NAME);
- assertNotNull(contextParamValue);
- assertEquals(CONTEXT_PARAM_VALUE, contextParamValue);
- }
-
-
- public void testGetContextParamValuesAsList ()
- {
- assertFalse(WebXmlUtilsForJavaEE.existsContextParam(updater.getWebAppForJavaEE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- final String delimiter = ";";
- final String paramValue = CONTEXT_PARAM_VALUE + "1" + delimiter + CONTEXT_PARAM_VALUE + "2" + delimiter + CONTEXT_PARAM_VALUE + "3";
- updater.addContextParam(CONTEXT_PARAM_NAME, paramValue, CONTEXT_PARAM_DESCRIPTION);
-
- final List<String> expectedList = Arrays.asList(CONTEXT_PARAM_VALUE + "1", CONTEXT_PARAM_VALUE + "2", CONTEXT_PARAM_VALUE + "3");
- final List<String> actualList = updater.getContextParamValuesAsList(CONTEXT_PARAM_NAME, delimiter);
- assertEquals(expectedList, actualList);
- }
-
-
- public void testSetContextParamValue ()
- {
- assertFalse(WebXmlUtilsForJavaEE.existsContextParam(updater.getWebAppForJavaEE(), CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE));
- updater.setContextParamValue(CONTEXT_PARAM_NAME, CONTEXT_PARAM_VALUE); // Adds new context param
- assertEquals(CONTEXT_PARAM_VALUE, updater.getContextParamValue(CONTEXT_PARAM_NAME));
-
- final String updatedValue = CONTEXT_PARAM_VALUE + "updated";
- assertFalse(updater.getContextParamValue(CONTEXT_PARAM_NAME).equals(updatedValue));
-
- updater.setContextParamValue(CONTEXT_PARAM_NAME, updatedValue);
- assertEquals(updatedValue, updater.getContextParamValue(CONTEXT_PARAM_NAME));
- }
-
-
- public void testAddServletMapping () throws Exception
- {
- // Write servlet-mapping to web.xml
- updater.addServlet(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_LOAD_ON_STARTUP);
- updater.addServletMapping(SERVLET_NAME, SERVLET_CLASS_NAME, SERVLET_URL_PATTERN);
-
- // Read from web.xml
- final ServletMapping mapping = WebXmlUtilsForJavaEE.findServletMapping(updater.getWebAppForJavaEE(), SERVLET_NAME, SERVLET_URL_PATTERN);
- assertNotNull(mapping);
- assertEquals(SERVLET_NAME, mapping.getServletName());
- assertEquals(SERVLET_URL_PATTERN, ((UrlPatternType) mapping.getUrlPatterns().get(0)).getValue());
- }
-
-
- public void testAddListener () throws Exception
- {
- // Write to web.xml
- updater.addListener(LISTENER_CLASS);
-
- // Read from web.xml
- final Listener listener = WebXmlUtilsForJavaEE.findListener(updater.getWebAppForJavaEE(), LISTENER_CLASS);
- assertNotNull(listener);
- assertEquals(LISTENER_CLASS, listener.getListenerClass());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigDialogSettingDataTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigDialogSettingDataTestCases.java
deleted file mode 100644
index ce3a6a3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigDialogSettingDataTestCases.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfig;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryConfigDialogSettingDataTestCases extends TestCase {
- private JSFLibraryRegistry libReg = null;
-// private boolean bDeployImplLib = false;
- private String[] compLibs = null;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFCoreUtilHelper.createJSFLibraryRegistry();
- libReg = JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
-
- compLibs = new String[1]; // test data has one component library
- JSFLibrary lib = (JSFLibrary)libReg.getNonImplJSFLibraries().get(0);
- compLibs[0] = lib.getID() + ":" + "true"; // deployed
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
- //FIX ME - Kill Me
-// public void testJSFLibraryConfigDialogSettingData() {
-// JSFLibraryConfigDialogSettingData data = new JSFLibraryConfigDialogSettingData(bDeployImplLib, null);
-// Assert.assertNotNull(data);
-// Assert.assertNotNull(data.getJSFImplementationLibrary());
-// Assert.assertTrue(data.getJSFComponentLibraries().size() == 0);
-// }
-//
-// public void testGetJSFImplementationLibrary() {
-// JSFLibraryConfigDialogSettingData data = new JSFLibraryConfigDialogSettingData(bDeployImplLib, compLibs);
-// Assert.assertNotNull(data);
-//
-// JSFLibrary dftImplLib = libReg.getDefaultImplementation();
-// Assert.assertTrue( data.getJSFImplementationLibrary().getID().equals(dftImplLib.getID()));
-// }
-//
-// public void testGetJSFComponentLibraries() {
-// JSFLibraryConfigDialogSettingData data = new JSFLibraryConfigDialogSettingData(bDeployImplLib, compLibs);
-// Assert.assertNotNull(data);
-// }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigModelTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigModelTestCases.java
deleted file mode 100644
index 3a7dca0..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigModelTestCases.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfig;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryConfigModelTestCases extends TestCase {
-// final static private String QUALIFIEDNAME = "org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryConfigProjectData";
-// private static final String PROJ_NAME = "_TEST_CFGLIBRARYMODEL_PROJECT";
-// private static final String PROJ_NAME2 = "_TEST_CFGLIBRARYMODEL_PROJECT2";
-// private JSFLibraryConfiglModelSource modelSrc = null;
-// private JSFLibraryConfiglModelSource modelSrcWithServerSupplied = null;
-// private IProject project;
-// private int numCompLibs;
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFCoreUtilHelper.createJSFLibraryRegistry();
- JSFLibraryRegistry libReg = JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
-
- /* number of components is changed in workspace when running the whole test suite.
- * Recording the number from registry for testing.
- */
- /*numCompLibs = */libReg.getNonImplJSFLibraries().size();
-
- String[] compLibs = new String[1];
- JSFLibrary lib = (JSFLibrary)libReg.getNonImplJSFLibraries().get(0);
- compLibs[0] = lib.getID() + ":" + "true";
-
-// modelSrc = new JSFLibraryConfigDialogSettingData(true, compLibs);
-// modelSrcWithServerSupplied = new JSFLibraryConfigDialogSettingData(IMPLEMENTATION_TYPE.SERVER_SUPPLIED, true, compLibs);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- //FIX ME!
-// public void testGetJSFImplementationLibraries() {
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-//
-// Assert.assertNotNull(model);
-// // we should have at least as many impl libraries as we have added
-// // NOTE: this test case has interactions with test cases in the same suite
-// // since JSF libs exist on a workspace basis which is normally not cleared
-// // between each TestCase being run
-// Assert.assertTrue(model.getJSFImplementationLibraries().size() >= numCompLibs);
-// }
-//
-// public void testGetJSFComponentLibraries() {
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-//
-// Assert.assertNotNull(model);
-// Assert.assertTrue(model.getJSFComponentLibraries().size() == numCompLibs);
-// }
-//
-// public void testGetCurrentJSFImplementationLibrarySelection() {
-// testGetSavedJSFImplementationLibrary();
-// }
-//
-// public void testGetCurrentJSFComponentLibrarySelection() {
-// testGetSavedJSFComponentLibraries();
-// }
-//
-// public void testGetSavedJSFImplementationLibrary() {
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-//
-// JSFLibraryRegistry libReg = JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
-// JSFLibraryInternalReference libImplRef = model.getCurrentJSFImplementationLibrarySelection();
-// Assert.assertNotNull(libImplRef);
-// Assert.assertTrue(libReg.getDefaultImplementation().getID().equals(libImplRef.getID()));
-// }
-//
-// @SuppressWarnings("unchecked")
-// public void testGetSavedJSFComponentLibraries() {
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-//
-// /*JSFLibraryRegistry libReg = */JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
-// List lstCompRef = model.getCurrentJSFComponentLibrarySelection();
-//
-// Assert.assertTrue(lstCompRef.size() == 1);
-//
-// JSFLibraryInternalReference libCompRef = (JSFLibraryInternalReference) lstCompRef.get(0);
-// Assert.assertNotNull(libCompRef);
-// Assert.assertTrue(libCompRef.isSelected());
-// Assert.assertTrue(libCompRef.isCheckedToBeDeployed());
-// }
-//
-///*
-// public void testSetCurrentJSFImplementationLibrarySelection() {
-// fail("Not yet implemented");
-// }
-//
-// public void testSetCurrentJSFComponentLibrarySelection() {
-// fail("Not yet implemented");
-// }
-//*/
-// public void testSaveData() {
-// try {
-// project = JSFCoreUtilHelper.createWebProject(PROJ_NAME);
-// } catch (Exception e1) {
-// fail("Unable to create project for testing.");
-// }
-//
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-// model.saveData(project);
-//
-// try {
-// String content = ((IResource)project).getPersistentProperty(new QualifiedName(QUALIFIEDNAME,
-// JSFUtils.PP_JSF_IMPLEMENTATION_LIBRARIES));
-// Assert.assertNotNull(content);
-// Assert.assertTrue(content.length() > 1);
-//
-//
-// String type = ((IResource)project).getPersistentProperty(new QualifiedName(QUALIFIEDNAME,
-// JSFUtils.PP_JSF_IMPLEMENTATION_TYPE));
-//
-// Assert.assertNotNull(type);
-// Assert.assertEquals(IMPLEMENTATION_TYPE.getStringValue(IMPLEMENTATION_TYPE.USER_SPECIFIED), type);
-// } catch (CoreException e) {
-// fail("Not expecting an exception.");
-// }
-// }
-//
-// public void testSaveDataWithServerSuppliedImplSelection() {
-// try {
-// project = JSFCoreUtilHelper.createWebProject(PROJ_NAME2);
-// } catch (Exception e1) {
-// fail("Unable to create project for testing.");
-// }
-//
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrcWithServerSupplied);
-// model.saveData(project);
-//
-// try {
-// String content = ((IResource)project).getPersistentProperty(new QualifiedName(QUALIFIEDNAME,
-// JSFUtils.PP_JSF_IMPLEMENTATION_LIBRARIES));
-// Assert.assertNotNull(content);
-// Assert.assertTrue(content.length() > 1);
-//
-// String type = ((IResource)project).getPersistentProperty(new QualifiedName(QUALIFIEDNAME,
-// JSFUtils.PP_JSF_IMPLEMENTATION_TYPE));
-//
-// Assert.assertNotNull(type);
-// Assert.assertEquals(IMPLEMENTATION_TYPE.getStringValue(IMPLEMENTATION_TYPE.SERVER_SUPPLIED), type);
-// } catch (CoreException e) {
-// fail("Not expecting an exception.");
-// }
-// }
-//
-// public void testGetSavedImplementationType() {
-// JSFLibraryConfigModel model = JSFLibraryConfigModelFactory.createInstance(modelSrc);
-// Assert.assertNotNull(model.getImplementationType());
-// Assert.assertTrue(model.getImplementationType() == IMPLEMENTATION_TYPE.USER_SPECIFIED);
-//
-// model = JSFLibraryConfigModelFactory.createInstance(modelSrcWithServerSupplied);
-// Assert.assertNotNull(model.getImplementationType());
-// Assert.assertTrue(model.getImplementationType() == IMPLEMENTATION_TYPE.SERVER_SUPPLIED);
-//
-// model = JSFLibraryConfigModelFactory.createInstance(new JSFLibraryConfigDialogSettingData(IMPLEMENTATION_TYPE.UNKNOWN, true, null));
-// Assert.assertNotNull(model.getImplementationType());
-// Assert.assertTrue(model.getImplementationType() == IMPLEMENTATION_TYPE.UNKNOWN);
-// }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryRegistryUtilTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryRegistryUtilTestCases.java
deleted file mode 100644
index c0e8508..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryRegistryUtilTestCases.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfig;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryInternalReference;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryFactory;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryRegistryUtilTestCases extends TestCase {
- private JSFLibraryRegistry libReg = null;
- private JSFLibraryRegistryUtil libUtilInstance = null;
- private int numCompLibs;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFCoreUtilHelper.createJSFLibraryRegistry();
- libReg = JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
- numCompLibs = libReg.getNonImplJSFLibraries().size();
- libUtilInstance = JSFLibraryRegistryUtil.getInstance();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
-
- libReg = null;
- }
-
- public void testGetJSFLibraryRegistry() {
- Assert.assertNotNull(libUtilInstance.getJSFLibraryRegistry());
- Assert.assertEquals(libReg, libUtilInstance.getJSFLibraryRegistry());
- }
-
- public void testGetDefaultJSFImplementationLibrary() {
- JSFLibraryInternalReference dftImplLib = libUtilInstance.getDefaultJSFImplementationLibrary();
- Assert.assertNotNull(dftImplLib);
- Assert.assertEquals(libReg.getDefaultImplementation().getID(), dftImplLib.getID());
- }
-
- public void testGetJSFLibryReferencebyID() {
- JSFLibraryInternalReference lib = libUtilInstance.getJSFLibraryReferencebyID(libReg.getDefaultImplementationID());
- Assert.assertNotNull(lib);
- Assert.assertEquals(libReg.getDefaultImplementation().getID(), lib.getID());
- }
-
- public void testAddJSFLibrary() {
- JSFLibrary jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
-// jsfLib.setID("124365879");
- jsfLib.setName("A_COMP_LIB");
- jsfLib.setImplementation(false);
-
- JSFLibraryInternalReference jsfLibRef = new JSFLibraryInternalReference(jsfLib,
- false, // selected
- false); // to be deployed
- Assert.assertTrue(libReg.getNonImplJSFLibraries().size() == numCompLibs);
- libUtilInstance.addJSFLibrary(jsfLibRef);
- Assert.assertTrue(libReg.getNonImplJSFLibraries().size() == (numCompLibs + 1));
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFProjectLibraryReferenceTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFProjectLibraryReferenceTestCases.java
deleted file mode 100644
index d4caaff..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFProjectLibraryReferenceTestCases.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfig;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryInternalReference;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryFactory;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-
-@SuppressWarnings("deprecation")
-public class JSFProjectLibraryReferenceTestCases extends TestCase {
- private String JSF_NAME = "MockJSFLib";
-// private String JSF_ID = "123456789";
- private boolean isImpl = false;
- private JSFLibrary jsfLib = null;
- private JSFLibraryInternalReference jsfLibRef = null;
-
- public JSFProjectLibraryReferenceTestCases(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
- jsfLib.setName(JSF_NAME);
- jsfLib.setImplementation(false);
-
- jsfLibRef = new JSFLibraryInternalReference(jsfLib,
- true, // selected
- true); // to be deployed
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
-
- jsfLib = null;
- jsfLibRef = null;
- }
-
- /*
- * General test class for JSFLibraryInternalReference class
- */
- public void testJSFProjectLibraryReference() {
- JSFLibraryInternalReference jsfLibRef_ = new JSFLibraryInternalReference(jsfLib, true, true);
-
- Assert.assertNotNull(jsfLibRef_);
- Assert.assertTrue(jsfLibRef_.isSelected());
- Assert.assertTrue(jsfLibRef_.isCheckedToBeDeployed());
- Assert.assertTrue(JSF_NAME.equals(jsfLibRef_.getName()));
- Assert.assertTrue(JSF_NAME.equals(jsfLibRef_.getID()));
- Assert.assertTrue(JSF_NAME.equals(jsfLibRef_.getLabel()));
- Assert.assertTrue(isImpl == jsfLibRef_.isImplementation());
- }
-
- /*
- * test method for JSFLibraryInternalReference.getLibrary()
- */
- public void testGetLibrary() {
- Assert.assertNotNull(jsfLibRef);
- Assert.assertEquals(jsfLibRef.getLibrary(), jsfLib);
- }
-
- /*
- * test method for JSFLibraryInternalReference.isCheckedToBeDeployed()
- */
- public void testIsCheckedToBeDeployed() {
- JSFLibraryInternalReference jsfLibRef_ = new JSFLibraryInternalReference(jsfLib, true, true);
- Assert.assertNotNull(jsfLibRef_);
- Assert.assertTrue(jsfLibRef_.isCheckedToBeDeployed());
- }
-
- /*
- * test method for JSFLibraryInternalReference.setSelected()
- */
- public void testSetSelected() {
- JSFLibraryInternalReference jsfLibRef_ = new JSFLibraryInternalReference(jsfLib, true, true);
- Assert.assertNotNull(jsfLibRef_);
-
- Assert.assertTrue(jsfLibRef_.isSelected());
-
- jsfLibRef_.setSelected(false);
- Assert.assertFalse(jsfLibRef_.isSelected());
- }
-
- /*
- * test method for JSFLibraryInternalReference.isImplementation()
- */
- public void testIsImplementation() {
- Assert.assertFalse(jsfLibRef.isImplementation());
- }
-
- /*
- * test method for JSFLibraryInternalReferenceJSFLibraryInternalReference.getArchiveFiles()
- */
- public void testGetArchiveFiles() {
- String path2TestJAR = TestsPlugin.getInstallLocation().getPath() + "testfiles/faces-all-bogus.jar";
-
- ArchiveFile af = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- af.setRelativeToWorkspace(false);
- af.setSourceLocation(path2TestJAR);
- af.setJSFLibrary(jsfLib);
-
- Assert.assertNotNull(jsfLib.getArchiveFiles());
- Assert.assertTrue(jsfLib.getArchiveFiles().size() == 1);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryReferenceTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryReferenceTestCases.java
deleted file mode 100644
index 3281543..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryReferenceTestCases.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfiguration;
-
-import java.util.Collection;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryConfigurationHelper;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryReference;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryReferenceUserDefined;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryReferenceUserSpecified;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFVersion;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.internal.JSFLibraryReferenceFacadeFactory;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryReferenceTestCases extends TestCase {
- WebProjectTestEnvironment projectTestEnvironment;
- JDTTestEnvironment jdtTestEnv;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
-
- projectTestEnvironment =
- new WebProjectTestEnvironment("JSFLibraryReferenceTestCases");
- boolean created = projectTestEnvironment.createProject(true);
-
- assertNotNull(projectTestEnvironment);
- assertNotNull(projectTestEnvironment.getTestProject());
- assertTrue(projectTestEnvironment.getTestProject().isAccessible());
-
- if (created) {
- // initialize test case for faces 1.1
- JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(projectTestEnvironment);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- createRegistryAndAddReferences(projectTestEnvironment, jsfFacedEnv);
- }
- }
-
- private void createRegistryAndAddReferences(WebProjectTestEnvironment projectTestEnvironment, JSFFacetedTestEnvironment jsfFacedEnv) throws CoreException {
- JSFLibraryRegistry jsfLibRegistry = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
-
- String[] archivefiles1 = {
- "faces-all-bogu.jar",
- "faces-api-bogus.jar",
- "faces-impl-bogus.jar",
- "tomahawk-bogus.jar"};
-
- String[] archivefiles2 = {
- "faces-all-bogu2.jar",
- "faces-api-bogus2.jar",
- "faces-impl-bogus2.jar"};
-
- JSFLibrary implJSFLib = JSFCoreUtilHelper.constructJSFLib("JSFLIBIMPL_NAME",
- "JSFLIBIMPL_NAME",
- archivefiles1,
- true);
- implJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_1_LITERAL);
-
- JSFLibrary nonimplJSFLib = JSFCoreUtilHelper.constructJSFLib("JSFLIBNONIMPL_NAME",
- "JSFLIBNONIMPL_NAME",
- archivefiles2,
- false);
- nonimplJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_2_LITERAL);
-
- PluginProvidedJSFLibrary ppJSFLib = (PluginProvidedJSFLibrary)JSFCoreUtilHelper.constructJSFLib("PP-JSFLIBNONIMPL_NAME",
- "testfiles/JSFLib",
- false,
- true);
- ppJSFLib.setPluginID("PluginProvidedLib");
- ppJSFLib.setLabel("PluginProvidedLib");
- ppJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_1_LITERAL);
-
- jsfLibRegistry.addJSFLibrary(implJSFLib);
- jsfFacedEnv.addJSFLibraryReference(implJSFLib, false);
-
- jsfLibRegistry.addJSFLibrary(nonimplJSFLib);
- jsfFacedEnv.addJSFLibraryReference(nonimplJSFLib, false);
-
- jsfLibRegistry.addJSFLibrary(ppJSFLib);
- jsfFacedEnv.addJSFLibraryReference(ppJSFLib, true);
- }
-
- public void testGetJSFLibraryReferences() {
- Collection<JSFLibraryReference> results = JSFLibraryConfigurationHelper.getJSFLibraryReferences(projectTestEnvironment.getTestProject());
- Assert.assertNotNull(results);
- Assert.assertTrue(results.size() >= 3); //expect 3 libs from project... JSFLIBIMPL_NAME, JSFLIBNOIMPL_NAME, PP-JSFLIBNOIMPL_NAME
- }
-
- public void testIsJSFLibraryContainer() throws JavaModelException, CoreException {
- IClasspathEntry[] entries = null;
- entries = getJDTTestEnv().getJavaProject().getRawClasspath();
- for (int i=0;i<entries.length;i++) {
- IClasspathEntry cpEntry = entries[i];
- boolean isJsfLib = JSFLibraryConfigurationHelper.isJSFLibraryContainer(cpEntry);
- if (cpEntry.getEntryKind() == IClasspathEntry.CPE_CONTAINER &&
- cpEntry.getPath().segment(0).equals(JSFLibraryConfigurationHelper.JSF_LIBRARY_CP_CONTAINER_ID)) {
- Assert.assertTrue("Is a JSF LIB: "+cpEntry.toString(), isJsfLib);
- }
- else
- Assert.assertFalse("Is NOT a JSF LIB: "+cpEntry.toString(), isJsfLib);
- }
- }
-
- public void testJSFLibraryReferenceFacadeFactoryCreate() throws CoreException{
- IClasspathEntry[] entries = null;
- try {
- entries = getJDTTestEnv().getJavaProject().getRawClasspath();
- for (int i=0;i<entries.length;i++){
- IClasspathEntry cpEntry = entries[i];
- boolean isJsfLib = JSFLibraryConfigurationHelper.isJSFLibraryContainer(cpEntry);
- JSFLibraryReference ref = JSFLibraryReferenceFacadeFactory.create(cpEntry);
- if (isJsfLib) {
- String libID = getLibId(cpEntry);
- Assert.assertNotNull(libID+": ref", ref);
- if (libID.equals("JSFLIBIMPL_NAME")){
- doAsserts(ref, "JSFLibraryReferenceUserSpecifiedImpl", "JSFLIBIMPL_NAME", "JSFLIBIMPL_NAME", "JSFLIBIMPL_NAME", false, true, JSFVersion.V1_1, 4 );
- assertTrue(ref instanceof JSFLibraryReferenceUserDefined);
- assertTrue(ref instanceof JSFLibraryReferenceUserSpecified);
- }
- else if (libID.equals("JSFLIBNONIMPL_NAME")){
- doAsserts(ref, "JSFLibraryReferenceUserSpecifiedImpl", "JSFLIBNONIMPL_NAME", "JSFLIBNONIMPL_NAME", "JSFLIBNONIMPL_NAME", false,false, JSFVersion.V1_2, 3);
- assertTrue(ref instanceof JSFLibraryReferenceUserDefined);
- assertTrue(ref instanceof JSFLibraryReferenceUserSpecified);
- }
- else if (libID.equals("PluginProvidedLib$$PP-JSFLIBNONIMPL_NAME")){
- doAsserts(ref, "JSFLibraryReferencePluginProvidedImpl", "PluginProvidedLib$$PP-JSFLIBNONIMPL_NAME", "PP-JSFLIBNONIMPL_NAME", "PluginProvidedLib", true, false, JSFVersion.V1_1, 8 );
- }
- ref.toString();//just for coverage
- }
- else {
- Assert.assertNull(ref);
- }
- }
-
-// JSFLibraryReferenceFacadeFactory.create(cpEntry)
- } catch (JavaModelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- private JDTTestEnvironment getJDTTestEnv() throws CoreException {
- if (jdtTestEnv == null){
- jdtTestEnv = new JDTTestEnvironment(projectTestEnvironment);
- }
- return jdtTestEnv;
- }
-
- private void doAsserts(JSFLibraryReference ref, String instanceName, String id, String name, String label, boolean isDeployed, boolean isImpl, JSFVersion version, int jarCount ) {
- Assert.assertTrue(id+":instanceName", ref.getClass().getSimpleName().equals(instanceName));
- Assert.assertEquals(id+": id",id, ref.getId());
- Assert.assertEquals(id+": name", name, ref.getName());
- Assert.assertEquals(id+": label",label, ref.getLabel());
- Assert.assertEquals(id+": isDeployed",isDeployed, ref.isDeployed());
- Assert.assertEquals(id+": isImpl", isImpl, ref.isJSFImplementation());
- Assert.assertEquals(id+": version", version, ref.getMaxSupportedVersion());
- Assert.assertEquals(id+": jarCount", jarCount, ref.getJars().size());
-
- }
-
-
-
- private String getLibId(IClasspathEntry cpEntry){
- return cpEntry.getPath().segment(1);
- }
-
-// public void testCreateServerSuppliedJSFLibRef() {
-// fail("Not yet implemented");
-// }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryServerSuppliedReferenceTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryServerSuppliedReferenceTestCases.java
deleted file mode 100644
index 601b839..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryServerSuppliedReferenceTestCases.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryconfiguration;
-
-import java.util.Collection;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryConfigurationHelper;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryReference;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryReferenceServerSupplied;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFVersion;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryServerSuppliedReferenceTestCases extends TestCase {
- WebProjectTestEnvironment projectTestEnvironment;
- JDTTestEnvironment jdtTestEnv;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
-
- projectTestEnvironment =
- new WebProjectTestEnvironment("JSFLibraryServerSuppliedReferenceTestCases", ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_JAVA ).getVersion( "5.0" )
- , ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.5"));
- boolean created = projectTestEnvironment.createProject(true);
-
- assertNotNull(projectTestEnvironment);
- assertNotNull(projectTestEnvironment.getTestProject());
- assertTrue(projectTestEnvironment.getTestProject().isAccessible());
-
- if (created) {
- // initialize test case for faces 1.2
- JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(projectTestEnvironment);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_2);
-
- createRegistryAndAddreferences(projectTestEnvironment, jsfFacedEnv);
- }
- }
-
- private void createRegistryAndAddreferences(WebProjectTestEnvironment projectTestEnvironment, JSFFacetedTestEnvironment jsfFacedEnv) throws CoreException {
- JSFLibraryRegistry jsfLibRegistry = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
-
- String[] archivefiles1 = {
- "faces-all-bogu.jar",
- "faces-api-bogus.jar",
- "faces-impl-bogus.jar",
- "tomahawk-bogus.jar"};
-
- String[] archivefiles2 = {
- "faces-all-bogu2.jar",
- "faces-api-bogus2.jar",
- "faces-impl-bogus2.jar",
- "tomahawk-bogus2.jar"};
-
- JSFLibrary implJSFLib = JSFCoreUtilHelper.constructJSFLib("JSFLIBIMPL_NAME",
- "JSFLIBIMPL_NAME",
- archivefiles1,
- true);
- implJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_1_LITERAL);
-
- JSFLibrary nonimplJSFLib = JSFCoreUtilHelper.constructJSFLib("JSFLIBNONIMPL_NAME",
- "JSFLIBNONIMPL_NAME",
- archivefiles2,
- false);
- nonimplJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_2_LITERAL);
-
- PluginProvidedJSFLibrary ppJSFLib = (PluginProvidedJSFLibrary)JSFCoreUtilHelper.constructJSFLib("PP-JSFLIBNONIMPL_NAME",
- "testfiles/JSFLib",
- false,
- true);
- ppJSFLib.setPluginID("PluginProvidedLib");
- ppJSFLib.setLabel("PluginProvidedLib");
- ppJSFLib.setJSFVersion(org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion.V1_1_LITERAL);
-
- jsfLibRegistry.addJSFLibrary(implJSFLib);
-// jsfFacedEnv.addJSFLibraryReference(implJSFLib, false);
-
- jsfLibRegistry.addJSFLibrary(nonimplJSFLib);
-// jsfFacedEnv.addJSFLibraryReference(nonimplJSFLib, false);
-
- jsfLibRegistry.addJSFLibrary(ppJSFLib);
-// jsfFacedEnv.addJSFLibraryReference(ppJSFLib, true);
- }
-
- public void testGetJSFLibraryReferencesAndServerSuppliedRef() throws CoreException{
- Collection<JSFLibraryReference> libs = JSFLibraryConfigurationHelper.getJSFLibraryReferences(projectTestEnvironment.getTestProject());
- Assert.assertNotNull(libs);
- Assert.assertEquals(1, libs.size());
- JSFLibraryReference ref = (JSFLibraryReference)libs.iterator().next();
- Assert.assertTrue(ref instanceof JSFLibraryReferenceServerSupplied);
- doAsserts(ref, "JSFLibraryReferenceServerSuppliedImpl", "_ServerSupplied_", "_ServerSupplied_", "Server Supplied", false, true, JSFVersion.UNKNOWN, 0 );
-
- }
-
- private void doAsserts(JSFLibraryReference ref, String instanceName, String id, String name, String label, boolean isDeployed, boolean isImpl, JSFVersion version, int jarCount ) {
- Assert.assertTrue(id+":instanceName", ref.getClass().getSimpleName().equals(instanceName));
- Assert.assertEquals(id+": id",id, ref.getId());
- Assert.assertEquals(id+": name", name, ref.getName());
- Assert.assertEquals(id+": label",label, ref.getLabel());
- Assert.assertEquals(id+": isDeployed",isDeployed, ref.isDeployed());
- Assert.assertEquals(id+": isImpl", isImpl, ref.isJSFImplementation());
- Assert.assertEquals(id+": version", version, ref.getMaxSupportedVersion());
- Assert.assertEquals(id+": jarCount", jarCount, ref.getJars().size());
- Assert.assertNotNull(ref.toString());
- }
-
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/ArchiveFileTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/ArchiveFileTestCases.java
deleted file mode 100644
index 4361c79..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/ArchiveFileTestCases.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryFactory;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-
-@SuppressWarnings("deprecation")
-public class ArchiveFileTestCases extends TestCase {
- private String path4TestFiles;
-
- // Test Data
- private String[] archivefiles = {
- "faces-all-bogus.jar",
- "faces-api-bogus.jar",
- "faces-impl-bogus.jar",
- "tomahawk-bogus.jar"};
-
- public ArchiveFileTestCases(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- path4TestFiles = TestsPlugin.getInstallLocation().getPath() + "testfiles/";
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testArchiveFile() {
- JSFLibrary jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
-// jsfLib.setID("Myfaces");
- jsfLib.setName("Myfaces");
-
- ArchiveFile archiveFile = null;
- String testData;
- int subStrEnd = path4TestFiles.length() - 1;
-
- for (int i = 0; i < archivefiles.length; i++) {
- testData = path4TestFiles + archivefiles[i];
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
-
- Assert.assertEquals(testData, archiveFile.getSourceLocation());
-
- Assert.assertEquals(path4TestFiles.substring(0, subStrEnd), archiveFile.getPath());
-
- Assert.assertEquals(archivefiles[i], archiveFile.getName());
-
- Assert.assertTrue(archiveFile.exists());
-
- archiveFile.setJSFLibrary(jsfLib);
-
- Assert.assertEquals(jsfLib, archiveFile.getJSFLibrary());
- }
-
- // test number of jar files in the library.
- Assert.assertEquals(archivefiles.length, jsfLib.getArchiveFiles().size());
- }
-
- public void testsetSourceLocation() {
- ArchiveFile archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
-
- Assert.assertNotNull(archiveFile);
-
- // Not relative To workspace
- archiveFile.setRelativeToWorkspace(false);
- String testData = "c:\\test\\archivefiles";
- archiveFile.setSourceLocation(testData);
- Assert.assertEquals(testData, archiveFile.getSourceLocation());
-
- // Relative to workspace
- archiveFile.setRelativeToWorkspace(true);
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
- testData = "archivefiles";
- archiveFile.setSourceLocation(wsRootPath.toOSString() + File.separator + testData);
- Assert.assertEquals(testData, archiveFile.getSourceLocation());
-
- }
-
- public void testgetPath() {
- ArchiveFile archiveFile = null;
- String testData;
- //int subStrEnd = path4TestFiles.length() - 1;
-
- // Branch test - not-relative to workspace
- testData = path4TestFiles + archivefiles[archivefiles.length-1];
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
-// Assert.assertTrue(path4TestFiles.contains(archiveFile.getPath()));
-
- // Branch test - relative to workspace
- archiveFile.setRelativeToWorkspace(true);
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
- testData = "test.jar";
- archiveFile.setSourceLocation(wsRootPath.toOSString() + File.separator + testData);
- IPath arPath = new Path(archiveFile.getPath());
- Assert.assertEquals(wsRootPath, arPath);
-
- }
-
- public void testgetName() {
- ArchiveFile archiveFile = null;
- String testData;
- //int subStrEnd = path4TestFiles.length() - 1;
-
- // Branch test - not-relative to workspace
- testData = path4TestFiles + archivefiles[archivefiles.length-1];
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
- Assert.assertEquals(archivefiles[archivefiles.length-1], archiveFile.getName());
-
- // Branch test - relative to workspace
- archiveFile.setRelativeToWorkspace(true);
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
- testData = "test.jar";
- archiveFile.setSourceLocation(wsRootPath.toOSString() + File.separator + testData);
- Assert.assertEquals(testData, archiveFile.getName());
-
- }
-
- public void testexists() {
- ArchiveFile archiveFile = null;
- String testData;
- //int subStrEnd = path4TestFiles.length() - 1;
-
- testData = path4TestFiles + archivefiles[archivefiles.length-1];
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
-
- Assert.assertTrue(archiveFile.exists());
-
- archiveFile.setRelativeToWorkspace(true);
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
- testData = "test.jar";
- archiveFile.setSourceLocation(wsRootPath.toOSString() + File.separator + testData);
- Assert.assertFalse(archiveFile.exists());
-
- }
-
- public void testequals() {
- ArchiveFile archiveFile_01 = null;
- ArchiveFile archiveFile_02 = null;
- String testData;
- //int subStrEnd = path4TestFiles.length() - 1;
-
- testData = path4TestFiles + archivefiles[archivefiles.length-1];
- archiveFile_01 = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile_01.setRelativeToWorkspace(false);
- archiveFile_01.setSourceLocation(testData);
-
- archiveFile_02 = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile_02.setRelativeToWorkspace(false);
- archiveFile_02.setSourceLocation(testData);
-
- Assert.assertEquals(archiveFile_01, archiveFile_02);
-
- archiveFile_01.setRelativeToWorkspace(true);
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
- testData = "test.jar";
- archiveFile_01.setSourceLocation(wsRootPath.toOSString() + File.separator + testData);
- Assert.assertFalse(archiveFile_01.equals(archiveFile_02));
- }
-
- public void testcopyTo() {
- ArchiveFile archiveFile = null;
- String testData;
- //int subStrEnd = path4TestFiles.length() - 1;
-
- testData = path4TestFiles + archivefiles[0];
-
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
-
- IWorkspaceRoot wsRoot = getWorkspaceRoot();
- IPath wsRootPath = wsRoot.getLocation();
-
- boolean copied = archiveFile.copyTo(wsRootPath.toOSString());
-
- Assert.assertTrue(copied);
- File fileCopied = new File(wsRootPath.toOSString() + File.separator + archivefiles[0]);
- Assert.assertTrue(fileCopied.exists());
-
- Assert.assertFalse(archiveFile.copyTo(wsRootPath.toOSString()));
-
- // cleanup test data
- fileCopied.deleteOnExit();
- }
-
- private IWorkspaceRoot getWorkspaceRoot() {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- return (workspace != null) ? workspace.getRoot() : null;
- }
-
-} // end of ArchiveFileTestCases
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryPackageTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryPackageTestCases.java
deleted file mode 100644
index 2943345..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryPackageTestCases.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryPackageImpl;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryRegistryPackageTestCases extends TestCase {
-
- public JSFLibraryRegistryPackageTestCases(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testObjectCreation() {
- JSFLibraryRegistryPackage jlrp = JSFLibraryRegistryPackageImpl.init();
-
- Assert.assertNotNull(jlrp);
-
- // test some getters that initialized in the Class satic init methods
- Assert.assertNotNull(jlrp.getJSFLibrary_ID());
- Assert.assertNotNull(jlrp.getName());
- Assert.assertNotNull(jlrp.getJSFLibraryRegistry());
- Assert.assertNotNull(jlrp.getArchiveFile());
- Assert.assertNotNull(jlrp.getJSFLibrary());
- Assert.assertNotNull(jlrp.getPluginProvidedJSFLibrary());
- Assert.assertNotNull(jlrp.getJSFVersion());
-
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryTestCases.java
deleted file mode 100644
index 5f13b27..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryTestCases.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import java.util.List;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryRegistryTestCases extends TestCase {
-
- public JSFLibraryRegistryTestCases(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getDefaultImplementationID()'
- */
- public void testGetDefaultImplementationID() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- Assert.assertEquals("", jsfLibRegistry.getDefaultImplementationID());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.setDefaultImplementationID(String)'
- */
- public void testSetDefaultImplementationID() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- String updatedImplID = "myfaces_reg";
- jsfLibRegistry.setDefaultImplementationID(updatedImplID);
- Assert.assertEquals(updatedImplID, jsfLibRegistry.getDefaultImplementationID());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getJSFLibraries()'
- */
- public void testGetJSFLibraries() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
-
- String[] archivefiles = {
- "faces-all-bogu.jar",
- "faces-api-bogus.jar",
- "faces-impl-bogus.jar",
- "tomahawk-bogus.jar"};
-
- JSFLibrary implJSFLib = JSFCoreUtilHelper.constructJSFLib("impljsflib_id",
- "impljsflib_name",
- archivefiles,
- true);
- JSFLibrary nonimplJSFLib = JSFCoreUtilHelper.constructJSFLib("nonimpljsflib_id",
- "nonimpljsflib_name",
- archivefiles,
- false);
-
- jsfLibRegistry.addJSFLibrary(implJSFLib);
- jsfLibRegistry.addJSFLibrary(nonimplJSFLib);
-
- Assert.assertEquals(2, jsfLibRegistry.getJSFLibraries().size());
- Assert.assertEquals(1, jsfLibRegistry.getImplJSFLibraries().size());
- Assert.assertEquals(1, jsfLibRegistry.getNonImplJSFLibraries().size());
- Assert.assertEquals(1, jsfLibRegistry.getJSFLibrariesByName("impljsflib_name").size());
- Assert.assertEquals(1, jsfLibRegistry.getJSFLibrariesByName("nonimpljsflib_name").size());
- Assert.assertNull(jsfLibRegistry.getJSFLibraryByID("nosuchlib_id"));
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getPluginProvidedJSFLibraries()'
- */
- public void testGetPluginProvidedJSFLibraries() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- PluginProvidedJSFLibrary pluginLib = (PluginProvidedJSFLibrary)JSFCoreUtilHelper.constructJSFLib("plugin_provided", "testfiles/JSFLib", true, true);
- jsfLibRegistry.addJSFLibrary(pluginLib);
- JSFLibrary nonPluginLib = JSFCoreUtilHelper.constructJSFLib("non_plugin_provided", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(nonPluginLib);
- Assert.assertEquals(1, jsfLibRegistry.getPluginProvidedJSFLibraries().size());
-
- Assert.assertEquals(pluginLib.getName(), pluginLib.getLabel());
- pluginLib.setLabel("plugin_providedLABEL");
- Assert.assertEquals("plugin_providedLABEL", pluginLib.getLabel());
-
- Assert.assertEquals(nonPluginLib.getName(), nonPluginLib.getLabel());
- Assert.assertEquals(nonPluginLib.getName(), nonPluginLib.getID());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.jsflibraryregistry.internal.internal.impl.JSFLibraryRegistryImpl.getDefaultImplementation()'
- */
- public void testGetDefaultImplementation() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary lib = JSFCoreUtilHelper.constructJSFLib("lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib);
- jsfLibRegistry.setDefaultImplementation(lib);
- Assert.assertEquals(lib, jsfLibRegistry.getDefaultImplementation());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.setDefaultImplementation(JSFLibrary)'
- */
- public void testSetDefaultImplementation() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary lib = JSFCoreUtilHelper.constructJSFLib("lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib);
- jsfLibRegistry.setDefaultImplementation(lib);
- Assert.assertEquals(lib, jsfLibRegistry.getDefaultImplementation());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getJSFLibraryByID(String)'
- */
- public void testGetJSFLibraryByID() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary lib = JSFCoreUtilHelper.constructJSFLib("lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib);
- String libID = "lib";
-// lib.setID(libID);
- Assert.assertEquals(lib, jsfLibRegistry.getJSFLibraryByID(libID));
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getJSFLibrariesByName(String)'
- */
- public void testGetJSFLibrariesByName() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- String lib1Name = "Sun RI v1.1";
- JSFLibrary lib1 = JSFCoreUtilHelper.constructJSFLib(lib1Name, "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib1);
- String lib2Name = "Another Sun RI v1.1";
- JSFLibrary lib2 = JSFCoreUtilHelper.constructJSFLib(lib2Name, "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib2);
- Assert.assertEquals(1, jsfLibRegistry.getJSFLibrariesByName(lib1Name).size());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getImplJSFLibraries()'
- */
- public void testGetImplJSFLibraries() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary implLib = JSFCoreUtilHelper.constructJSFLib("impl_lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(implLib);
- JSFLibrary nonImplLib = JSFCoreUtilHelper.constructJSFLib("non_impl_lib", "testfiles/JSFLib", false, false);
- jsfLibRegistry.addJSFLibrary(nonImplLib);
- Assert.assertEquals(1, jsfLibRegistry.getImplJSFLibraries().size());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getNonImplJSFLibraries()'
- */
- public void testGetNonImplJSFLibraries() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary implLib = JSFCoreUtilHelper.constructJSFLib("impl_lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(implLib);
- JSFLibrary nonImplLib = JSFCoreUtilHelper.constructJSFLib("non_impl_lib", "testfiles/JSFLib", false, false);
- jsfLibRegistry.addJSFLibrary(nonImplLib);
- Assert.assertEquals(1, jsfLibRegistry.getNonImplJSFLibraries().size());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.getAllJSFLibraries()'
- */
- public void testGetAllJSFLibraries() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary lib1 = JSFCoreUtilHelper.constructJSFLib("plugin_provided", "testfiles/JSFLib", true, true);
- jsfLibRegistry.addJSFLibrary(lib1);
- JSFLibrary lib2 = JSFCoreUtilHelper.constructJSFLib("non_plugin_provided", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib2);
- Assert.assertEquals(2, jsfLibRegistry.getAllJSFLibraries().size());
- }
-
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.addJSFLibrary(JSFLibrary)'
- */
- public void testAddJSFLibrary() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary pluginLib = JSFCoreUtilHelper.constructJSFLib("plugin_provided", "testfiles/JSFLib", true, true);
- jsfLibRegistry.addJSFLibrary(pluginLib);
- Assert.assertEquals(1, jsfLibRegistry.getPluginProvidedJSFLibraries().size());
- Assert.assertEquals(0, jsfLibRegistry.getJSFLibraries().size());
- JSFLibrary nonPluginLib = JSFCoreUtilHelper.constructJSFLib("non_plugin_provided", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(nonPluginLib);
- Assert.assertEquals(1, jsfLibRegistry.getPluginProvidedJSFLibraries().size());
- Assert.assertEquals(1, jsfLibRegistry.getJSFLibraries().size());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl.removeJSFLibrary(JSFLibrary)'
- */
- public void testRemoveJSFLibrary() {
- JSFLibraryRegistry jsfLibRegistry = JSFCoreUtilHelper.getNewJSFLibraryRegistry();
- JSFLibrary lib = JSFCoreUtilHelper.constructJSFLib("lib", "testfiles/JSFLib", true, false);
- jsfLibRegistry.addJSFLibrary(lib);
- Assert.assertEquals(1, jsfLibRegistry.getJSFLibraries().size());
- jsfLibRegistry.removeJSFLibrary(lib);
- Assert.assertEquals(0, jsfLibRegistry.getJSFLibraries().size());
- }
-
- public void testPluginProvidedJSFLibCreationFromExtPt() {
- //2 jar lib
- JSFLibraryRegistry jsfLibRegistry = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
- List<?> libs = jsfLibRegistry.getJSFLibrariesByName("TEST_PP_LIB_2");
- Assert.assertNotNull(libs);
- Assert.assertEquals(1, libs.size());
- JSFLibrary lib = (JSFLibrary)libs.get(0);
- Assert.assertTrue(lib instanceof PluginProvidedJSFLibrary);
- Assert.assertEquals(2, lib.getArchiveFiles().size());
- Assert.assertEquals("FAKE LIB FROM jsf.core.tests (1)", lib.getLabel());
- Assert.assertTrue(lib.isImplementation());
-
- //empty jar lib
- libs = jsfLibRegistry.getJSFLibrariesByName("TEST_PP_LIB_EMPTY");
- Assert.assertNotNull(libs);
- Assert.assertEquals(1, libs.size());
- lib = (JSFLibrary)libs.get(0);
- Assert.assertTrue(lib instanceof PluginProvidedJSFLibrary);
- Assert.assertEquals(0, lib.getArchiveFiles().size());
- Assert.assertEquals("FAKE LIB FROM jsf.core.tests (2)", lib.getLabel());
- Assert.assertFalse(lib.isImplementation());
-
- }
-
-} // end of JSFLibraryRegistryTestCases
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryTestCases.java
deleted file mode 100644
index 6e3e19c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryTestCases.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import java.util.Iterator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class JSFLibraryTestCases extends TestCase {
- private JSFLibrary jsfLib = null;
-
- // test data
- private String jsfLibID = "MyfacesID";
- private String jsfLibName = "MyfacesName";
- //private boolean jsfDeployDefault = true;
- private String[] archivefiles = {
- "faces-all-bogus.jar",
- "faces-api-bogus.jar",
- "faces-impl-bogus.jar",
- "tomahawk-bogus.jar"};
-
- public JSFLibraryTestCases(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- jsfLib = JSFCoreUtilHelper.constructJSFLib(
- jsfLibID,
- jsfLibName,
- archivefiles,
- true);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- jsfLib = null;
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl.getArchiveFiles()'
- * Probably not needed...
- */
- public void testgetArchiveFiles() {
- EList<?> el = jsfLib.getArchiveFiles();
- Assert.assertNotNull(el);
- Assert.assertEquals(archivefiles.length, el.size());
- Iterator<?> it = el.iterator();
- int i = 0;
- while(it.hasNext()) {
- Assert.assertEquals(archivefiles[i], ((ArchiveFile)it.next()).getName());
- i++;
- }
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl.containsArchiveFile(String)'
- */
- public void testcontainsArchiveFile() {
- String pathTestFiles = TestsPlugin.getInstallLocation().getPath() + "testfiles/";
-
- Assert.assertTrue( jsfLib.containsArchiveFile(pathTestFiles + archivefiles[2]) );
- Assert.assertFalse( jsfLib.containsArchiveFile(pathTestFiles + "bogus.jar") );
- Assert.assertFalse( jsfLib.containsArchiveFile(pathTestFiles + "sandbox.jar") );
-
- }
-
- public void testgetWorkingCopy() {
- JSFLibrary jsfLibWorkingCopy = jsfLib.getWorkingCopy();
-
- Assert.assertNotNull(jsfLibWorkingCopy);
- Assert.assertEquals(jsfLibWorkingCopy.getArchiveFiles().size(),
- jsfLib.getArchiveFiles().size());
-
- }
-
- public void testupdateValue() {
- String[] archives = {
- "faces-all-bogus.jar",
- "faces-api-bogus.jar" };
-
- JSFLibrary jsfLibtmp = JSFCoreUtilHelper.constructJSFLib(
- "jsfLibTmp",
- "jsfLibTmpName",
- archives,
- true);
-
- jsfLibtmp.updateValues(jsfLib);
-
- Assert.assertEquals(jsfLibtmp.getID(), jsfLib.getID());
- Assert.assertEquals(jsfLibtmp.getName(), jsfLib.getName());
- Assert.assertEquals(jsfLibtmp.getArchiveFiles().size(),
- jsfLib.getArchiveFiles().size());
-
- }
-
- /**
- * ArchiveFile.copyTo should be sufficient to cover this case.
- *
- public void testcopyTo() {
- }
- */
-
-} // end of JSFLibraryTestCases
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/MaintainDefaultImplementationAdapterTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/MaintainDefaultImplementationAdapterTestCases.java
deleted file mode 100644
index e1d2693..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/MaintainDefaultImplementationAdapterTestCases.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-
-@SuppressWarnings("deprecation")
-public class MaintainDefaultImplementationAdapterTestCases extends TestCase {
-
- public MaintainDefaultImplementationAdapterTestCases(String name) {
- super(name);
- }
-
- protected JSFLibraryRegistry getPreparedJSFLibraryRegistry() {
- //get registry from JSFCorePlugin
- JSFLibraryRegistry registry = JSFCoreUtilHelper.getJSFLibraryRegistryFromJSFLibraryHelper();
- //clear registry (loaded and plugin-provided libs may have crept in)
- registry.getJSFLibraries().clear();
- registry.getPluginProvidedJSFLibraries().clear();
- //ensure default implementation is null
- registry.setDefaultImplementation(null);
- return registry;
- }
-
- public void testAddingFirstImplSetsNewDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add impl
- JSFLibrary impl1 = JSFCoreUtilHelper.constructJSFLib("impl1", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl1);
- //test
- Assert.assertEquals(impl1, registry.getDefaultImplementation());
- }
-
- public void testRemovingDefaultImplSetsNewDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add impl
- JSFLibrary impl1 = JSFCoreUtilHelper.constructJSFLib("impl1", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl1);
- //create and add impl
- JSFLibrary impl2 = JSFCoreUtilHelper.constructJSFLib("impl2", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl2);
- //test
- Assert.assertEquals(impl1, registry.getDefaultImplementation());
- //remove default impl
- registry.removeJSFLibrary(impl1);
- //test
- Assert.assertEquals(impl2, registry.getDefaultImplementation());
- }
-
- public void testRemovingLastImplNullsDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add impl
- JSFLibrary impl1 = JSFCoreUtilHelper.constructJSFLib("impl1", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl1);
- //test
- Assert.assertEquals(impl1, registry.getDefaultImplementation());
- //remove default impl
- registry.removeJSFLibrary(impl1);
- //test
- Assert.assertNull(registry.getDefaultImplementation());
- }
-
- public void testChangingLibToImplSetsNewDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add lib
- JSFLibrary lib1 = JSFCoreUtilHelper.constructJSFLib("lib1", "testfiles/JSFLib", false, false);
- registry.addJSFLibrary(lib1);
- //test
- Assert.assertNull(registry.getDefaultImplementation());
- //make lib an impl
- lib1.setImplementation(true);
- //test
- Assert.assertEquals(lib1, registry.getDefaultImplementation());
- }
-
- public void testChangingImplToLibSetsNewDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add impl
- JSFLibrary impl1 = JSFCoreUtilHelper.constructJSFLib("impl1", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl1);
- //create and add impl
- JSFLibrary impl2 = JSFCoreUtilHelper.constructJSFLib("impl2", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl2);
- //test
- Assert.assertEquals(impl1, registry.getDefaultImplementation());
- //make default impl a lib
- impl1.setImplementation(false);
- //test
- Assert.assertEquals(impl2, registry.getDefaultImplementation());
- }
-
- public void testChangingLastImplToLibNullsDefaultImpl() {
- //get prepared registry
- JSFLibraryRegistry registry = getPreparedJSFLibraryRegistry();
- //create and add impl
- JSFLibrary impl1 = JSFCoreUtilHelper.constructJSFLib("impl1", "testfiles/JSFLib", true, false);
- registry.addJSFLibrary(impl1);
- //test
- Assert.assertEquals(impl1, registry.getDefaultImplementation());
- //make default impl a lib
- impl1.setImplementation(false);
- //test
- Assert.assertNull(registry.getDefaultImplementation());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIBArchiveFilesDelegate.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIBArchiveFilesDelegate.java
deleted file mode 100644
index c71a7a2..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIBArchiveFilesDelegate.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import org.eclipse.jst.jsf.core.jsflibraryregistry.PluginProvidedJSFLibraryArchiveFilesDelegate;
-
-@SuppressWarnings("deprecation")
-public class TEST_PP_LIBArchiveFilesDelegate extends
- PluginProvidedJSFLibraryArchiveFilesDelegate {
-
- public TEST_PP_LIBArchiveFilesDelegate() {
- super();
- }
-
- @Override
- public void getArchiveFiles() {
- addArchiveFile("/lib/foo.jar");
- addArchiveFile("/boo.jar");
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIB_EMPTYArchiveFilesDelegate.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIB_EMPTYArchiveFilesDelegate.java
deleted file mode 100644
index 3b7ce71..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIB_EMPTYArchiveFilesDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry;
-
-import org.eclipse.jst.jsf.core.jsflibraryregistry.PluginProvidedJSFLibraryArchiveFilesDelegate;
-
-@SuppressWarnings("deprecation")
-public class TEST_PP_LIB_EMPTYArchiveFilesDelegate extends
- PluginProvidedJSFLibraryArchiveFilesDelegate {
-
- public TEST_PP_LIB_EMPTYArchiveFilesDelegate() {
- super();
- }
-
- @Override
- public void getArchiveFiles() {
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/migration/MigrationV1toV2Test.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/migration/MigrationV1toV2Test.java
deleted file mode 100644
index 1b06db6..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/migration/MigrationV1toV2Test.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.jsflibraryregistry.migration;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.util.JSFLibraryRegistryUpgradeUtil;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.osgi.framework.Bundle;
-
-/**
- * Tests a migration from a version 1 registry file to a version 2 file
- *
- * @author cbateman
- *
- */
-@SuppressWarnings("deprecation")
-public class MigrationV1toV2Test extends TestCase
-{
- private ByteArrayOutputStream _v1RegistryFile;
- private ByteArrayOutputStream _v2RegistryFile;
- private ByteArrayOutputStream _v1RegistryBackup;
-
- protected void setUp() throws Exception
- {
- // JSFCorePlugin must already be active to ensure that it doesn't stop on
- // the test data when start is called
- assertEquals(Bundle.ACTIVE, JSFCorePlugin.getDefault().getBundle().getState());
-
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
- // clear plugin meta-data on every call
- _v1RegistryFile = clearRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- _v2RegistryFile = clearRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- _v1RegistryBackup = clearRegistryFile(JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL));
- }
-
- private ByteArrayOutputStream clearRegistryFile(String fileName) throws Exception
- {
- final File file = getRegistryFile(fileName);
-
- ByteArrayOutputStream backup = null;
-
- if (file.exists())
- {
- // backup the file so that we can restore it on tear down.
- backup = JSFTestUtil.loadFromFile(file);
-
- assertTrue("Must be able to delete file: ".concat(fileName), file.delete());
- }
- return backup;
- }
-
- protected void tearDown() throws Exception {
-
- tearDownRegistryFile(_v1RegistryFile, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- tearDownRegistryFile(_v2RegistryFile, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- tearDownRegistryFile(_v1RegistryBackup, JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL));
- }
-
- private void tearDownRegistryFile(final ByteArrayOutputStream backup, final String name) throws Exception
- {
- // restore the registries as they were before setup
- if (backup != null)
- {
- JSFTestUtil.saveToFileSystem(backup.toByteArray(), JSFTestUtil.getPlatformAbsPath(name));
- }
- // if wasn't there, make sure to delete it
- else
- {
- clearRegistryFile(name);
- }
-
- }
- private File getRegistryFile(String fileName) throws Exception
- {
- URI uri = JSFTestUtil.getPlatformAbsPath(fileName);
- return new File(uri);
- }
-
- /**
- * Pre-condition: Empty Version 1 registry file
- *
- * Expected post-conditions:
- *
- * 1) a successful upgrade should occur, but the upgraded flag should be false
- * 2) the backup file is successfully created
- */
- public void testEmptyFileMigration()
- {
- TestFileResource emptyReg = new TestFileResource();
-
- try
- {
- emptyReg.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data");
- JSFTestUtil.savePlatformRelative(emptyReg, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertTrue(JSFTestUtil.areEqual(emptyReg, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- JSFLibraryRegistryUpgradeUtil upgradeUtil =
- JSFLibraryRegistryUpgradeUtil.getInstance();
-
- upgradeUtil.upgradeRegistryIfNecessary(2);
- assertEquals(IStatus.OK, upgradeUtil.getUpgradeStatus().getSeverity());
- assertEquals(false, upgradeUtil.getUpgradeStatus().isUpgradeOccurred());
-
- // ensure backup is successful
- assertTrue(JSFTestUtil.areEqual(emptyReg, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL.concat(".bkp"))));
-
- // in the case of empty file, the new v2 file must exist and match the v1 file after upgrade
- assertTrue(JSFTestUtil.areEqual(emptyReg, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL)));
-
- } catch (IOException e) {
- throw new RuntimeException(e);
- } catch (URISyntaxException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Pre-condition: Version 1 is present and valid with entries
- *
- * Expected post-conditions:
- *
- * 1) The V2 file will be created and populated with the old entries.
- * 2) Upgrade flag set.
- * 3) The ws will still need manual upgrade (not tested for)
- * 4) The v1 backup file will be created.
- *
- */
- public void testValidNonEmptyMigration()
- {
- TestFileResource validNonEmptyReg = new TestFileResource();
-
- try
- {
- validNonEmptyReg.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data");
- JSFTestUtil.savePlatformRelative(validNonEmptyReg, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertTrue(JSFTestUtil.areEqual(validNonEmptyReg, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- JSFLibraryRegistryUpgradeUtil upgradeUtil =
- JSFLibraryRegistryUpgradeUtil.getInstance();
-
- upgradeUtil.upgradeRegistryIfNecessary(2);
- assertEquals(IStatus.OK, upgradeUtil.getUpgradeStatus().getSeverity());
- assertEquals(true, upgradeUtil.getUpgradeStatus().isUpgradeOccurred());
-
- // ensure backup is successful
- assertTrue(JSFTestUtil.areEqual(validNonEmptyReg
- , JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL))));
-
- TestFileResource expectedV2File = new TestFileResource();
- expectedV2File.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data");
-
- // in the case of empty file, the new v2 file must exist and match the v1 file after upgrade
- assertTrue(JSFTestUtil.areEqual(expectedV2File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL)));
-
- } catch (IOException e) {
- throw new RuntimeException(e);
- } catch (URISyntaxException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Pre-condition: No JSF Library Registry exists whatsoever
- *
- * Expected post-conditions:
- *
- * 1) No upgrade should occur
- * 2) No upgrade flag set
- * 3) Do nothing
- */
- public void testNoRegistryFileMigration()
- {
-
- JSFLibraryRegistryUpgradeUtil upgradeUtil =
- JSFLibraryRegistryUpgradeUtil.getInstance();
-
- upgradeUtil.upgradeRegistryIfNecessary(2);
-
- // status should ok with no upgrade
- assertEquals(IStatus.OK, upgradeUtil.getUpgradeStatus().getSeverity());
- assertEquals(false, upgradeUtil.getUpgradeStatus().isUpgradeOccurred());
-
- // no file should be created
- try
- {
- File file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertFalse(file.exists());
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- assertFalse(file.exists());
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL));
- assertFalse(file.exists());
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Pre-condition: V2 library already exists as expected. The V1 file is not present
- *
- * Expected post-conditions:
- *
- * 1) No upgrade should occur
- * 2) No upgrade flag set
- * 3) Do nothing
- */
- public void testV2AlreadyPresent_NoV1()
- {
- TestFileResource validV2File = new TestFileResource();
-
-
- // no file should be created
- try
- {
- // load V2
- validV2File.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data");
- JSFTestUtil.savePlatformRelative(validV2File, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- assertTrue(JSFTestUtil.areEqual(validV2File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL)));
-
- JSFLibraryRegistryUpgradeUtil upgradeUtil =
- JSFLibraryRegistryUpgradeUtil.getInstance();
-
- upgradeUtil.upgradeRegistryIfNecessary(2);
-
- // status should ok with no upgrade
- assertEquals(IStatus.OK, upgradeUtil.getUpgradeStatus().getSeverity());
- assertEquals(false, upgradeUtil.getUpgradeStatus().isUpgradeOccurred());
-
- // No backup or v1.
- File file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertFalse(file.exists());
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL));
- assertFalse(file.exists());
-
- // v2 file should be present and unchanged.
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- assertTrue(file.exists());
- assertTrue(JSFTestUtil.areEqual(validV2File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL)));
-
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
-
- }
-
- /**
- * Pre-condition: V2 library already exists as expected. The V1 file is present
- *
- * Expected post-conditions:
- *
- * 1) No upgrade should occur
- * 2) No upgrade flag set
- * 3) Do nothing
- */
- public void testV2AlreadyPresent_WithV1()
- {
- TestFileResource validV2File = new TestFileResource();
- TestFileResource validV1File = new TestFileResource();
-
- // no file should be created
- try
- {
- // load V1
- validV1File.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data");
- JSFTestUtil.savePlatformRelative(validV1File, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertTrue(JSFTestUtil.areEqual(validV1File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- // load V2
- validV2File.load(TestsPlugin.getDefault().getBundle(), "/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data");
- JSFTestUtil.savePlatformRelative(validV2File, JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- assertTrue(JSFTestUtil.areEqual(validV1File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- JSFLibraryRegistryUpgradeUtil upgradeUtil =
- JSFLibraryRegistryUpgradeUtil.getInstance();
-
- upgradeUtil.upgradeRegistryIfNecessary(2);
-
- // status should ok with no upgrade
- assertEquals(IStatus.OK, upgradeUtil.getUpgradeStatus().getSeverity());
- assertEquals(false, upgradeUtil.getUpgradeStatus().isUpgradeOccurred());
-
- // v1 and v2 files should be present. And should be unchanged
- File file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL);
- assertTrue(file.exists());
- assertTrue(JSFTestUtil.areEqual(validV1File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V2_URL);
- assertTrue(file.exists());
- assertTrue(JSFTestUtil.areEqual(validV1File, JSFTestUtil.getPlatformAbsPath(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL)));
-
- // No backup or v1.
- file = getRegistryFile(JSFLibraryRegistryUpgradeUtil.getBackupFileName(JSFLibraryRegistryUpgradeUtil.JSF_LIBRARY_REGISTRY_V1_URL));
- assertFalse(file.exists());
-
-
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
-
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMAttributeDeclaration.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMAttributeDeclaration.java
deleted file mode 100644
index 35e50ff..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMAttributeDeclaration.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.mock;
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class MockCMAttributeDeclaration extends MockCMNode implements
- CMAttributeDeclaration
-{
-
- private CMDataType _cmType;
-
- public MockCMAttributeDeclaration(String nodeName, CMDataType cmType)
- {
- super(nodeName, CMNode.ATTRIBUTE_DECLARATION);
- _cmType = cmType;
- }
-
- public String getAttrName()
- {
- return super.getNodeName();
- }
-
- public CMDataType getAttrType()
- {
- return _cmType;
- }
-
- public String getDefaultValue()
- {
- throw new UnsupportedOperationException();
- }
-
- @SuppressWarnings("rawtypes")
- public Enumeration getEnumAttr()
- {
- throw new UnsupportedOperationException();
- }
-
- public int getUsage()
- {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMNode.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMNode.java
deleted file mode 100644
index f8b38a3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMNode.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.mock;
-
-import junit.framework.Assert;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class MockCMNode implements CMNode
-{
- private final String _nodeName;
- private final int _nodeType;
-
- public MockCMNode(final String nodeName, final int nodeType)
- {
- _nodeName = nodeName;
- switch(nodeType)
- {
- case CMNode.ANY_ELEMENT:
- case CMNode.ATTRIBUTE_DECLARATION:
- case CMNode.DATA_TYPE:
- case CMNode.DOCUMENT:
- case CMNode.DOCUMENTATION:
- case CMNode.ELEMENT_DECLARATION:
- case CMNode.ENTITY_DECLARATION:
- case CMNode.GROUP:
- case CMNode.NAME_SPACE:
- _nodeType = nodeType;
- break;
- default:
- _nodeType = -1;
- Assert.fail("Invalid type: "+nodeType);
- }
- }
- public String getNodeName()
- {
- return _nodeName;
- }
-
- public int getNodeType()
- {
- return _nodeType;
- }
-
- public boolean supports(String propertyName)
- {
- throw new UnsupportedOperationException();
- }
-
- public Object getProperty(String propertyName)
- {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockJSPTagRegistry.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockJSPTagRegistry.java
deleted file mode 100644
index 5e2509e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockJSPTagRegistry.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.mock;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttribute;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.TagElement;
-import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
-import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
-
-public class MockJSPTagRegistry implements ITagRegistry
-{
-
- public boolean isDisposed()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void refresh(Runnable runAfter, boolean flushCaches)
- {
- throw new UnsupportedOperationException();
- }
-
- public void addListener(ITagRegistryListener listener)
- {
- //no-op
- }
-
- public void removeListener(ITagRegistryListener listener)
- {
- //no-op
- }
-
- public Collection<? extends Namespace> getAllTagLibraries()
- {
- List<Namespace> all = new ArrayList<Namespace>();
- MyNamespace ns_core = new MyNamespace(ITLDConstants.URI_JSF_CORE);
- ns_core.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_CORE, "view"));
- ns_core.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_CORE, "loadBundle"));
- all.add(ns_core);
-
- //jsf html
- MyNamespace ns = new MyNamespace(ITLDConstants.URI_JSF_HTML);
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "form"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "commandButton"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "commandLink"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "panelGrid"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "dataTable"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "graphicImage"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "inputHidden"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "message"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "messages"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "outputFormat"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "outputLabel"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "outputText"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "panelGroup"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "inputText"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "inputSecret"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectBooleanCheckbox"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectManyCheckbox"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectManyListbox"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectManyMenu"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectOneListbox"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectOneMenu"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectOneRadio"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "inputTextarea"));
- ns.addViewElement(new MyTagElement(ITLDConstants.URI_JSF_HTML, "selectBooleanCheckbox"));
- all.add(ns);
- return all;
- }
-
- public Namespace getTagLibrary(String uri)
- {
- for (final Namespace ns : getAllTagLibraries())
- {
- if (ns.getNSUri().equals(uri))
- {
- return ns;
- }
- }
- return null;
- }
-
- private static class MyNamespace extends Namespace
- {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private final String _uri;
- private final List<ITagElement> _viewElements = new ArrayList<ITagElement>();
-
- /**
- * @param uri
- */
- public MyNamespace(final String uri)
- {
- _uri = uri;
- }
-
- @Override
- public String getNSUri()
- {
- return _uri;
- }
-
- void addViewElement(final ITagElement tagElement)
- {
- _viewElements.add(tagElement);
- }
-
- @Override
- public Collection<ITagElement> getViewElements()
- {
- return _viewElements;
- }
-
- @Override
- public boolean hasViewElements()
- {
- return getViewElements().size() > 0;
- }
-
- @Override
- public boolean isInitialized()
- {
- return true;
- }
-
- @Override
- public ITagElement getViewElement(String name)
- {
- for (final ITagElement element : getViewElements()){
- if (element.getName().equals(name))
- {
- return element;
- }
- }
- return null;
- }
-
- @Override
- public String getDisplayName()
- {
- throw new UnsupportedOperationException();
- }
-
- }
-
- private static class MyTagElement extends TagElement
- {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private final String _name;
- private final String _uri;
-
- public MyTagElement(String uri, String name)
- {
- super();
- _name = name;
- _uri = uri;
- }
-
- public Map<String, ? extends ITagAttribute> getAttributes()
- {
- return Collections.emptyMap();
- }
-
- @Override
- public String getName()
- {
- return _name;
- }
-
- @Override
- public String getUri()
- {
- return _uri;
- }
-
- @Override
- public String getTagHandlerClassName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public Map getAttributeHandlers()
- {
- return Collections.emptyMap();
- }
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockTLDAttributeDeclaration.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockTLDAttributeDeclaration.java
deleted file mode 100644
index 502f881..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockTLDAttributeDeclaration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.mock;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDataTypeImpl;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-public class MockTLDAttributeDeclaration extends MockCMAttributeDeclaration
- implements TLDAttributeDeclaration
-{
-
- private final String _description;
- private final String _id;
- private final boolean _required;
-
- public MockTLDAttributeDeclaration(String nodeName, CMDataType cmType, String description, String id, boolean required)
- {
- super(nodeName, cmType);
- _description = description;
- _id = id;
- _required = required;
- }
-
- public MockTLDAttributeDeclaration(final String nodeName, String description, String id, boolean required)
- {
- this(nodeName, new CMDataTypeImpl("foo data type name"), description, id, required);
- }
- public String getDescription()
- {
- return _description;
- }
-
- public String getId()
- {
- return _id;
- }
-
- public CMDocument getOwnerDocument()
- {
- throw new UnsupportedOperationException();
- }
-
- public String getRtexprvalue()
- {
- throw new UnsupportedOperationException();
- }
-
- public String getType()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isFragment()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isRequired()
- {
- return _required;
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/JSFFacetInstallDataModelProviderTestCases.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/JSFFacetInstallDataModelProviderTestCases.java
deleted file mode 100644
index eba1bbf..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/JSFFacetInstallDataModelProviderTestCases.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import java.util.Set;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.project.facet.IJSFFacetInstallDataModelProperties;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-@SuppressWarnings("deprecation")
-public class JSFFacetInstallDataModelProviderTestCases extends TestCase {
- private static final String PROJ_2_3_NAME = "_TEST_2_3_PROJECT";
- //private static final String PROJ_2_4_NAME = "_TEST_2_4_PROJECT";
-
- private JSFFacetInstallDataModelProvider dm;
-
- protected void setUp() throws Exception {
- //seed JSFLib registry if not present
- JSFCoreUtilHelper.createJSFLibraryRegistry();
- //create a project, if one doesn't exist in the current workspace
- IProject project = JSFCoreUtilHelper.createWebProject(PROJ_2_3_NAME);
- //create lib
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getDefaultImplementation();
-
- dm = new JSFFacetInstallDataModelProvider();
- IDataModel model = DataModelFactory.createDataModel(dm);
- model.setStringProperty(IJSFFacetInstallDataModelProperties.FACET_PROJECT_NAME, project.getName());
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.getPropertyNames()'
- */
- public void testGetPropertyNames() {
- Set<?> names = dm.getPropertyNames();
- Assert.assertNotNull(names);
-// Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.IMPLEMENTATION));
-// Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.DEPLOY_IMPLEMENTATION));
- Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.CONFIG_PATH));
- Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.SERVLET_NAME));
- Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS));
- Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.WEBCONTENT_DIR));
-
- Assert.assertTrue(names.contains(IJSFFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE));
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.getDefaultProperty(String)'
- */
- public void testGetDefaultPropertyString() {
-// Assert.assertNotNull(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION));
-// Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION) instanceof JSFLibraryInternalReference);
-// JSFLibraryInternalReference ref = (JSFLibraryInternalReference)dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION) ;
-// Assert.assertTrue(ref.getLibrary() == jsfLib);
-// Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.DEPLOY_IMPLEMENTATION) == Boolean.TRUE);
- Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH) != null);
- Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME) != null);
- Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS) != null);
- Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.WEBCONTENT_DIR) != null);
-
-// Assert.assertTrue(dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE) != null);
- }
-
- /*
- * Test method for 'org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.validate(String)'
-
- public void testValidateString() {
- //positive tests
- IDataModel model = dm.getDataModel();
-
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, (String)dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH));
- model.setProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION, jsfLib);
- model.setStringProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME, (String)dm.getDefaultProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME));
-
- Assert.assertTrue(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
- Assert.assertTrue(dm.validate(IJSFFacetInstallDataModelProperties.IMPLEMENTATION).isOK());
- Assert.assertTrue(dm.validate(IJSFFacetInstallDataModelProperties.SERVLET_NAME).isOK());
-
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, "foo.xml");
- Assert.assertTrue(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
- //negative tests
- //config path
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, "");
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, "../../../foo.xml");
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, "WEB-INF/xxx.txt");
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- String pathWithDevice = new Path(Platform.getLocation().getDevice(), "/temp/faces-config.xml").toOSString();
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, pathWithDevice );
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- model.setStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH, "\\WEB-INF\\xxx.txt");
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- //impl
- model.setProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION, null);
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.CONFIG_PATH).isOK());
-
- //servlet name
- //can't check null name because null set returns default value
- model.setStringProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME, " ");
- Assert.assertFalse(dm.validate(IJSFFacetInstallDataModelProperties.SERVLET_NAME).isOK());
-
- }
- */
-
-
- /*
- * Test method for:
- * org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.isValidConfigFileName()
- * org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider.validateConfigLocation()
- */
- public void testConfigFileNameValidation ()
- {
- assertTrue(JSFFacetInstallDataModelProvider.isValidConfigFileName("faces-config.xml"));
- assertTrue(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml"));
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces config.xml")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config//faces-config.xml")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config///faces-config.xml")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml,/WEB-INF/config/faces-config2.xml")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml, /WEB-INF/config/faces-config2.xml")); // Invalid
-
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml, ")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml. ")); // Invalid
-
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml%")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml.&65")); // Invalid
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/faces-config.xml*")); // Invalid
-
- assertFalse(JSFFacetInstallDataModelProvider.isValidConfigFileName("/WEB-INF/config/face*s-config.xml*")); // Invalid
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils.java
deleted file mode 100644
index 5fb9c86..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils.java
+++ /dev/null
@@ -1,876 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.javaee.web.WebAppVersionType;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.eclipse.jst.jsf.core.internal.project.facet.IJSFFacetInstallDataModelProperties;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFUtilFactory;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFUtils;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.mock.MockBundle;
-import org.eclipse.jst.jsf.test.util.mock.MockDataModel;
-import org.eclipse.jst.jsf.test.util.mock.MockDataModel.MockPropertyHolder;
-import org.eclipse.jst.jsf.test.util.mock.MockModelProvider;
-import org.eclipse.jst.jsf.test.util.mock.MockResource;
-
-//@Category(NoPluginEnvironment.class)
-public abstract class TestJSFUtils extends TestCase
-{
- private static final String PATTERN_SLASH_FACES_SLASH_ALL = "/faces/*";
- // private WebProjectTestEnvironment _webProjectTestEnv;
- protected TestableJSFUtils _jsfUtils;
- protected Object _modelObject;
- private WebAppAccessor _webAppAccessor;
-
-// @Before
- protected void setUp() throws Exception
- {
- // for these tests, it doesn't matter which version is created.
- _modelObject = new Object();
- _jsfUtils = new TestableJSFUtils(new JSFUtilFactory().create(
- getVersionToTestIn(), null),
- new MockModelProvider(_modelObject));
- assertEquals(getVersionToTestIn(), _jsfUtils.getVersion());
- _webAppAccessor = createWebAccessor();
- }
-
- protected void testRollbackWebApp(final String version)
- {
- // safe on an empty web app
- final Object webApp = _webAppAccessor.createWebApp(version);
- _jsfUtils.rollbackWebApp(webApp);
-
- // Add servlet
- final Object servlet = _webAppAccessor.createServlet("Foobar",
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- _jsfUtils.rollbackWebApp(webApp);
- // servlet should be gone
- assertEquals(0, _webAppAccessor.getServlets(webApp).size());
- assertTrue(_webAppAccessor.getServlet(webApp, "Foobar") == null);
-
- // Add servlet and servlet mapping and context param
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- Object mapping = _webAppAccessor.createServletMapping();
- _webAppAccessor.setMappingData(webApp, Collections
- .singletonList(".xhtml"), servlet, mapping);
- _webAppAccessor.addMappingToWebApp(webApp, mapping);
- Object contextParam = _webAppAccessor.createContextParam(JSFUtils.JSF_CONFIG_CONTEXT_PARAM, "/WEB-INF/faces-config.xml", version);
- _webAppAccessor.setContextParam(webApp, contextParam, version);
- assertEquals(1, _webAppAccessor.getServlets(webApp).size());
- assertTrue(_webAppAccessor.getServlet(webApp, "Foobar") == servlet);
- assertEquals(1, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- assertEquals(1, _webAppAccessor.getContextParams(webApp, version).size());
- _jsfUtils.rollbackWebApp(webApp);
- // servlet should be gone
- assertEquals(0, _webAppAccessor.getServlets(webApp).size());
- assertTrue(_webAppAccessor.getServlet(webApp, "Foobar") == null);
- // servlet mapping should be gone.
- assertEquals(0, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- // context param should be gone
- assertEquals(0, _webAppAccessor.getContextParams(webApp, version).size());
-
- // add two servlet and servlet mappings and verify it only removes
- // the JSF one
- // Add servlet and servlet mapping
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- Object servlet2 = _webAppAccessor.createServlet("DonotRemove",
- "com.foo.SomeClass");
- _webAppAccessor.addServletToWebApp(webApp, servlet2);
- _webAppAccessor.addMappingToWebApp(webApp, mapping);
- Object mapping2 = _webAppAccessor.createServletMapping();
- _webAppAccessor.setMappingData(webApp, Collections
- .singletonList("blah"), servlet2, mapping2);
- _webAppAccessor.addMappingToWebApp(webApp, mapping2);
- assertEquals(2, _webAppAccessor.getServlets(webApp).size());
- assertTrue(_webAppAccessor.getServlet(webApp, "Foobar") == servlet);
- assertTrue(_webAppAccessor.getServlet(webApp, "DonotRemove") == servlet2);
- // servlet mapping should be gone.
- assertEquals(2, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- _jsfUtils.rollbackWebApp(webApp);
- // servlet should be gone, but servlet2 is still here
- assertEquals(1, _webAppAccessor.getServlets(webApp).size());
- assertSame(servlet2, _webAppAccessor.getServlet(webApp, "DonotRemove"));
- // servlet mapping1 should be gone, but mapping 2 still there.
- assertEquals(1, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- }
-
- protected void testUpdateWebApp_NewServlet(final String version)
- {
- Object webApp = _webAppAccessor.createWebApp(version);
-
- final Map<String, MockPropertyHolder> configProps = new HashMap<String, MockPropertyHolder>();
- configProps.put(
- IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS,
- new MockPropertyHolder(new String[]
- { PATTERN_SLASH_FACES_SLASH_ALL }, null));
- configProps.put(IJSFFacetInstallDataModelProperties.CONFIG_PATH,
- new MockPropertyHolder("/WEB-INF/faces-config.xml", null));
- final MockDataModel config = new MockDataModel("testModel", configProps);
- _jsfUtils.updateWebApp(webApp, config);
- verifyServlet(webApp);
-
- // cover the cases where the CONFIG_PATH is not the default
- // case one: the config param is not already present
- webApp = _webAppAccessor.createWebApp(version);
- configProps.put(IJSFFacetInstallDataModelProperties.CONFIG_PATH,
- new MockPropertyHolder("/WEB-INF/app-config.xml", null));
- _jsfUtils.updateWebApp(webApp, config);
- verifyServlet(webApp);
- assertEquals(1, _webAppAccessor.getContextParams(webApp, version).size());
- assertEquals("/WEB-INF/app-config.xml", _webAppAccessor.getContextParamValue(_webAppAccessor.getContextParams(webApp, version).get(0),version));
-
- // case two: the config param is already present
- webApp = _webAppAccessor.createWebApp(version);
- configProps.put(IJSFFacetInstallDataModelProperties.CONFIG_PATH,
- new MockPropertyHolder("/WEB-INF/app-config.xml", null));
- Object param = _webAppAccessor.createContextParam(JSFUtils.JSF_CONFIG_CONTEXT_PARAM, "SomeOtherValue", version);
- _webAppAccessor.setContextParam(webApp, param, version);
- _jsfUtils.updateWebApp(webApp, config);
- verifyServlet(webApp);
- assertEquals(1, _webAppAccessor.getContextParams(webApp, version).size());
-
- }
-
- @SuppressWarnings("rawtypes")
- protected void verifyServlet(final Object webApp)
- {
- final Object defaultServlet = _webAppAccessor.getServlet(webApp,
- JSFUtils.JSF_DEFAULT_SERVLET_NAME);
- assertNotNull(defaultServlet);
- _webAppAccessor.verifyServlet(defaultServlet,
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.verifyLoadOnStartup(defaultServlet, Integer.valueOf(1));
- List mappings = _webAppAccessor.getServletMappings_Servlet(webApp,
- defaultServlet);
- assertEquals(1, mappings.size());
- Object mapping = mappings.get(0);
- assertNotNull(mapping);
- _webAppAccessor.verifyMapping(mapping,
- JSFUtils.JSF_DEFAULT_SERVLET_NAME,
- PATTERN_SLASH_FACES_SLASH_ALL);
- }
-
- protected void testUpdateWebApp_ExistingServlet(final String version)
- {
- final Object webApp = _webAppAccessor.createWebApp(version);
- final Object servlet = _webAppAccessor.createServlet("Foobar",
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- final Map<String, MockPropertyHolder> configProps = new HashMap<String, MockPropertyHolder>();
- final MockDataModel config = new MockDataModel("testModel", configProps);
-
- _jsfUtils.updateWebApp(webApp, config);
- Object defaultServlet = _webAppAccessor.getServlet(webApp,
- JSFUtils.JSF_DEFAULT_SERVLET_NAME);
- assertNotNull(defaultServlet);
- _webAppAccessor.verifyServlet(defaultServlet,
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.verifyLoadOnStartup(defaultServlet, Integer.valueOf(1));
-
- // do again, but this time have an existing servlet mapping that matches
- // Foobar
- final Object mapping = _webAppAccessor.createServletMapping();
- _webAppAccessor.setMappingData(webApp, Collections
- .singletonList("/faces"), servlet, mapping);
- _webAppAccessor.addMappingToWebApp(webApp, mapping);
- configProps.put(IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS,
- new MockPropertyHolder(new String[]{"/faces"}, null));
- _jsfUtils.updateWebApp(webApp, config);
- defaultServlet = _webAppAccessor.getServlet(webApp,
- JSFUtils.JSF_DEFAULT_SERVLET_NAME);
- _webAppAccessor.verifyServlet(defaultServlet,
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.verifyMapping(mapping,
- JSFUtils.JSF_DEFAULT_SERVLET_NAME, "/faces");
- _webAppAccessor.verifyLoadOnStartup(defaultServlet, Integer.valueOf(1));
-
- }
-
- protected void testGetFileUrlPath_NonNullCases(final String version)
- {
- // a web app with valid servlet and extension mapping
- final Object webApp = _webAppAccessor.createWebApp(version);
- final Object servlet = _webAppAccessor.createServlet("JSF Servlet",
- JSFUtils.JSF_SERVLET_CLASS);
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- final Object mapping = _webAppAccessor.createServletMapping();
- _webAppAccessor.setMappingData(webApp, Collections
- .singletonList(".faces"), servlet, mapping);
- _webAppAccessor.addMappingToWebApp(webApp, mapping);
-
- IPath fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- "/test.jsp"));
- assertEquals("/test.faces", fileUrlPath.toString());
-
- // web app with valid servlet and non-default extension mapping
- fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- IResource.FILE, new Path("/WebContent/test.xhtml")), new Path(
- "/test.xhtml"));
- assertEquals("/test.faces", fileUrlPath.toString());
-
- // web app with valid servlet and path-based mapping
- _webAppAccessor.setUrlPattern(mapping, Collections
- .singletonList("/faces"));
- fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- "/test.jsp"));
- assertEquals("/faces/test.jsp", fileUrlPath.toString());
-
- // web app with valid servlet and path-based mapping match *
- _webAppAccessor.setUrlPattern(mapping, Collections
- .singletonList(PATTERN_SLASH_FACES_SLASH_ALL));
- fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- "/test.jsp"));
- assertEquals("/faces/test.jsp", fileUrlPath.toString());
-
- // web app with valid servlet and extension mapping based on a
- // non-default, default extension
- _webAppAccessor.setUrlPattern(mapping, Collections
- .singletonList(".jspx"));
- final Object param = _webAppAccessor.createContextParam(
- JSFUtils.JSF_DEFAULT_SUFFIX_CONTEXT_PARAM, ".xhtml", version);
- _webAppAccessor.setContextParam(webApp, param,version);
- fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- IResource.FILE, new Path("/WebContent/test.xhtml")), new Path(
- "/test.xhtml"));
- assertEquals("/test.jspx", fileUrlPath.toString());
- }
-
- protected void testGetFileUrlPath_NullCases(final String version)
- {
- // a null webApp object produces a null path
- final Path existingURL = new Path("foobar");
- verifyNull(existingURL, null);
-
- // a non-null value that is not instanceof WebApp returns a null path
- verifyNull(existingURL, new Object());
- // a web app with no servlet produces a null path
-
- final Object webApp = _webAppAccessor.createWebApp("2.4");
- verifyNull(existingURL, webApp);
-
- // a web app with no meaningful servlet returns null
- Object servlet = _webAppAccessor.createServlet(null, null);
- _webAppAccessor.addServletToWebApp(webApp, servlet);
- verifyNull(existingURL, webApp);
-
- doPre25SpecificOrNoop(existingURL, webApp, servlet);
-
- // wrong servlet class name
- _webAppAccessor.setServletClass(servlet, "com.wrong.Servlet");
- verifyNull(existingURL, webApp);
-
- // multiple wrong class names
- servlet = _webAppAccessor.createServlet("JSF Servlet",
- "com.AnotherWrong.Servlet");
- _webAppAccessor.addServletToWebApp(webApp, servlet);
-
- assertEquals(2, _webAppAccessor.getServlets(webApp).size());
- verifyNull(existingURL, webApp);
-
- // valid servlet class, but no mappings
- _webAppAccessor.setServletClass(servlet, JSFUtils.JSF_SERVLET_CLASS);
- verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- new Path("/somepath")));
- verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- new Path("/somepath.xhtml")));
-
- final Object mapping = _webAppAccessor.createServletMapping();
- _webAppAccessor.addMappingToWebApp(webApp, mapping);
- assertEquals(1, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- assertEquals(0, _webAppAccessor.getServletMappings_Servlet(webApp,
- servlet).size());
- verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- new Path("/somepath.xhtml")));
-
- // empty mapping that matches to servlet
- _webAppAccessor.setServletOnMapping(mapping, servlet);
- assertEquals(1, _webAppAccessor.getServletMappings_WebApp(webApp)
- .size());
- // mapping should be matched
- assertEquals(1, _webAppAccessor.getServletMappings_Servlet(webApp,
- servlet).size());
- assertTrue(_webAppAccessor.getServletMappings_Servlet(webApp, servlet)
- .contains(mapping));
- verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- new Path("/somepath.xhtml")));
- }
-
- protected void doPre25SpecificOrNoop(final Path existingURL,
- final Object webApp, final Object servlet)
- {
- // this is a noop unless explicitly overridden
- }
-
-// @Test
- public void testFacesConfigCreation() throws IOException
- {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- _jsfUtils.printConfigFile_testable(os);
- assertEquals(getExpectedDefaultConfigFile().toString("ISO-8859-1")
- .replaceAll("\\r", ""), os.toString("ISO-8859-1"));
- }
-
- protected TestFileResource getExpectedDefaultConfigFile()
- throws IOException
- {
- String replaceAll = getVersionToTestIn().toString().replaceAll("\\.",
- "_");
- final String defaultFileName = String.format(
- "/testfiles/facet/expected-faces-config-%s.xml", replaceAll);
- TestFileResource testFileResource = new TestFileResource();
- testFileResource.load(new MockBundle(new File(".").getCanonicalPath()),
- defaultFileName);
- return testFileResource;
- }
-
-// @Test
- public void testIsJavaEE()
- {
- final org.eclipse.jst.javaee.web.WebApp javaEEWebApp = WebFactory.eINSTANCE
- .createWebApp();
- assertEquals(WebAppVersionType._25_LITERAL, javaEEWebApp.getVersion());
- assertTrue(_jsfUtils.isJavaEE(javaEEWebApp));
- javaEEWebApp.setVersion(WebAppVersionType._30_LITERAL);
- assertTrue(_jsfUtils.isJavaEE(javaEEWebApp));
-
- final org.eclipse.jst.j2ee.webapplication.WebApp J2EEWebApp = org.eclipse.jst.j2ee.webapplication.WebapplicationFactory.eINSTANCE
- .createWebApp();
- assertFalse(_jsfUtils.isJavaEE(J2EEWebApp));
- }
-
-// @Test
- public void testGetModelProvider()
- {
- final IModelProvider modelProvider = _jsfUtils.getModelProvider();
- assertNotNull(modelProvider);
- assertEquals(_modelObject, modelProvider.getModelObject());
-
- _jsfUtils = new TestableJSFUtils(new JSFUtilFactory().create(
- JSFVersion.V2_0, null), new MockModelProvider(null));
- // returns null when the model provider has a null model object.
- assertNull(_jsfUtils.getModelProvider());
- }
-
-// @Test
- public void testGetDisplayName()
- {
- final Map<String, MockPropertyHolder> propsMap = new HashMap<String, MockPropertyHolder>();
- final MockDataModel model = new MockDataModel("TestID", propsMap);
- // when the property is not present, use the default.
- assertEquals(JSFUtils.JSF_DEFAULT_SERVLET_NAME, _jsfUtils
- .getDisplayName_testable(model));
-
- // if property is present but empty or only whitespace, we also use
- // the default.
- model.setProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME, "");
- assertEquals(JSFUtils.JSF_DEFAULT_SERVLET_NAME, _jsfUtils
- .getDisplayName_testable(model));
- model.setProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME, "");
- assertEquals(JSFUtils.JSF_DEFAULT_SERVLET_NAME, _jsfUtils
- .getDisplayName_testable(model));
-
- // otherwise, we should get back the value
- model.setProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME,
- "foobar");
- assertEquals("foobar", _jsfUtils.getDisplayName_testable(model));
- }
-
-// @Test
- public void testGetServletClassName()
- {
- final Map<String, MockPropertyHolder> propsMap = new HashMap<String, MockPropertyHolder>();
- final MockDataModel model = new MockDataModel("TestID", propsMap);
- // when the property is not present, use the default.
- assertEquals(JSFUtils.JSF_SERVLET_CLASS, _jsfUtils
- .getServletClassname_testable(model));
-
- // if property is present but empty or only whitespace, we also use
- // the default.
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_CLASSNAME, "");
- assertEquals(JSFUtils.JSF_SERVLET_CLASS, _jsfUtils
- .getServletClassname_testable(model));
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_CLASSNAME, "");
- assertEquals(JSFUtils.JSF_SERVLET_CLASS, _jsfUtils
- .getServletClassname_testable(model));
-
- // otherwise, we should get back the value
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_CLASSNAME, "foobar");
- assertEquals("foobar", _jsfUtils.getServletClassname_testable(model));
- }
-
-// @Test
- public void testGetServletMappings()
- {
- final Map<String, MockPropertyHolder> propsMap = new HashMap<String, MockPropertyHolder>();
- final MockDataModel model = new MockDataModel("TestID", propsMap);
-
- // empty array should beget empty list
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS,
- new String[]
- {});
- assertTrue(_jsfUtils.getServletMappings_testable(model).isEmpty());
-
- // non-empty list should beget the same list back
- final String[] values1 = new String[]
- { "foo" };
- final String[] valuesMany = new String[]
- { "foo", "bar", "foobar" };
-
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS,
- values1);
- assertEquals(Arrays.asList(values1), _jsfUtils
- .getServletMappings_testable(model));
-
- model.setProperty(
- IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS,
- valuesMany);
- assertEquals(Arrays.asList(valuesMany), _jsfUtils
- .getServletMappings_testable(model));
- }
-
-// @Test
- public void testIsJSFPage()
- {
- assertTrue(_jsfUtils.isJSFPage_testable(null));
- }
-
-// @Test
- public void testIsValidKnownExtension()
- {
- assertTrue(_jsfUtils.isValidKnownExtension_testable("jsp"));
- assertTrue(_jsfUtils.isValidKnownExtension_testable("jspx")); //$NON-NLS-1$
- assertTrue(_jsfUtils.isValidKnownExtension_testable("jsf")); //$NON-NLS-1$
- assertTrue(_jsfUtils.isValidKnownExtension_testable("xhtml")); //$NON-NLS-1$
-
- assertFalse(_jsfUtils.isValidKnownExtension_testable("html")); //$NON-NLS-1$)
- assertFalse(_jsfUtils.isValidKnownExtension_testable("dtd")); //$NON-NLS-1$)
- assertFalse(_jsfUtils.isValidKnownExtension_testable("jspf")); //$NON-NLS-1$)
- assertFalse(_jsfUtils.isValidKnownExtension_testable("php")); //$NON-NLS-1$)
-
- assertFalse(_jsfUtils.isValidKnownExtension_testable("")); //$NON-NLS-1$)
- assertFalse(_jsfUtils.isValidKnownExtension_testable(null)); // )
- }
-
- protected final void verifyNull(final Path existingURL,
- final Object webApp, final IResource res)
- {
- assertNull(_jsfUtils.getFileUrlPath(webApp, res, null));
- assertNull(_jsfUtils.getFileUrlPath(webApp, res, existingURL));
- }
-
- protected final void verifyNull(final Path existingURL, final Object webApp)
- {
- verifyNull(existingURL, webApp, null);
- }
-
- protected abstract JSFVersion getVersionToTestIn();
-
- protected abstract WebAppAccessor createWebAccessor();
-
- /**
- * Concrete implementations are used to abstract test cases away from
- * whether they are using the J2EE or JavaEE version of the WebApp objects.
- *
- * @author cbateman
- *
- */
- @SuppressWarnings("rawtypes")
- public static abstract class WebAppAccessor
- {
- protected abstract Object createWebApp(final String version);
-
- protected abstract String getContextParamValue(Object param, String version);
-
- protected abstract List getContextParams(Object webApp, String version);
-
- protected abstract void verifyMapping(Object mapping,
- String servletName, String servletClass);
-
- protected abstract Object createServlet(final String servletName,
- final String servletClass);
-
- protected abstract Object createServletMapping();
-
- protected abstract void setServletClass(Object servlet, String name);
-
- protected abstract List getServlets(final Object webApp);
-
- protected abstract void addMappingToWebApp(final Object webApp,
- final Object mapping);
-
- protected abstract void addServletToWebApp(final Object webApp,
- final Object servlet);
-
- protected abstract List getServletMappings_WebApp(final Object webApp);
-
- protected abstract List getServletMappings_Servlet(final Object webApp,
- final Object servlet);
-
- protected abstract void setMappingData(final Object webApp,
- final List<String> urlPatterns, final Object servlet,
- final Object mapping);
-
- /**
- * Clears any existing patterns and replaces them with patterns
- *
- * @param mapping
- * @param patterns
- */
- protected abstract void setUrlPattern(final Object mapping,
- final List<String> patterns);
-
- protected abstract Object createContextParam(final String name,
- final String value, final String version);
-
- protected abstract void setContextParam(final Object webApp,
- final Object param, final String version);
-
- protected abstract Object getServlet(final Object webApp,
- final String servletName);
-
- protected abstract void verifyServlet(final Object defaultServlet,
- final String className);
-
- protected abstract void verifyLoadOnStartup(
- final Object defaultServlet, final Integer expectedValue);
-
- protected abstract void setServletOnMapping(Object mapping,
- Object servlet);
- }
-
- // @Override
- // protected void tearDown() throws Exception {
- // super.tearDown();
- // _webProjectTestEnv.getTestProject().close(null);
- // }
-
- // public void testSearchServletMappings_NoPrefixMappings() {
- // final List<String> mappings = new ArrayList<String>();
- // // prefix mappings must end in "*"
- // mappings.add("/notaprefixmapping/");
- // mappings.add("*.faces");
- // mappings.add("*.html");
- // mappings.add("*.jsp");
- //
- // // if no preference, then the first one should be found
- // MappingSearchResult result = searchServletMappings(mappings,
- // null, null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertTrue(result.getExtensionMapping().equals("*.faces"));
- // assertNull(result.getPrefixMapping());
- //
- // // selecting the first one as the preferred should yield the same result
- // result = searchServletMappings(mappings, "*.faces", null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getExtensionMapping(), "*.faces");
- // assertNull(result.getPrefixMapping());
- //
- // result = searchServletMappings(mappings, "*.html", null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getExtensionMapping(), "*.html");
- // assertNull(result.getPrefixMapping());
- //
- // result = searchServletMappings(mappings, "*.jsp", null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getExtensionMapping(), "*.jsp");
- // assertNull(result.getPrefixMapping());
- //
- // // an extension that doesn't exist
- // result = searchServletMappings(mappings, "*.xhtml", null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // // if preferred not present, then should be the first one
- // assertEquals(result.getExtensionMapping(), "*.faces");
- // assertNull(result.getPrefixMapping());
- // }
- //
- // public void testSearchServletMappings_NoExtensionMappings() {
- // final List<String> mappings = new ArrayList<String>();
- // // prefix mappings must end in "*"
- // mappings.add("/notaprefixMapping/");
- // mappings.add("/faces/*");
- // mappings.add("/foo/*");
- // mappings.add("/bar/*");
- //
- // // if no preference, then the first one should be found
- // MappingSearchResult result = searchServletMappings(mappings,
- // null, null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, null, "/faces/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, null, "/foo/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/foo/*");
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, null, "/bar/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/bar/*");
- // assertNull(result.getExtensionMapping());
- //
- // // if a preference is given that is not present, then first one
- // // one should be picked
- // result = searchServletMappings(mappings, null, "/notfound/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertNull(result.getExtensionMapping());
- // }
- //
- // public void testSearchServletMappings_BothKindsOfMappings() {
- // final List<String> mappings = new ArrayList<String>();
- // // prefix mappings must end in "*"
- // mappings.add("/notaprefixmapping/");
- // mappings.add("*.faces");
- // mappings.add("/faces/*");
- // mappings.add("*.html");
- // mappings.add("/foo/*");
- // mappings.add("*.jsp");
- // mappings.add("/bar/*");
- //
- // // if no preference, then the first one should be found
- // MappingSearchResult result = searchServletMappings(mappings,
- // null, null);
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertEquals(result.getExtensionMapping(), "*.faces");
- //
- // result = searchServletMappings(mappings, "*.faces", "/faces/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertEquals(result.getExtensionMapping(), "*.faces");
- //
- // result = searchServletMappings(mappings, "*.html", "/foo/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/foo/*");
- // assertEquals(result.getExtensionMapping(), "*.html");
- //
- // result = searchServletMappings(mappings, "*.jsp", "/bar/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/bar/*");
- // assertEquals(result.getExtensionMapping(), "*.jsp");
- //
- // // one pref found, the other not: the first in is picked
- // result = searchServletMappings(mappings, "*.jsp", "/bar2/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertEquals(result.getExtensionMapping(), "*.jsp");
- //
- // // one pref found, the other not: the first in is picked
- // result = searchServletMappings(mappings, "*.jspx", "/bar/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/bar/*");
- // assertEquals(result.getExtensionMapping(), "*.faces");
- //
- // // neither found, so first of each
- // result = searchServletMappings(mappings, "*.jspx", "/bar2/*");
- // assertNotNull(result);
- // assertTrue(result.isResult());
- // assertEquals(result.getPrefixMapping(), "/faces/*");
- // assertEquals(result.getExtensionMapping(), "*.faces");
- // }
- //
- // public void testSearchServletMappings_NoMatches() {
- // final List<String> mappings = new ArrayList<String>();
- // // none of these are either prefix or extension mappings
- // mappings.add("/notaprefixmapping/");
- // mappings.add("/alsoNotAMatch/");
- // mappings.add("/");
- // mappings.add("file.jsp");
- // mappings.add("test.html");
- // mappings.add("foo.jspx");
- //
- // // should not find any matches
- // MappingSearchResult result = searchServletMappings(mappings,
- // null, null);
- // assertNotNull(result);
- // assertFalse(result.isResult());
- // assertNull(result.getPrefixMapping());
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, "*.faces", null);
- // assertNotNull(result);
- // assertFalse(result.isResult());
- // assertNull(result.getPrefixMapping());
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, null, "/faces/*");
- // assertNotNull(result);
- // assertFalse(result.isResult());
- // assertNull(result.getPrefixMapping());
- // assertNull(result.getExtensionMapping());
- //
- // result = searchServletMappings(mappings, "*.faces", "/faces/*");
- // assertNotNull(result);
- // assertFalse(result.isResult());
- // assertNull(result.getPrefixMapping());
- // assertNull(result.getExtensionMapping());
- // }
- //
- // /**
- // * Search the list of servlet-mappings for the first extension and prefix
- // mappings. The contents
- // * of mappings is assumed to be all url-pattern's.
- // *
- // * If prefExtMapping is not null, it is an extension mapping and
- // * it is in mappings, then it is returned. Otherwise, the first extension
- // * mapping in mappings is returned. Returns null if mappings does not
- // * contain an extension mapping. The same algorithm holds for
- // prefPrefixMapping and
- // * corresponding prefix mapping.
- // *
- // * See isExtensionMapping and isPrefixMapping for more information on url
- // patterns.
- // *
- // * @param mappings
- // * @param prefExtMapping
- // * @param prefPrefixMapping
- // * @return the result
- // */
- // public final MappingSearchResult searchServletMappings(
- // final List<String> mappings, String prefExtMapping,
- // String prefPrefixMapping) {
- // String firstExtFound = null;
- // String firstPrefixFound = null;
- // boolean foundExtMapping = false;
- // boolean foundPrefixMapping = false;
- //
- // // if the caller has no preferredMapping, then
- // // set it to something guaranteed to be non-null
- // // and which is guaranteed not to match anything
- // // that pass isExtensionMapping
- // if (prefExtMapping == null) {
- // prefExtMapping = "NOTANEXTENSIONMAPPING"; //$NON-NLS-1$
- // }
- //
- // // similarly, guarantee that if the caller has no
- // // preferred prefix mapping, that we set a non-null
- // // comp mapping
- // if (prefPrefixMapping == null) {
- // prefPrefixMapping = "NOTAPREFIXMAPPING"; //$NON-NLS-1$
- // }
- //
- // SEARCH_LOOP: for (String mapping : mappings) {
- // if (isExtensionMapping(mapping)) {
- // // can assum that mapping is non-null since
- // // it is an ext mapping
- // if (prefExtMapping.equals(mapping.trim())) {
- // firstExtFound = prefExtMapping;
- // continue;
- // }
- //
- // if (firstExtFound == null) {
- // firstExtFound = mapping.trim();
- // }
- // } else if (isPrefixMapping(mapping)) {
- // if (prefPrefixMapping.equals(mapping.trim())) {
- // firstPrefixFound = prefPrefixMapping;
- // continue;
- // }
- //
- // if (firstPrefixFound == null) {
- // firstPrefixFound = mapping.trim();
- // }
- // }
- //
- // if (foundExtMapping && foundPrefixMapping) {
- // break SEARCH_LOOP;
- // }
- // }
- //
- // return new MappingSearchResult(firstExtFound, firstPrefixFound);
- // }
- //
- // /**
- // * Servlet 2.3_SRV.11.2: a string that begins with a "/" and ends
- // * with "/*" is a prefix mapping
- // *
- // * @param mapping
- // * @return true if the mapping string represents a prefix mapping
- // */
- // public final boolean isPrefixMapping(final String mapping)
- // {
- // if (mapping == null || mapping.length() < 4)
- // {
- // return false;
- // }
- //
- // return mapping.charAt(0) == '/' && mapping.endsWith("/*"); //$NON-NLS-1$
- // }
- //
- // /**
- // * Servlet 2.3_SRV.11.2: a string that begins with "*."
- // * is an extension mapping
- // *
- // * @param mapping
- // * @return true if mapping is an extension mapping
- // */
- // public final boolean isExtensionMapping(final String mapping)
- // {
- // if (mapping == null)
- // {
- // return false;
- // }
- //
- // return mapping.startsWith("*."); //$NON-NLS-1$
- // }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils11.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils11.java
deleted file mode 100644
index 35d2363..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils11.java
+++ /dev/null
@@ -1,315 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.j2ee.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.ParamValue;
-import org.eclipse.jst.j2ee.webapplication.ContextParam;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.ServletMapping;
-import org.eclipse.jst.j2ee.webapplication.ServletType;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.jsf.core.JSFVersion;
-
-//@Category(NoPluginEnvironment.class)
-public class TestJSFUtils11 extends TestJSFUtils
-{
- @Override
-// @Before
- public void setUp() throws Exception
- {
- super.setUp();
- }
-
- @Override
- protected WebAppAccessor createWebAccessor()
- {
- WebapplicationFactory factory = WebapplicationFactory.eINSTANCE;
- return new WebAppTestAccessor(factory);
- }
-
- //@Test
- public void testUpdateWebApp_ExistingServlet_2_3()
- {
- testUpdateWebApp_ExistingServlet("2.3");
- }
-
- //@Test
- public void testUpdateWebApp_ExistingServlet_2_4()
- {
- testUpdateWebApp_ExistingServlet("2.4");
- }
-
- //@Test
- public void testUpdateWebApp_NewServlet_2_3()
- {
- testUpdateWebApp_NewServlet("2.3");
- }
-
- //@Test
- public void testUpdateWebApp_NewServlet_2_4()
- {
- testUpdateWebApp_NewServlet("2.4");
- }
-
- //@Test
- public void testRollbackWebApp_2_3()
- {
- super.testRollbackWebApp("2.3");
- }
-
- //@Test
- public void testRollbackWebApp_2_4()
- {
- super.testRollbackWebApp("2.4");
- }
-
- //@Test
- public void testGetFileUrlPath_NonNullCases_2_3()
- {
- super.testGetFileUrlPath_NonNullCases("2.3");
- }
-
- //@Test
- public void testGetFileUrlPath_NonNullCases_2_4()
- {
- super.testGetFileUrlPath_NonNullCases("2.4");
- }
-
- //@Test
- public void testGetFileUrlPath_NullCases_2_3()
- {
- super.testGetFileUrlPath_NullCases("2.3");
- }
-
- //@Test
- public void testGetFileUrlPath_NullCases_2_4()
- {
- super.testGetFileUrlPath_NullCases("2.4");
- }
-
- @Override
- protected void doPre25SpecificOrNoop(Path existingURL, Object webApp,
- Object servlet)
- {
- WebapplicationFactory factory = WebapplicationFactory.eINSTANCE;
- // the servlet has a jsp type returns null
- ((Servlet) servlet).setWebType(factory.createJSPType());
- verifyNull(existingURL, webApp);
-
- // the servlet has a servlet type but null class returns null
- ((Servlet) servlet).setWebType(factory.createServletType());
- verifyNull(existingURL, webApp);
- }
-
- @Override
- protected JSFVersion getVersionToTestIn()
- {
- return JSFVersion.V1_1;
- }
-
- private static class WebAppTestAccessor extends WebAppAccessor
- {
- private WebapplicationFactory _factory;
-
- public WebAppTestAccessor(WebapplicationFactory factory)
- {
- _factory = factory;
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- protected List getServletMappings_Servlet(final Object webApp,
- Object servlet)
- {
- return ((Servlet) servlet).getMappings();
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- protected EList getServletMappings_WebApp(final Object webApp)
- {
- return ((WebApp) webApp).getServletMappings();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- protected void addMappingToWebApp(final Object webApp,
- final Object mapping)
- {
- getServletMappings_WebApp(webApp).add((ServletMapping) mapping);
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- protected EList getServlets(final Object webApp)
- {
- return ((WebApp) webApp).getServlets();
- }
-
- @Override
- protected void setServletClass(Object servlet, String name)
- {
- ((ServletType) ((Servlet) servlet).getWebType()).setClassName(name);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- protected void setContextParam(final Object webApp, final Object param, final String version)
- {
- if ("2.3".equals(version))
- {
- ((WebApp) webApp).getContexts().add(param);
- }
- else
- {
- ((WebApp) webApp).getContextParams().add(param);
- }
- }
-
- @Override
- protected Object createContextParam(final String name,
- final String value, final String version)
- {
- if ("2.3".equals(version))
- {
- final ContextParam param = _factory.createContextParam();
- param.setParamName(name);
- param.setParamValue(value);
- return param;
- }
- final ParamValue param = CommonFactory.eINSTANCE.createParamValue();
- param.setName(name);
- param.setValue(value);
- return param;
- }
-
- @Override
- protected void setUrlPattern(final Object mapping,
- final List<String> patterns)
- {
- assertEquals(
- "Webapp 2.4 and before support only one pattern per mapping",
- 1, patterns.size());
- ((ServletMapping) mapping).setUrlPattern(patterns.get(0));
- }
-
- @Override
- protected void setMappingData(final Object webApp,
- final List<String> urlPatterns, final Object servlet,
- final Object mapping)
- {
- ((ServletMapping) mapping).setServlet((Servlet) servlet);
- for (final String pattern : urlPatterns)
- {
- ((ServletMapping) mapping).setUrlPattern(pattern);
- }
- ((ServletMapping) mapping).setWebApp((WebApp) webApp);
- }
-
- @Override
- protected ServletMapping createServletMapping()
- {
- return _factory.createServletMapping();
- }
-
- @Override
- protected void verifyLoadOnStartup(final Object defaultServlet,
- final Integer expectedValue)
- {
- assertEquals(expectedValue, ((Servlet) defaultServlet)
- .getLoadOnStartup());
- }
-
- @Override
- protected void verifyServlet(final Object defaultServlet,
- final String className)
- {
- final WebType webType = ((Servlet) defaultServlet).getWebType();
- assertTrue(webType.isServletType());
- final ServletType servletType = (ServletType) ((Servlet) defaultServlet)
- .getWebType();
- assertEquals(className, servletType.getClassName());
- }
-
- @Override
- protected WebApp createWebApp(final String version)
- {
- final WebApp webApp = _factory.createWebApp();
- webApp.setVersion(version);
- return webApp;
- }
-
- @Override
- protected Servlet getServlet(final Object webApp,
- final String servletName)
- {
- final Servlet defaultServlet = ((WebApp) webApp)
- .getServletNamed(servletName);
- if (defaultServlet != null)
- {
- assertEquals(servletName, defaultServlet.getServletName());
- }
- return defaultServlet;
- }
-
- @Override
- protected Servlet createServlet(final String servletName,
- final String servletClass)
- {
- final Servlet servlet = _factory.createServlet();
- servlet.setServletName(servletName);
- servlet.setWebType(_factory.createServletType());
- ((ServletType) servlet.getWebType()).setClassName(servletClass);
- return servlet;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void addServletToWebApp(Object webApp, Object servlet)
- {
- getServlets(webApp).add(servlet);
- }
-
- @Override
- protected void setServletOnMapping(Object mapping, Object servlet)
- {
- ((ServletMapping) mapping).setServlet((Servlet) servlet);
- }
-
- @Override
- protected void verifyMapping(Object mapping,
- String jsfDefaultServletName, String pattern)
- {
- assertEquals(jsfDefaultServletName, ((ServletMapping) mapping)
- .getServlet().getServletName());
- assertEquals(pattern, ((ServletMapping) mapping).getUrlPattern());
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- protected List getContextParams(Object webApp, String version)
- {
- if ("2.3".equals(version))
- {
- return ((WebApp)webApp).getContexts();
- }
- return ((WebApp)webApp).getContextParams();
- }
-
- @Override
- protected String getContextParamValue(Object param, String version)
- {
- if ("2.3".equals(version))
- {
- return ((ContextParam)param).getParamValue();
- }
- return ((ParamValue)param).getValue();
- }
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils12.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils12.java
deleted file mode 100644
index 4c55f7b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils12.java
+++ /dev/null
@@ -1,435 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.jst.javaee.core.ParamValue;
-import org.eclipse.jst.javaee.core.UrlPatternType;
-import org.eclipse.jst.javaee.web.Servlet;
-import org.eclipse.jst.javaee.web.ServletMapping;
-import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.jst.javaee.web.WebAppVersionType;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.jst.jsf.core.JSFVersion;
-
-//@Category(NoPluginEnvironment.class)
-public class TestJSFUtils12 extends TestJSFUtils
-{
-// @Before
- public void setUp() throws Exception
- {
- super.setUp();
- // _factory = WebFactory.eINSTANCE;
- }
-
- @Override
- protected JSFVersion getVersionToTestIn()
- {
- return JSFVersion.V1_2;
- }
-
- @Override
- protected WebAppAccessor createWebAccessor()
- {
- return new WebAppTestAccessor();
- }
-
- //@Test
- public void testUpdateWebApp_ExistingServlet_2_5()
- {
- testUpdateWebApp_ExistingServlet("2.5");
- }
-
- //@Test
- public void testUpdateWebApp_NewServlet_2_5()
- {
- testUpdateWebApp_NewServlet("2.5");
- }
-
- //@Test
- public void testRollbackWebApp_2_5()
- {
- super.testRollbackWebApp("2.5");
- }
-
- //@Test
- public void testGetFileUrlPath_NonNullCases_2_5()
- {
- super.testGetFileUrlPath_NonNullCases("2.5");
- }
-
- //@Test
- public void testGetFileUrlPath_NullCases_2_5()
- {
- super.testGetFileUrlPath_NullCases("2.5");
- }
-
- protected static class WebAppTestAccessor extends WebAppAccessor
- {
- private WebFactory _factory;
-
- public WebAppTestAccessor()
- {
- _factory = WebFactory.eINSTANCE;
- }
- @Override
- protected WebApp createWebApp(String version)
- {
- WebApp webApp = _factory.createWebApp();
- webApp.setVersion(WebAppVersionType.get(version));
- return webApp;
- }
-
- @Override
- protected Servlet createServlet(String servletName, String servletClass)
- {
- final Servlet servlet = _factory.createServlet();
- servlet.setServletName(servletName);
- servlet.setServletClass(servletClass);
- return servlet;
- }
-
- @Override
- protected Object createServletMapping()
- {
- return _factory.createServletMapping();
- }
-
- @Override
- protected void setServletClass(Object servlet, String name)
- {
- ((Servlet) servlet).setServletClass(name);
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- protected List getServlets(Object webApp)
- {
- return ((WebApp) webApp).getServlets();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void addMappingToWebApp(Object webApp, Object mapping)
- {
- getServletMappings_WebApp(webApp).add((ServletMapping) mapping);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void addServletToWebApp(Object webApp, Object servlet)
- {
- getServlets(webApp).add(servlet);
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- protected List getServletMappings_WebApp(Object webApp)
- {
- return ((WebApp) webApp).getServletMappings();
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- protected List getServletMappings_Servlet(final Object webApp,Object servlet)
- {
- List<ServletMapping> mappings = new ArrayList<ServletMapping>();
- for (final ServletMapping mapping : ((WebApp)webApp).getServletMappings())
- {
- if (mapping.getServletName() != null &&
- mapping.getServletName().equals(((Servlet)servlet).getServletName()))
- {
- mappings.add(mapping);
- }
- }
- return mappings;
- }
-
- @Override
- protected void setMappingData(Object webApp, List<String> urlPatterns,
- Object servlet, Object mapping)
- {
- ((ServletMapping) mapping).setServletName(((Servlet) servlet).getServletName());
- setUrlPattern(mapping, urlPatterns);
-// ((ServletMapping) mapping).setWebApp((WebApp) webApp);
- }
-
- @Override
- protected void setUrlPattern(Object mapping, List<String> patterns)
- {
- ((ServletMapping) mapping).getUrlPatterns().clear();
- for (final String pattern : patterns)
- {
- UrlPatternType newPattern = JavaeeFactory.eINSTANCE.createUrlPatternType();
- newPattern.setValue(pattern);
- ((ServletMapping) mapping).getUrlPatterns().add(newPattern);
- }
- }
-
- @Override
- protected Object createContextParam(String name, String value, final String version)
- {
- ParamValue paramValue =
- JavaeeFactory.eINSTANCE.createParamValue();
- paramValue.setParamName(name);
- paramValue.setParamValue(value);
- return paramValue;
- }
-
- @Override
- protected void setContextParam(Object webApp, Object param, final String version)
- {
- ((WebApp)webApp).getContextParams().add((ParamValue) param);
- }
-
- @Override
- protected Servlet getServlet(Object webApp, String servletName)
- {
- List<Servlet> servlets = ((WebApp)webApp).getServlets();
- for (final Servlet servlet : servlets)
- {
- if (servlet.getServletName().equals(servletName))
- {
- return servlet;
- }
- }
- return null;
- }
-
- @Override
- protected void verifyServlet(Object defaultServlet, String className)
- {
- assertEquals(className, ((Servlet) defaultServlet).getServletClass());
- }
-
- @Override
- protected void verifyLoadOnStartup(Object defaultServlet,
- Integer expectedValue)
- {
- assertEquals(expectedValue, ((Servlet)defaultServlet).getLoadOnStartup());
- }
-
- @Override
- protected void setServletOnMapping(Object mapping, Object servlet)
- {
- ((ServletMapping)mapping).setServletName(((Servlet)servlet).getServletName());
- }
- @Override
- protected void verifyMapping(Object mapping,
- String jsfDefaultServletName, String pattern)
- {
- assertEquals(jsfDefaultServletName, ((ServletMapping)mapping).getServletName());
- boolean foundPattern = false;
- for (final UrlPatternType urlPattern : ((ServletMapping)mapping).getUrlPatterns())
- {
- if (pattern.equals(urlPattern.getValue()))
- {
- foundPattern = true;
- break;
- }
- }
- assertTrue(foundPattern);
- }
- @SuppressWarnings("rawtypes")
- @Override
- protected List getContextParams(Object webApp, String version)
- {
- return ((WebApp)webApp).getContextParams();
- }
- @Override
- protected String getContextParamValue(Object param, String version)
- {
- return ((ParamValue)param).getParamValue();
- }
-
- }
- //
- // //@Test
- // public void testGetFileUrlPath_NonNullCases()
- // {
- // // a web app with valid servlet and extension mapping
- // WebApp webApp = _factory.createWebApp();
- // Servlet servlet = _factory.createServlet();
- // servlet.setServletClass(JSFUtils.JSF_SERVLET_CLASS);
- // servlet.setServletName("JSF Servlet");
- // webApp.getServlets().add(servlet);
- // ServletMapping mapping = _factory.createServletMapping();
- // mapping.setServletName("JSF Servlet");
- // UrlPatternType pattern = JavaeeFactory.eINSTANCE.createUrlPatternType();
- // pattern.setValue(".faces");
- // mapping.getUrlPatterns().add(pattern);
- // webApp.getServletMappings().add(mapping);
- // IPath fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- // IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- // "/test.jsp"));
- // assertEquals("/test.faces", fileUrlPath.toString());
- //
- // // web app with valid servlet and non-default extension mapping
- // fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- // IResource.FILE, new Path("/WebContent/test.xhtml")), new Path(
- // "/test.xhtml"));
- // assertEquals("/test.faces", fileUrlPath.toString());
- //
- // // web app with valid servlet and path-based mapping
- // pattern.setValue("/faces");
- // fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- // IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- // "/test.jsp"));
- // assertEquals("/faces/test.jsp", fileUrlPath.toString());
- //
- // // web app with valid servlet and path-based mapping match *
- // pattern.setValue("/faces/*");
- // fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- // IResource.FILE, new Path("/WebContent/test.jsp")), new Path(
- // "/test.jsp"));
- // assertEquals("/faces/test.jsp", fileUrlPath.toString());
- //
- // // web app with valid servlet and extension mapping based on a
- // // non-default, default extension
- // pattern.setValue(".jspx");
- // ParamValue param = JavaeeFactory.eINSTANCE.createParamValue();
- // param.setParamName(JSFUtils.JSF_DEFAULT_SUFFIX_CONTEXT_PARAM);
- // param.setParamValue(".xhtml");
- // webApp.getContextParams().add(param);
- // fileUrlPath = _jsfUtils.getFileUrlPath(webApp, new MockResource(
- // IResource.FILE, new Path("/WebContent/test.xhtml")), new Path(
- // "/test.xhtml"));
- // assertEquals("/test.jspx", fileUrlPath.toString());
- // }
- //
- // //@Test
- // public void testGetFileUrlPath_NullCases()
- // {
- // // a null webApp object produces a null path
- // Path existingURL = new Path("foobar");
- // verifyNull(existingURL, null);
- //
- // // a non-null value that is not instanceof WebApp returns a null path
- // verifyNull(existingURL, new Object());
- // // a web app with no servlet produces a null path
- //
- // WebApp webApp = _factory.createWebApp();
- // verifyNull(existingURL, webApp);
- //
- // // a web app with no meaningful servlet returns null
- // Servlet servlet = _factory.createServlet();
- // webApp.getServlets().add(servlet);
- // verifyNull(existingURL, webApp);
- //
- // // wrong servlet class name
- // servlet.setServletClass("com.wrong.Servlet");
- // verifyNull(existingURL, webApp);
- //
- // // multiple wrong class names
- // servlet = _factory.createServlet();
- // servlet.setServletClass("com.AnotherWrong.Servlet");
- // webApp.getServlets().add(servlet);
- //
- // assertEquals(2, webApp.getServlets().size());
- // verifyNull(existingURL, webApp);
- //
- // // valid servlet class, but no mappings
- // servlet.setServletClass(JSFUtils.JSF_SERVLET_CLASS);
- // verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- // new Path("/somepath")));
- // verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- // new Path("/somepath.xhtml")));
- //
- // // has mapping but it's empty
- // ServletMapping mapping = _factory.createServletMapping();
- // webApp.getServletMappings().add(mapping);
- // assertEquals(1, webApp.getServletMappings().size());
- // verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- // new Path("/somepath.xhtml")));
- //
- // // empty mapping that matches to servlet
- // mapping.setServletName(servlet.getServletName());
- // assertEquals(1, webApp.getServletMappings().size());
- // // assertTrue(servlet.getMappings().contains(mapping));
- // verifyNull(existingURL, webApp, new MockResource(IResource.FILE,
- // new Path("/somepath.xhtml")));
- // }
- //
- // private void verifyNull(Path existingURL, Object webApp, IResource res)
- // {
- // assertNull(_jsfUtils.getFileUrlPath(webApp, res, null));
- // assertNull(_jsfUtils.getFileUrlPath(webApp, res, existingURL));
- // }
- //
- // private void verifyNull(Path existingURL, Object webApp)
- // {
- // verifyNull(existingURL, webApp, null);
- // }
- //
- // protected ServletMapping createServletMapping()
- // {
- // return null;
- // }
- //
- // protected void setServletClass(Servlet servlet, String name)
- // {
- // }
- //
- // protected EList getServlets(final WebApp webApp)
- // {
- // return null;
- // }
- //
- // protected void addToWebApp(final WebApp webApp, final ServletMapping
- // mapping)
- // {
- // }
- //
- // protected EList getServletMappings(final WebApp webApp)
- // {
- // return null;
- // }
- //
- // protected List getServletMappings(Servlet servlet)
- // {
- // return null;
- // }
- //
- // protected void setMappingData(final WebApp webApp, final List<String>
- // urlPatterns, final Servlet servlet,
- // final ServletMapping mapping)
- // {
- // }
- //
- // protected void setUrlPattern(final ServletMapping mapping, final
- // List<String> patterns)
- // {
- // }
- //
- // protected ContextParam createContextParam(final String name, final String
- // value)
- // {
- // return null;
- // }
- //
- // protected void setContextParam(final WebApp webApp, final ContextParam
- // param)
- // {
- // }
- //
- // protected void addToWebApp(final WebApp webApp, final Servlet servlet)
- // {
- // }
- //
- // protected Servlet getServlet(final WebApp webApp, final String
- // servletName)
- // {
- // return null;
- // }
- //
- // protected void verifyServlet(final Servlet defaultServlet, final String
- // className)
- // {
- // }
- //
- // protected void verifyLoadOnStartup(final Servlet defaultServlet, final
- // Integer expectedValue)
- // {
- // }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils20.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils20.java
deleted file mode 100644
index 7826aa5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils20.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import org.eclipse.jst.jsf.core.JSFVersion;
-
-
-public class TestJSFUtils20 extends TestJSFUtils12
-{
-
- @Override
- public void setUp() throws Exception
- {
- super.setUp();
- assertEquals(JSFVersion.V2_0, _jsfUtils.getVersion());
- }
-
- @Override
- protected JSFVersion getVersionToTestIn()
- {
- return JSFVersion.V2_0;
- }
-
- //@Test
- public void testUpdateWebApp_ExistingServlet_3_0()
- {
- super.testUpdateWebApp_ExistingServlet("3.0");
- }
-
- //@Test
- public void testUpdateWebApp_NewServlet_3_0()
- {
- super.testUpdateWebApp_NewServlet("3.0");
- }
-
- //@Test
- public void testRollbackWebApp_3_0()
- {
- super.testRollbackWebApp("3.0");
- }
-
- //@Test
- public void testGetFileUrlPath_NonNullCases_3_0()
- {
- super.testGetFileUrlPath_NonNullCases("3.0");
- }
-
- //@Test
- public void testGetFileUrlPath_NullCases_3_0()
- {
- super.testGetFileUrlPath_NullCases("3.0");
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestUtilSuite.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestUtilSuite.java
deleted file mode 100644
index 8474f9f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestUtilSuite.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-
-/**
- * @author cbateman
- *
- */
-//@RunWith(Suite.class)
-//@Suite.SuiteClasses({
-// TestJSFUtils11.class,
-// TestJSFUtils12.class,
-// TestJSFUtils20.class
-//})
-public class TestUtilSuite
-{
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestableJSFUtils.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestableJSFUtils.java
deleted file mode 100644
index 71e2ca8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestableJSFUtils.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.project.facet;
-
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFUtils;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class TestableJSFUtils extends JSFUtils
-{
- private final JSFUtils _delegate;
-
- public TestableJSFUtils(final JSFUtils jsfUtils,
- final IModelProvider modelProvider)
- {
- super(jsfUtils.getVersion(), modelProvider);
- Assert.assertNotNull(jsfUtils);
- Assert.assertNotNull(modelProvider);
- _delegate = jsfUtils;
- }
-
- public String getDisplayName_testable(final IDataModel config)
- {
- return super.getDisplayName(config);
- }
-
- public String getServletClassname_testable(final IDataModel config)
- {
- return super.getServletClassname(config);
- }
-
- public List<String> getServletMappings_testable(IDataModel config)
- {
- return super.getServletMappings(config);
- }
-
- public boolean isJSFPage_testable(final IResource resource)
- {
- return super.isJSFPage(resource);
- }
-
- public boolean isValidKnownExtension_testable(String fileExtension)
- {
- return super.isValidKnownExtension(fileExtension);
- }
-
- public void printConfigFile_testable(final OutputStream os)
- {
- super.printConfigFile(os);
- }
-
- @Override
- public void doVersionSpecificConfigFile(PrintWriter pw)
- {
- _delegate.doVersionSpecificConfigFile(pw);
- }
-
- @Override
- public void updateWebApp(Object webApp, IDataModel config)
- {
- _delegate.updateWebApp(webApp, config);
- }
-
- @Override
- public void rollbackWebApp(Object webApp)
- {
- _delegate.rollbackWebApp(webApp);
- }
-
- @Override
- public IPath getFileUrlPath(Object webAppObj, IResource resource,
- IPath existingURL)
- {
- return _delegate.getFileUrlPath(webAppObj, resource, existingURL);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/region/TestRegion2ElementAdapter.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/region/TestRegion2ElementAdapter.java
deleted file mode 100644
index 9f869c7..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/region/TestRegion2ElementAdapter.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.region;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jst.jsf.common.dom.AttrDOMAdapter;
-import org.eclipse.jst.jsf.common.dom.AttributeIdentifier;
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.core.internal.region.Region2AttrAdapter;
-import org.eclipse.jst.jsf.core.internal.region.Region2ElementAdapter;
-import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
-import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-public class TestRegion2ElementAdapter extends TestCase
-{
-
- private final static int OFFSET_OUTPUT_TEXT_WITH_EL =
- 883;
- private final static int OFFSET_PANELGRID_WITH_NO_EL =
- 958;
- private final static int OFFSET_OUTPUTLABEL_WITH_NO_EL =
- 990;
- private final static int OFFSET_INPUTTEXT_WITH_BOTH =
- 1044;
- private final static int OFFSET_COMMANDBUTTON_WITH_TWO_EL =
- 1255;
-
- private final static Map<String, String> OUTPUTLABEL_ATTRIBUTES;
- private final static Map<String, String> INPUTTEXT_ATTRIBUTES;
- private final static Map<String, String> COMMANDBUTTON_ATTRIBUTES;
-
- private WebProjectTestEnvironment _webProjectTestEnv;
- private IResource _res1;
- private IStructuredModel _model;
- private IStructuredDocument _sdoc;
-
- static
- {
- Map<String, String> map = new HashMap<String, String>();
- map.put("for", "userId");
- map.put("value", "Username:");
- OUTPUTLABEL_ATTRIBUTES = Collections.unmodifiableMap(map);
-
- map = new HashMap<String, String>();
- map.put("id", "userId");
- map.put("value", "#{loginRequest.id}");
- INPUTTEXT_ATTRIBUTES = Collections.unmodifiableMap(map);
-
- map = new HashMap<String, String>();
- map.put("action", "#{appController.loginActions}");
- map.put("value", "#{bundle['login.button.value']}");
- COMMANDBUTTON_ATTRIBUTES = Collections.unmodifiableMap(map);
-
- }
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _webProjectTestEnv =
- new WebProjectTestEnvironment(getClass().getName()
- + "_" + getName());
- _webProjectTestEnv.createProject(false);
- assertNotNull(_webProjectTestEnv);
- assertNotNull(_webProjectTestEnv.getTestProject());
- assertTrue(_webProjectTestEnv.getTestProject().isAccessible());
-
- _res1 =
- _webProjectTestEnv.loadResourceInWebRoot(TestsPlugin
- .getDefault().getBundle(),
- "/testfiles/jsps/testdata1.jsp.data", "/testdata1.jsp");
- _model =
- StructuredModelManager.getModelManager().getModelForRead(
- (IFile) _res1);
- assert (_model instanceof DOMModelForJSP);
- _sdoc = _model.getStructuredDocument();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- try
- {
- super.tearDown();
- }
- finally
- {
- _model.releaseFromRead();
- }
-
- }
-
- public void testSanity()
- {
- assertExpectedTag(OFFSET_OUTPUT_TEXT_WITH_EL, "h", "outputText",
- ITLDConstants.URI_JSF_HTML);
- final Map<String, String> expectedMap = new HashMap<String, String>();
- expectedMap.put("value", "#{bundle['page.header']}");
- assertExpectedAttributes(OFFSET_OUTPUT_TEXT_WITH_EL, expectedMap);
-
- assertExpectedTag(OFFSET_PANELGRID_WITH_NO_EL, "h", "panelGrid",
- ITLDConstants.URI_JSF_HTML);
- expectedMap.clear();
- expectedMap.put("columns", "2");
- assertExpectedAttributes(OFFSET_PANELGRID_WITH_NO_EL, expectedMap);
-
- assertExpectedTag(OFFSET_OUTPUTLABEL_WITH_NO_EL, "h", "outputLabel",
- ITLDConstants.URI_JSF_HTML);
- assertExpectedAttributes(OFFSET_OUTPUTLABEL_WITH_NO_EL,
- OUTPUTLABEL_ATTRIBUTES);
-
- assertExpectedTag(OFFSET_INPUTTEXT_WITH_BOTH, "h", "inputText",
- ITLDConstants.URI_JSF_HTML);
- assertExpectedAttributes(OFFSET_INPUTTEXT_WITH_BOTH,
- INPUTTEXT_ATTRIBUTES);
-
- assertExpectedTag(OFFSET_COMMANDBUTTON_WITH_TWO_EL, "h",
- "commandButton", ITLDConstants.URI_JSF_HTML);
- assertExpectedAttributes(OFFSET_COMMANDBUTTON_WITH_TWO_EL,
- COMMANDBUTTON_ATTRIBUTES);
-
- }
-
- /**
- * Single attribute, EL only
- *
- * @throws Exception
- */
- public void testOutputTextWithEL() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_OUTPUT_TEXT_WITH_EL);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- // verify element
- assertEquals("h:outputText", adapter.getNodeName());
- assertEquals("outputText", adapter.getLocalName());
- assertEquals("h", adapter.getPrefix());
- assertEquals(ITLDConstants.URI_JSF_HTML, adapter.getNamespace());
- assertEquals(1, adapter.getAttributes().size());
-
- // verify the TagIdentifier
- final TagIdentifier tagId = adapter.getTagId();
- assertNotNull(tagId);
- assertEquals(ITLDConstants.URI_JSF_HTML, tagId.getUri());
- assertEquals(IJSFConstants.TAG_OUTPUTTEXT, tagId.getTagName());
- assertEquals(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, tagId);
-
- // verify only attribute
- assertTrue(adapter.getAttributes().containsKey("value"));
- final AttrDOMAdapter attr = adapter.getAttributes().get("value");
- assertEquals("value", attr.getLocalName());
- assertEquals("value", attr.getNodeName());
- assertEquals("#{bundle['page.header']}", attr.getValue());
-
- // verify the AttributeIdentifier
- final AttributeIdentifier attrId = attr.getAttributeIdentifier();
- assertNotNull(attrId);
- assertEquals(tagId, attrId.getTagIdentifier());
- assertEquals(attr.getNodeName(), attrId.getName());
- }
-
- /**
- * Single attribute No EL
- *
- * @throws Exception
- */
- public void testPanelGridWithNoEL() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_PANELGRID_WITH_NO_EL);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- // verify element
- assertEquals("h:panelGrid", adapter.getNodeName());
- assertEquals("panelGrid", adapter.getLocalName());
- assertEquals("h", adapter.getPrefix());
- assertEquals(ITLDConstants.URI_JSF_HTML, adapter.getNamespace());
- assertEquals(1, adapter.getAttributes().size());
-
- // verify the TagIdentifier
- final TagIdentifier tagId = adapter.getTagId();
- assertNotNull(tagId);
- assertEquals(ITLDConstants.URI_JSF_HTML, tagId.getUri());
- assertEquals(IJSFConstants.TAG_PANELGRID, tagId.getTagName());
- assertEquals(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, tagId);
-
- // verify only attribute
- assertTrue(adapter.getAttributes().containsKey("columns"));
- final AttrDOMAdapter attr = adapter.getAttributes().get("columns");
- assertEquals("columns", attr.getLocalName());
- assertEquals("columns", attr.getNodeName());
- assertEquals("2", attr.getValue());
-
- // verify the AttributeIdentifier
- final AttributeIdentifier attrId = attr.getAttributeIdentifier();
- assertNotNull(attrId);
- assertEquals(tagId, attrId.getTagIdentifier());
- assertEquals(attr.getNodeName(), attrId.getName());
- }
-
- /**
- * Two non-EL attributes
- *
- * @throws Exception
- */
- public void testOutputLabelWithNoEL() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_OUTPUTLABEL_WITH_NO_EL);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- // verify element
- assertEquals("h:outputLabel", adapter.getNodeName());
- assertEquals("outputLabel", adapter.getLocalName());
- assertEquals("h", adapter.getPrefix());
- assertEquals(ITLDConstants.URI_JSF_HTML, adapter.getNamespace());
-
- // verify the TagIdentifier
- final TagIdentifier tagId = adapter.getTagId();
- assertNotNull(tagId);
- assertEquals(ITLDConstants.URI_JSF_HTML, tagId.getUri());
- assertEquals(IJSFConstants.TAG_OUTPUTLABEL, tagId.getTagName());
- assertEquals(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, tagId);
-
- assertEquals(OUTPUTLABEL_ATTRIBUTES.size(), adapter.getAttributes()
- .size());
- for (final Map.Entry<String, String> entry : OUTPUTLABEL_ATTRIBUTES
- .entrySet())
- {
- AttrDOMAdapter attrAdapter =
- adapter.getAttributes().get(
- entry.getKey());
- assertNotNull(attrAdapter);
- assertEquals(entry.getKey(), attrAdapter.getNodeName());
- assertEquals(entry.getValue(), attrAdapter.getValue());
- // verify the AttributeIdentifier
- final AttributeIdentifier attrId =
- attrAdapter
- .getAttributeIdentifier();
- assertNotNull(attrId);
- assertEquals(tagId, attrId.getTagIdentifier());
- assertEquals(attrAdapter.getNodeName(), attrId.getName());
- }
-
- }
-
- /**
- * One non-EL attribute, One EL attribute
- *
- * @throws Exception
- */
- public void testInputTextWithBoth() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_INPUTTEXT_WITH_BOTH);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- // verify element
- assertEquals("h:inputText", adapter.getNodeName());
- assertEquals("inputText", adapter.getLocalName());
- assertEquals("h", adapter.getPrefix());
- assertEquals(ITLDConstants.URI_JSF_HTML, adapter.getNamespace());
-
- // verify the TagIdentifier
- final TagIdentifier tagId = adapter.getTagId();
- assertNotNull(tagId);
- assertEquals(ITLDConstants.URI_JSF_HTML, tagId.getUri());
- assertEquals(IJSFConstants.TAG_INPUTTEXT, tagId.getTagName());
- assertEquals(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, tagId);
-
- assertEquals(INPUTTEXT_ATTRIBUTES.size(), adapter.getAttributes()
- .size());
- for (final Map.Entry<String, String> entry : INPUTTEXT_ATTRIBUTES
- .entrySet())
- {
- AttrDOMAdapter attrAdapter =
- adapter.getAttributes().get(
- entry.getKey());
- assertNotNull(attrAdapter);
- assertEquals(entry.getKey(), attrAdapter.getNodeName());
- assertEquals(entry.getValue(), attrAdapter.getValue());
- // verify the AttributeIdentifier
- final AttributeIdentifier attrId =
- attrAdapter
- .getAttributeIdentifier();
- assertNotNull(attrId);
- assertEquals(tagId, attrId.getTagIdentifier());
- assertEquals(attrAdapter.getNodeName(), attrId.getName());
- }
-
- }
-
- /**
- * Two EL, no non-EL
- *
- * @throws Exception
- */
- public void testCommandButtonWithTwoEL() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_COMMANDBUTTON_WITH_TWO_EL);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- // verify element
- assertEquals("h:commandButton", adapter.getNodeName());
- assertEquals("commandButton", adapter.getLocalName());
- assertEquals("h", adapter.getPrefix());
- assertEquals(ITLDConstants.URI_JSF_HTML, adapter.getNamespace());
-
- // verify the TagIdentifier
- final TagIdentifier tagId = adapter.getTagId();
- assertNotNull(tagId);
- assertEquals(ITLDConstants.URI_JSF_HTML, tagId.getUri());
- assertEquals(IJSFConstants.TAG_COMMANDBUTTON, tagId.getTagName());
- assertEquals(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, tagId);
-
- assertEquals(COMMANDBUTTON_ATTRIBUTES.size(), adapter.getAttributes()
- .size());
- for (final Map.Entry<String, String> entry : COMMANDBUTTON_ATTRIBUTES
- .entrySet())
- {
- AttrDOMAdapter attrAdapter =
- adapter.getAttributes().get(
- entry.getKey());
- assertNotNull(attrAdapter);
- assertEquals(entry.getKey(), attrAdapter.getNodeName());
- assertEquals(entry.getValue(), attrAdapter.getValue());
- // verify the AttributeIdentifier
- final AttributeIdentifier attrId =
- attrAdapter
- .getAttributeIdentifier();
- assertNotNull(attrId);
- assertEquals(tagId, attrId.getTagIdentifier());
- assertEquals(attrAdapter.getNodeName(), attrId.getName());
- }
- }
-
- /**
- * Ensure that we can pass the element or attribute adapter back and get the
- * corresponding region
- */
- public void testAdapterToRegionMappings() throws Exception
- {
- final IndexedRegion region =
- JSFTestUtil.getIndexedRegion(_sdoc,
- OFFSET_INPUTTEXT_WITH_BOTH);
- final IDOMNode domNode = (IDOMNode) region;
-
- final ITextRegion textRegion =
- domNode
- .getFirstStructuredDocumentRegion();
- final Region2ElementAdapter adapter =
- new Region2ElementAdapter(
- textRegion);
-
- assertEquals(OFFSET_INPUTTEXT_WITH_BOTH, adapter.getTextRegion()
- .getStart());
-
- assertEquals(textRegion, adapter.getTextRegion());
-
- Region2AttrAdapter attrAdapter = adapter.getAttributes().get("id");
- assertEquals(OFFSET_INPUTTEXT_WITH_BOTH+13, attrAdapter.getStartOffset());
- assertExpectedAttributeName(attrAdapter, 13, 2);
- // length is 9 instead of 8 because of trailing whitespace
- assertExpectedAttributeValue(attrAdapter, 16, 9);
-
- attrAdapter = adapter.getAttributes().get("value");
- assertEquals(OFFSET_INPUTTEXT_WITH_BOTH+25, attrAdapter.getStartOffset());
- assertExpectedAttributeName(attrAdapter, 25, 5);
- // length is 9 instead of 8 because of trailing whitespace
- assertExpectedAttributeValue(attrAdapter, 31, 20);
- }
-
- private void assertExpectedAttributeName(
- final Region2AttrAdapter attrAdapter, final int expectedStart,
- final int expectedLength)
- {
- final ITextRegion nameRegion = attrAdapter.getAttributeNameRegion();
- assertEquals(expectedStart, nameRegion.getStart());
- assertEquals(expectedLength, nameRegion.getLength());
- }
-
- private void assertExpectedAttributeValue(
- final Region2AttrAdapter attrAdapter, final int expectedStart,
- final int expectedLength)
- {
- final ITextRegion valueRegion = attrAdapter.getAttributeValueRegion();
- assertEquals(expectedStart, valueRegion.getStart());
- assertEquals(expectedLength, valueRegion.getLength());
-
- }
-
- private void assertExpectedTag(final int offset, final String prefix,
- final String tagName, final String uri)
- {
- final IndexedRegion region =
- JSFTestUtil
- .getIndexedRegion(_sdoc, offset);
- assertTrue(region instanceof IDOMElement);
-
- assertEquals(prefix + ":" + tagName, ((IDOMElement) region)
- .getNodeName());
- assertEquals(tagName, ((IDOMElement) region).getLocalName());
- assertEquals(prefix, ((IDOMElement) region).getPrefix());
- }
-
- private void assertExpectedAttributes(final int offset,
- final Map<String, String> attributes)
- {
- final IndexedRegion region =
- JSFTestUtil
- .getIndexedRegion(_sdoc, offset);
- assertTrue(region instanceof IDOMElement);
-
- final IDOMElement domElement = (IDOMElement) region;
-
- assertExpectedAttributes(new Iterator<Node>()
- {
- int curElement = 0;
-
- public boolean hasNext()
- {
- return (curElement < domElement.getAttributes().getLength());
- }
-
- public Node next()
- {
- return domElement.getAttributes().item(curElement++);
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException("");
-
- }
-
- }, attributes);
- }
-
- private void assertExpectedAttributes(final Iterator<Node> check,
- final Map<String, String> expectedAttributes)
- {
- int count = 0;
- for (; check.hasNext();)
- {
- Node node = check.next();
- assertTrue(expectedAttributes.containsKey(node.getNodeName()));
- assertEquals(expectedAttributes.get(node.getNodeName()), node
- .getNodeValue());
- count++;
- }
- assertEquals(expectedAttributes.size(), count);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AbstractTestListener.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AbstractTestListener.java
deleted file mode 100644
index 7b808b8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AbstractTestListener.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import java.util.EventObject;
-
-import org.eclipse.jst.jsf.common.internal.resource.EventResult;
-import org.eclipse.jst.jsf.common.internal.resource.ILifecycleListener;
-
-abstract class AbstractTestListener<EVENTTYPE extends EventObject> implements ILifecycleListener<EVENTTYPE>
-{
-
- public abstract EventResult acceptEvent(final EVENTTYPE event);
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AllLifecycleListenerTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AllLifecycleListenerTests.java
deleted file mode 100644
index 0eded2f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AllLifecycleListenerTests.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import org.eclipse.jst.jsf.test.util.junit4.DualModeEnvironment;
-import org.junit.experimental.categories.Categories.IncludeCategory;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Suite.class)
-@IncludeCategory(DualModeEnvironment.class)
-@SuiteClasses(
-{ FastLifecycleListenerTests.class, FastLifecycleListenerTests_Scenario.class })
-public class AllLifecycleListenerTests
-{
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/ClasspathTestListener.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/ClasspathTestListener.java
deleted file mode 100644
index d6ddd43..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/ClasspathTestListener.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jst.jsf.common.internal.resource.ClasspathEntryLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.EventResult;
-import org.eclipse.jst.jsf.common.internal.resource.IClasspathLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.IClasspathLifecycleListener.ClasspathLifecycleEvent;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJDTWorkspaceContext;
-
-class ClasspathTestListener extends
- AbstractTestListener<ClasspathLifecycleEvent> implements
- IClasspathLifecycleListener
-{
- private final List<EventData> _events = new ArrayList<EventData>();
- private final MockJDTWorkspaceContext _jdtContext;
-
- public ClasspathTestListener(final MockJDTWorkspaceContext jdtContext)
- {
- _jdtContext = jdtContext;
- }
-
- public ClasspathTestListener(final MockJDTWorkspaceContext jdtContext,
- final ClasspathEntryLifecycleListener listener)
- {
- this(jdtContext);
- listener.addListener(this);
- }
-
- public void fireAndExpect(final ElementChangedEvent fire,
- final List<EventData> expectedData)
- {
- fireEvent(fire);
- assertEquals(expectedData.size(), _events.size());
- for (final EventData data : expectedData)
- {
- data.assertContainedIn(_events);
- }
- }
-
- public void fireAndExpect(final ElementChangedEvent fire,
- final IJavaElement javaElement, final ClasspathLifecycleEvent.Type type)
- {
- fireAndExpect(fire, Collections.singletonList(new EventData(
- javaElement, type)));
- }
-
- public void fireAndExpectNull(final ElementChangedEvent fire)
- {
- fireEvent(fire);
- assertTrue(_events.isEmpty());
- }
-
- protected void fireEvent(final ElementChangedEvent event)
- {
- _events.clear();
- _jdtContext.fireElementChangedEvent(event);
- }
-
- public static class EventData
- {
- private final IJavaElement _affectedElement;
- private final ClasspathLifecycleEvent.Type _type;
-
- // private final EventType _eventType;
- // private final ReasonType _reasonType;
- public EventData(final IJavaElement affectedElement, final ClasspathLifecycleEvent.Type type)
- {
- super();
- _affectedElement = affectedElement;
- _type = type;
- }
-
- public EventData(final ClasspathLifecycleEvent event)
- {
- this(event.getAffectedElement(), event.getType());
- }
-
- public void assertContainedIn(final List<EventData> events)
- {
- for (final EventData event : events)
- {
- if (isEqual(event))
- {
- return;
- }
- }
- Assert.fail("Event not found in list: " + this.toString());
- }
-
- public boolean isEqual(final EventData eventData)
- {
- return (_affectedElement.equals(eventData._affectedElement)
- && _type == eventData._type);
- }
-
- @Override
- public String toString()
- {
- return String.format(
- "Classpath Entry: %s",
- _affectedElement.toString());
- }
- }
-
- @Override
- public EventResult acceptEvent(final ClasspathLifecycleEvent event)
- {
- _events.add(new EventData(event));
- return EventResult.getDefaultEventResult();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastClasspathEntryLifecycleTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastClasspathEntryLifecycleTests.java
deleted file mode 100644
index 558a986..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastClasspathEntryLifecycleTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jst.jsf.common.internal.resource.ClasspathEntryLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.IClasspathLifecycleListener.ClasspathLifecycleEvent;
-import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJDTWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaChangeEventFactory;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaCoreMediator;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaProject;
-import org.eclipse.jst.jsf.test.util.mock.java.MockPackageFragmentRoot;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-@Category(NoPluginEnvironment.class)
-public class FastClasspathEntryLifecycleTests
-{
- private IWorkspaceContext _wsContext;
- private MockJavaChangeEventFactory _factory;
- private IProject _project;
- private MockJDTWorkspaceContext _jdtContext;
- private MockJavaProject _javaProject;
-
- @Before
- public void setUp() throws Exception
- {
- _wsContext = new MockWorkspaceContext();
- _project = _wsContext.createProject("SomeTestProject");
- _jdtContext = new MockJDTWorkspaceContext(_wsContext);
- _javaProject = _jdtContext.createJavaProject(_project);
- _factory = new MockJavaChangeEventFactory(_jdtContext);
- }
-
- @Test
- public void testAddJarTo()
- {
- final ClasspathEntryLifecycleListener listener = new ClasspathEntryLifecycleListener(
- _project, new MockJavaCoreMediator(_jdtContext));
- ClasspathTestListener testListener = new ClasspathTestListener(
- _jdtContext, listener);
- IPackageFragmentRoot fragRoot = new MockPackageFragmentRoot(
- _javaProject, new Path(
- "/WebContent/WEB-INF/lib/my.jar"));
- ElementChangedEvent event = _factory.createSimpleJarAdded(_project,
- fragRoot);
- testListener.fireAndExpect(event, event.getDelta().getElement(),
- ClasspathLifecycleEvent.Type.ADDED);
- listener.dispose();
- }
-
- @Test
- public void testRemoveJarFrom()
- {
- final ClasspathEntryLifecycleListener listener = new ClasspathEntryLifecycleListener(
- _project, new MockJavaCoreMediator(_jdtContext));
- ClasspathTestListener testListener = new ClasspathTestListener(
- _jdtContext, listener);
- IPackageFragmentRoot fragRoot = new MockPackageFragmentRoot(
- _javaProject, new Path(
- "/WebContent/WEB-INF/lib/my.jar"));
- ElementChangedEvent event = _factory.createSimpleJarRemoved(_project,
- fragRoot);
- testListener.fireAndExpect(event, event.getDelta().getElement(),
- ClasspathLifecycleEvent.Type.REMOVED);
- listener.dispose();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests.java
deleted file mode 100644
index 7499bf8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceContext;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceRunner;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
-import org.eclipse.jst.jsf.test.util.mock.MockResourceChangeEventFactory;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-@RunWith(WorkspaceRunner.class)
-@Category(NoPluginEnvironment.class)
-public class FastLifecycleListenerTests
-{
- @WorkspaceContext
- private IWorkspaceContextWithEvents _wsContext;
- private MockResourceChangeEventFactory _factory;
- private IProject _project;
- private IFile _file;
-
- @Before
- public void setUp() throws Exception
- {
- _project = _wsContext.createProject("SomeTestProject");
- _file = _project.getFile("myfile.txt");
- _factory = new MockResourceChangeEventFactory(_wsContext);
- }
-
- @Test
- public void testAddRemoveListener()
- {
- final LifecycleListener listener = new LifecycleListener(_file,
- _wsContext.getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory.createSimpleFileChange(
- _file, true);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_CHANGED,
- ReasonType.RESOURCE_CHANGED_CONTENTS);
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- @Test
- public void testAddRemoveResource()
- {
- final List<Class<? extends IResourceChangeListener>> includeListeners =
- new ArrayList<Class<? extends IResourceChangeListener>>();
- includeListeners.add(LifecycleListener.class);
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory.createSimpleFileChange(
- _file, true);
- tester.fireAndExpectNull(event);
- assertEquals(0, _wsContext.getListeners(includeListeners).size());
-
- // now add the resource and verify the event
- listener.addResource(_file);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_CHANGED,
- ReasonType.RESOURCE_CHANGED_CONTENTS);
- assertEquals(1, _wsContext.getListeners(includeListeners).size());
-
- // remove it again and verify no event.
- listener.removeResource(_file);
- tester.fireAndExpectNull(event);
- assertEquals(0, _wsContext.getListeners(includeListeners).size());
- }
-
- @Test(expected = IllegalStateException.class)
- public void testDispose_AddListener()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- listener.dispose();
- listener.addListener(new MyTestListener(_wsContext));
- }
-
- @Test(expected = IllegalStateException.class)
- public void testDispose_RemoveListener()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- listener.dispose();
- listener.removeListener(new MyTestListener(_wsContext));
- }
-
- @Test
- public void testDispose_AddRemoveResource()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- listener.dispose();
- listener.addResource(_file);
- listener.removeResource(_file);
- }
-
- @Test
- public void testFileChangedEvents()
- {
- final LifecycleListener listener = new LifecycleListener(_file,
- _wsContext.getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- IResourceChangeEvent event = _factory.createSimpleFileChange(_file,
- true);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_CHANGED,
- ReasonType.RESOURCE_CHANGED_CONTENTS);
-
- event = _factory.createSimpleFileRemove(_file);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_DELETED);
-
- event = _factory.createSimpleFileAdded(_file);
-
- // we are listening for the file so this fire an added
- tester.fireAndExpect(event, _file, EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_ADDED);
- // now remove the file and expect null
- listener.removeResource(_file);
- tester.fireAndExpectNull(event);
-
- // now add the file's parent and fire again
- listener.addResource(_file.getParent());
- tester.fireAndExpect(event, _file, EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_ADDED_TO_CONTAINER);
- }
-
- @Test
- public void testProjectChangeEvents_ProjectClosed()
- {
- final LifecycleListener listener = new LifecycleListener(_project,
- _wsContext.getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleProjectClosed(_project);
- tester.fireAndExpect(event, _project, EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_PROJECT_CLOSED);
-
- // remove the project and add the file
- listener.removeResource(_project);
- listener.addResource(_file);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_PROJECT_CLOSED);
- }
-
- @Test
- public void testProjectChangeEvents_ProjectDeleted()
- {
- final LifecycleListener listener = new LifecycleListener(_project,
- _wsContext.getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleProjectDeleted(_project);
- tester.fireAndExpect(event, _project, EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_DELETED);
-
- // remove the project and add the file
- listener.removeResource(_project);
- listener.addResource(_file);
- tester.fireAndExpect(event, _file, EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_PROJECT_DELETED);
- }
-
- @Test(expected = NullPointerException.class)
- public void testPassNullTo_Workspace_Constructor()
- {
- new LifecycleListener(null);
- }
-
- @Test(expected = NullPointerException.class)
- public void testPassNullToResource_Workspace_Constructor()
- {
- boolean failed = false;
- try
- {
- new LifecycleListener((IResource) null, _wsContext.getWorkspace());
- } catch (final NullPointerException npe)
- {
- failed = true;
- }
- assertTrue(failed);
-
- failed = false;
-
- try
- {
- new LifecycleListener(_file, null);
- } catch (final NullPointerException npe)
- {
- failed = true;
- }
-
- assertTrue(failed);
-
- new LifecycleListener((IResource) null, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void testPassNullToListResource_Workspace_Constructor()
- {
- boolean failed = false;
- try
- {
- new LifecycleListener((List<IResource>) null, _wsContext
- .getWorkspace());
- } catch (final NullPointerException npe)
- {
- failed = true;
- }
- assertTrue(failed);
-
- failed = false;
- try
- {
- new LifecycleListener(new ArrayList<IResource>(), null);
- } catch (final NullPointerException npe)
- {
- failed = true;
- }
-
- assertTrue(failed);
-
- failed = false;
- try
- {
- List<IResource> resources = new ArrayList<IResource>();
- resources.add(_file);
- resources.add(null);
- new LifecycleListener(resources, _wsContext.getWorkspace());
- } catch (NullPointerException npe)
- {
- failed = true;
- }
-
- assertTrue(failed);
- new LifecycleListener((IResource) null, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void testPassNullToAddResource()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext.getWorkspace());
- listener.addResource(null);
- }
-
- @Test(expected = NullPointerException.class)
- public void testPassNullToAddListener()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext.getWorkspace());
- listener.addListener(null);
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests_Scenario.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests_Scenario.java
deleted file mode 100644
index 06c2f9f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests_Scenario.java
+++ /dev/null
@@ -1,344 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static junit.framework.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.core.tests.resource.MyTestListener.EventData;
-import org.eclipse.jst.jsf.test.util.junit4.DualModeEnvironment;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceContext;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceRunner;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
-import org.eclipse.jst.jsf.test.util.mock.MockResourceChangeEventFactory;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-@RunWith(WorkspaceRunner.class)
-@Category(DualModeEnvironment.class)
-public class FastLifecycleListenerTests_Scenario
-{
- @WorkspaceContext
- private IWorkspaceContextWithEvents _wsContext;
- private MockResourceChangeEventFactory _factory;
- private IProject _project;
- private IFile _file;
- private IFolder _folderInProject;
- private IFolder _folderInFolder;
-
- @Before
- public void setUp() throws Exception
- {
-// _wsContext = new MockWorkspaceContext();
- _project = _wsContext.createProject("SomeTestProject");
- _folderInProject = _project.getFolder("/folder");
- _folderInFolder = _project.getFolder("/folder/folderInFolder");
- _file = _project.getFile("/folder/myfile.txt");
- _factory = new MockResourceChangeEventFactory(_wsContext);
- }
-
- /**
- * Add a new file to a folder.
- */
- @Test
- public void testAddFile()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleFileAdded(_file);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
-
- listener.addResource(_file);
- tester.fireAndExpect(event, _file,
- // IMPORTANT: ReasonType is RESOURCE_ADDED because _file is listened for
- EventType.RESOURCE_ADDED, ReasonType.RESOURCE_ADDED);
- listener.removeResource(_file);
-
- listener.addResource(_file.getParent());
- tester.fireAndExpect(
- event,
- _file,
- // IMPORTANT: ReasonType is RESOURCE_ADDED_TO_CONTAINTER because
- // _file's
- // parent is being listened for.
- EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_ADDED_TO_CONTAINER);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- /**
- * Remove a file from a folder.
- */
- @Test
- public void testRemoveFile()
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleFileRemove(_file);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
-
- listener.addResource(_file);
- tester.fireAndExpect(event, _file,
- // IMPORTANT: ReasonType is RESOURCE_DELETED because _file is listened
- // for
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_DELETED);
- listener.removeResource(_file);
-
- listener.addResource(_file.getParent());
- tester.fireAndExpect(
- event,
- _file,
- // IMPORTANT: ReasonType is RESOURCE_DELETED_FROM_CONTAINER
- // because
- // _file's parent is being listened for.
- EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_DELETED_FROM_CONTAINER);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- /**
- * Add a new folder.
- */
- @Test
- public void testAddFolderToProject()
- {
- assertEquals(_project, _folderInProject.getParent());
- verifyAddFolderTo(_folderInProject);
- }
-
- /**
- * Add a new folder to a folder.
- */
- @Test
- public void testAddFolderToFolder()
- {
- verifyAddFolderTo(_folderInFolder);
- }
-
- public void verifyAddFolderTo(final IFolder folder)
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleFolderAdded(folder);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
-
- listener.addResource(folder);
- tester.fireAndExpect(event, folder,
- // IMPORTANT: ReasonType is RESOURCE_ADDED because folder is listened
- // for
- EventType.RESOURCE_ADDED, ReasonType.RESOURCE_ADDED);
- listener.removeResource(folder);
-
- listener.addResource(folder.getParent());
- tester.fireAndExpect(event,
- folder,
- // IMPORTANT: ReasonType is RESOURCE_ADDED_TO_CONTAINER because
- // folder's parent is being listened for.
- EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_ADDED_TO_CONTAINER);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- @Test
- public void testRemoveFolderFromProject()
- {
- verifyRemoveFolderFrom(_folderInProject);
- }
-
- @Test
- public void testRemoveFolderFromFolder()
- {
- verifyRemoveFolderFrom(_folderInFolder);
- }
-
- public void verifyRemoveFolderFrom(final IFolder folder)
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IResourceChangeEvent event = _factory
- .createSimpleFolderDeleted(folder);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
-
- listener.addResource(folder);
- tester.fireAndExpect(event, folder,
- // IMPORTANT: ReasonType is RESOURCE_DELETED because folder is listened
- // for
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_DELETED);
- listener.removeResource(folder);
-
- listener.addResource(folder.getParent());
- tester.fireAndExpect(
- event,
- folder,
- // IMPORTANT: ReasonType is RESOURCE_DELETED_FROM_CONTAINER
- // because
- // folder's parent is being listened for.
- EventType.RESOURCE_INACCESSIBLE,
- ReasonType.RESOURCE_DELETED_FROM_CONTAINER);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- @Test
- public void testRenameFolderInProject()
- {
- verifyRenameFolder(_folderInProject);
- }
-
- @Test
- public void testRenameFolderInFolder()
- {
- verifyRenameFolder(_folderInFolder);
- }
-
- private void verifyRenameFolder(final IFolder folder)
- {
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IFolder newFolder = _project.getFolder(folder
- .getProjectRelativePath().removeLastSegments(1).append(
- "NewFolderName"));
- final IResourceChangeEvent event = _factory.createSimpleFolderRename(
- folder, newFolder);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
- EventData oldFolderChange = new EventData(folder,
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED);
- listener.addResource(folder);
- tester.fireAndExpect(event, Collections.singletonList(oldFolderChange));
- listener.removeResource(folder);
-
- List<EventData> eventData = new ArrayList<MyTestListener.EventData>();
- eventData.add(new EventData(folder,
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED_CONTAINER));
- eventData.add(new EventData(newFolder, EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_MOVED_CONTAINER));
- listener.addResource(folder.getParent());
- tester.fireAndExpect(event,
- eventData);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
- @Test
- public void testRenameFile()
- {
- verifyRenameFile(_file);
- }
-
- private void verifyRenameFile(final IFile file)
- {
- List<EventData> eventData = new ArrayList<MyTestListener.EventData>();
-
- final LifecycleListener listener = new LifecycleListener(_wsContext
- .getWorkspace());
- final MyTestListener tester = new MyTestListener(_wsContext, listener);
- final IFile newFile = _project.getFile(file
- .getProjectRelativePath().removeLastSegments(1).append(
- "NewFileName"));
- final IResourceChangeEvent event = _factory.createSimpleFileRename(
- file, newFile);
- // we shouldn't expect an event because there are no resources
- // registered
- tester.fireAndExpectNull(event);
- EventData oldFileChange = new EventData(file,
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED);
- listener.addResource(file);
- eventData.add(oldFileChange);
- tester.fireAndExpect(event, eventData);
- listener.addResource(newFile);
- eventData.add(new EventData(newFile,
- EventType.RESOURCE_ADDED, ReasonType.RESOURCE_MOVED));
- tester.fireAndExpect(event, eventData);
- listener.removeResource(file);
- listener.removeResource(newFile);
- eventData.clear();
-
- eventData.add(new EventData(file,
- EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED_CONTAINER));
- eventData.add(new EventData(newFile, EventType.RESOURCE_ADDED,
- ReasonType.RESOURCE_MOVED_CONTAINER));
- listener.addResource(file.getParent());
- tester.fireAndExpect(event,
- eventData);
-
- // now remove and verify we no longer get the event.
- listener.removeListener(tester);
- tester.fireAndExpectNull(event);
- }
-
-// /**
-// * Move a folder from one place to another
-// */
-// @Test
-// public void testMoveFolderIn()
-// {
-// final LifecycleListener listener = new LifecycleListener(_wsContext
-// .getWorkspace());
-// final MyTestListener tester = new MyTestListener(_wsContext, listener);
-// final IFolder newFolder = _project.getFolder("/someOtherFolder");
-// final IResourceChangeEvent event = _factory.createSimpleFolderRename(
-// _folderInFolder, newFolder);
-// // we shouldn't expect an event because there are no resources
-// // registered
-// tester.fireAndExpectNull(event);
-// EventData oldFolderChange = new EventData(_folderInFolder,
-// EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED);
-// listener.addResource(_folderInFolder);
-// tester.fireAndExpect(event, Collections.singletonList(oldFolderChange));
-// listener.removeResource(_folderInFolder);
-//
-// List<EventData> eventData = new ArrayList<MyTestListener.EventData>();
-// eventData.add(new EventData(_folderInFolder,
-// EventType.RESOURCE_INACCESSIBLE, ReasonType.RESOURCE_MOVED_CONTAINER));
-// eventData.add(new EventData(newFolder, EventType.RESOURCE_ADDED,
-// ReasonType.RESOURCE_MOVED_CONTAINER));
-// listener.addResource(_folderInFolder.getParent());
-// tester.fireAndExpect(event,
-// eventData);
-//
-// // now remove and verify we no longer get the event.
-// listener.removeListener(tester);
-// tester.fireAndExpectNull(event);
-// }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/LifecycleStressTest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/LifecycleStressTest.java
deleted file mode 100644
index 4f647dc..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/LifecycleStressTest.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsf.common.internal.ITestTracker;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.PerfTracker;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class LifecycleStressTest extends TestCase
-{
- private final static int NUM_PROJECTS = 50;
- private final static int NUM_FILES = 100;
-
- private Map<IProject, List<IFile>> _resources;
- private LifecycleListener _listener;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _resources = new HashMap<IProject, List<IFile>>();
- _listener = new LifecycleListener(ResourcesPlugin.getWorkspace());
-
- for (int i = 0; i < NUM_PROJECTS; i++)
- {
- final WebProjectTestEnvironment webProjectTestEnv =
- new WebProjectTestEnvironment(getProjectName(getName(), i));
- webProjectTestEnv.createProject(false);
- assertNotNull(webProjectTestEnv);
- assertNotNull(webProjectTestEnv.getTestProject());
- assertTrue(webProjectTestEnv.getTestProject().isAccessible());
-
- final List<IFile> list = new ArrayList<IFile>();
-
- for (int j = 0; j < NUM_FILES; j++)
- {
- final IFile file =
- (IFile) webProjectTestEnv.loadResourceInWebRoot(
- TestsPlugin.getDefault().getBundle(),
- "/testfiles/jsps/testdata1.jsp.data",
- "/testdata_" + j + ".jsp");
-
- list.add(file);
- _listener.addResource(file);
- }
- _resources.put(webProjectTestEnv.getTestProject(), list);
- }
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- for (final IProject project : _resources.keySet())
- {
- try
- {
- project.close(null);
- project.delete(true, null);
- }
- catch (final CoreException ce)
- {
- ce.printStackTrace(System.err);
- }
- }
-
- _resources.clear();
- }
-
- public void testChanges() throws Exception
- {
- final int NUM_ITERATIONS = 1000;
- final int[] projectIdx = new int[NUM_ITERATIONS];
- final int[] fileIdx = new int[NUM_ITERATIONS];
-
- final Random random = new Random();
-
- for (int i = 0; i < NUM_ITERATIONS; i++)
- {
- projectIdx[i] = random.nextInt(NUM_PROJECTS);
- fileIdx[i] = random.nextInt(NUM_FILES);
- }
-
- traceIntArray(System.out, "Project sequence: ", projectIdx);
- traceIntArray(System.out, "File sequence: ", fileIdx);
-
- final LifecycleTestTracker tracker = new LifecycleTestTracker(NUM_ITERATIONS);
- _listener.setTestTracker(tracker);
-
- for (int i = 0; i < NUM_ITERATIONS; i++)
- {
- final IProject project =
- ResourcesPlugin.getWorkspace().getRoot().getProject(
- getProjectName(getName(), projectIdx[i]));
- final List<IFile> fileList = _resources.get(project);
- final MockListener listener = new MockListener();
- _listener.addListener(listener);
-
- // simulates a content change
- fileList.get(fileIdx[i]).touch(null);
-
- listener.assertAcceptedEvent(fileList.get(fileIdx[i]),
- EventType.RESOURCE_CHANGED,
- ReasonType.RESOURCE_CHANGED_CONTENTS);
- _listener.removeListener(listener);
- }
-
- tracker.report(System.out);
- }
-
- private String getProjectName(final String testName, final int idx)
- {
- return getClass().getName() + "_" + testName + idx;
- }
-
- private void traceIntArray(final PrintStream stream, final String prefix,
- final int[] intArray)
- {
- stream.print(prefix);
-
- for (int i = 0; i < intArray.length - 1; i++)
- {
- stream.print(intArray[i] + ",");
- }
-
- stream.print(intArray[intArray.length - 1]);
- stream.print("\n");
- }
-
- private static class LifecycleTestTracker implements ITestTracker
- {
- private final PerfTracker _resourceChangedTimes;
- // private final PerfTracker _findMemberTimes;
-
- private long _lastResourceChangedId;
- // private long _lastFindMemberChangedId;
- private long _curResourceChangedTime;
-
- // private long _curFindMemberChangedTime;
-
- public LifecycleTestTracker(final int numberOfDataPoints)
- {
- _resourceChangedTimes =
- new PerfTracker("ResourceChanged", numberOfDataPoints + 100);
- // _findMemberTimes =
- // new PerfTracker("findMember",
- // numberOfDataPoints*NUM_FILES*NUM_PROJECTS+100);
- }
-
- public void fireEvent(final Event event, final long seqId,
- final String eventLabel)
- {
- // get the current as quickly as possible
- final long curTime = System.nanoTime();
-
- switch (event)
- {
- case START_TRACKING:
- if ("trackMethod_resourceChanged".equals(eventLabel))
- {
- _curResourceChangedTime = curTime;
- _lastResourceChangedId = seqId;
- }
- else if ("testFindMember".equals(eventLabel))
- {
- // _curFindMemberChangedTime = curTime;
- // _lastFindMemberChangedId = seqId;
- }
- break;
-
- case STOP_TRACKING:
- if ("trackMethod_resourceChanged".equals(eventLabel))
- {
- assertEquals(_lastResourceChangedId, seqId);
- _resourceChangedTimes.recordTime(curTime
- - _curResourceChangedTime);
- }
- else if ("testFindMember".equals(eventLabel))
- {
- // assertEquals(_lastFindMemberChangedId, seqId);
- // _findMemberTimes.recordTime(curTime -
- // _curFindMemberChangedTime);
- }
- break;
- }
- }
-
- public void report(final PrintStream stream)
- {
- _resourceChangedTimes.printReport(System.out);
- // _findMemberTimes.printReport(System.out);
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MockListener.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MockListener.java
deleted file mode 100644
index f7899cf..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MockListener.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jst.jsf.common.internal.resource.EventResult;
-import org.eclipse.jst.jsf.common.internal.resource.IResourceLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-
-class MockListener implements IResourceLifecycleListener
-{
- private List<ResourceLifecycleEvent> _acceptedEvents =
- new ArrayList<ResourceLifecycleEvent>();
-
- public EventResult acceptEvent(ResourceLifecycleEvent event)
- {
- _acceptedEvents.add(event);
- return new EventResult();
- }
-
- public void assertAcceptedResourceInaccessible(final IResource res, final ReasonType reason)
- {
- assertAcceptedEvent(res, EventType.RESOURCE_INACCESSIBLE, reason);
- }
-
- public void assertNoAcceptedResourceInaccessible(final IResource res, final ReasonType reason)
- {
- assertNoAcceptedEvent(res, EventType.RESOURCE_INACCESSIBLE, reason);
- }
-
- public void assertNoAcceptedEvent(final IResource res, final EventType eventType, final ReasonType reason)
- {
- for (ResourceLifecycleEvent event : _acceptedEvents)
- {
- if (event.getEventType() == eventType
- && event.getAffectedResource().equals(res))
- {
- if (reason == event.getReasonType())
- {
- TestLifecycleListener.fail("Expected not to find RESOURCE_INACCESSIBLE event for resource: "+res.toString()); }
- }
- }
- }
-
- public void assertAcceptedEvent(final IResource res, final EventType eventType, final ReasonType reason)
- {
- for (ResourceLifecycleEvent event : _acceptedEvents)
- {
- if (event.getEventType() == eventType
- && event.getReasonType() == reason
- && event.getAffectedResource().equals(res))
- {
- if (reason == event.getReasonType())
- {
- return;
- }
- else
- {
- // this output is diagnostic and doesn't necessarily
- // indicate a problem
- System.out.printf("Expected event found with different result: %s instead of %s", event.getReasonType().toString(), reason.toString());
- }
- }
- }
-
- // if we get to here then we have failed to find the expected
- // event
- TestLifecycleListener.fail("Expected to find" + eventType + " event, reason "+reason+" for resource: "+res.toString());
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MyTestListener.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MyTestListener.java
deleted file mode 100644
index a49ac97..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MyTestListener.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.jst.jsf.common.internal.resource.EventResult;
-import org.eclipse.jst.jsf.common.internal.resource.IResourceLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
-
-class MyTestListener extends AbstractTestListener<ResourceLifecycleEvent> implements IResourceLifecycleListener
-{
- private final List<EventData> _events = new ArrayList<EventData>();
- private final IWorkspaceContextWithEvents _wsContext;
-
- public MyTestListener(final IWorkspaceContextWithEvents wsContext)
- {
- _wsContext = wsContext;
- }
-
- public MyTestListener(final IWorkspaceContextWithEvents wsContext,
- final LifecycleListener listener)
- {
- listener.addListener(this);
- _wsContext = wsContext;
- }
-
- public EventResult acceptEvent(final ResourceLifecycleEvent event)
- {
- _events.add(new EventData(event));
- return EventResult.getDefaultEventResult();
- }
-
- public void fireAndExpect(final IResourceChangeEvent fire,
- final List<EventData> expectedData)
- {
- fireEvent(fire);
- assertEquals(expectedData.size(), _events.size());
- for (final EventData data : expectedData)
- {
- data.assertContainedIn(_events);
- }
- }
-
- public void fireAndExpect(final IResourceChangeEvent fire,
- final IResource expectedResource, final EventType eventType,
- final ReasonType reasonType)
- {
- fireAndExpect(fire, Collections.singletonList(new EventData(
- expectedResource, eventType, reasonType)));
- }
-
- public void fireAndExpectNull(final IResourceChangeEvent fire)
- {
- fireEvent(fire);
- assertTrue(_events.isEmpty());
- }
-
- protected void fireEvent(final IResourceChangeEvent event)
- {
- _events.clear();
- _wsContext.fireWorkspaceEvent(event);
- }
-
- public static class EventData
- {
- private final IResource _expectedResource;
- private final EventType _eventType;
- private final ReasonType _reasonType;
-
- public EventData(final IResource expectedResource,
- final EventType eventType, final ReasonType reasonType)
- {
- super();
- _expectedResource = expectedResource;
- _eventType = eventType;
- _reasonType = reasonType;
- }
-
- public EventData(final ResourceLifecycleEvent event)
- {
- this(event.getAffectedResource(), event.getEventType(), event.getReasonType());
- }
-
- public final IResource getExpectedResource()
- {
- return _expectedResource;
- }
-
- public final EventType getEventType()
- {
- return _eventType;
- }
-
- public final ReasonType getReasonType()
- {
- return _reasonType;
- }
-
- public void assertContainedIn(final List<EventData> events)
- {
- for (final EventData event : events)
- {
- if (isEqual(event))
- {
- return;
- }
- }
- Assert.fail("Event not found in list: "+this.toString());
- }
-
- public boolean isEqual(final EventData eventData)
- {
- return (_expectedResource.equals(eventData.getExpectedResource())
- &&( _eventType == eventData.getEventType())
- && (_reasonType == eventData.getReasonType()));
- }
-
- public String toString()
- {
- return String.format("Resource: %s, Event Type: %s, ReasonType: %s",
- _expectedResource, _eventType, _reasonType);
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestDefaultJarLocator.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestDefaultJarLocator.java
deleted file mode 100644
index 71aac84..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestDefaultJarLocator.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-
-import java.io.File;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jst.jsf.common.internal.resource.ClasspathJarFile;
-import org.eclipse.jst.jsf.common.internal.resource.DefaultJarLocator;
-import org.eclipse.jst.jsf.common.internal.resource.IJarLocator.JarChangeEvent;
-import org.eclipse.jst.jsf.common.internal.resource.IJarLocator.JarChangeEvent.Type;
-import org.eclipse.jst.jsf.common.internal.resource.IJarLocator.JarChangeListener;
-import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJDTWorkspaceContext;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaChangeEventFactory;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaCoreMediator;
-import org.eclipse.jst.jsf.test.util.mock.java.MockJavaProject;
-import org.eclipse.jst.jsf.test.util.mock.java.MockPackageFragmentRoot;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-@Category(NoPluginEnvironment.class)
-public class TestDefaultJarLocator
-{
- private IWorkspaceContext _wsContext;
- private IProject _project;
- private MockJavaChangeEventFactory _factory;
- private MockJDTWorkspaceContext _jdtContext;
- private MockJavaProject _javaProject;
-
- @Before
- public void setUp() throws Exception
- {
- _wsContext = new MockWorkspaceContext();
- _project = _wsContext.createProject("SomeTestProject");
- _jdtContext = new MockJDTWorkspaceContext(_wsContext);
- _factory = new MockJavaChangeEventFactory(_jdtContext);
- _jdtContext.createCPELibraryInProject(_project, new Path(
- "/WEB-INF/WebContent/lib/nocareContents.jar"), new File(
- "./testfiles/faces-all-bogus.jar"));
- _javaProject = _jdtContext.createJavaProject(_project);
- }
-
- @Test
- public void testStart() throws Exception
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.start(_project);
- }
-
- @Test
- public void testLocate()
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.start(_project);
- Collection<? extends ClasspathJarFile> locate = jarLocator.locate(_project);
- assertEquals(1, locate.size());
- Collection<? extends ClasspathJarFile> jars = jarLocator.getJars(_project);
- assertEquals(1, locate.size());
- assertEquals(locate, jars);
- }
-
- @Test
- public void testAddJar()
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.start(_project);
- final JarChangeEvent[] trappedEvents = new JarChangeEvent[1];
- jarLocator.addListener(new JarChangeListener()
- {
- @Override
- public void changed(final JarChangeEvent event)
- {
- trappedEvents[0] = event;
- }
- });
- IPackageFragmentRoot fragRoot = new MockPackageFragmentRoot(
- _javaProject, new Path(
- "/WebContent/WEB-INF/lib/my.jar"));
- final ElementChangedEvent event = _factory.createSimpleJarAdded(
- _project, fragRoot);
- _jdtContext.fireElementChangedEvent(event);
- assertNotNull(trappedEvents[0]);
- assertEquals(Type.JAR_ADDED, trappedEvents[0].getType());
- assertEquals("/WebContent/WEB-INF/lib/my.jar", trappedEvents[0]
- .getJar().getPath().toString());
- }
-
- @Test
- public void testRemoveJar()
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.start(_project);
- final JarChangeEvent[] trappedEvents = new JarChangeEvent[1];
- jarLocator.addListener(new JarChangeListener()
- {
- @Override
- public void changed(final JarChangeEvent event)
- {
- trappedEvents[0] = event;
- }
- });
- IPackageFragmentRoot fragRoot = new MockPackageFragmentRoot(
- _javaProject, new Path(
- "/WebContent/WEB-INF/lib/my.jar"));
- final ElementChangedEvent event = _factory.createSimpleJarRemoved(
- _project, fragRoot);
- _jdtContext.fireElementChangedEvent(event);
- assertNotNull(trappedEvents[0]);
- assertEquals(Type.JAR_REMOVED, trappedEvents[0].getType());
- assertEquals("/WebContent/WEB-INF/lib/my.jar", trappedEvents[0]
- .getJar().getPath().toString());
- }
-
- @Test(expected = IllegalStateException.class)
- public void testLocateWithoutStart()
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.locate(_project);
- }
-
- @Test(expected = IllegalStateException.class)
- public void testGetJarsWithoutStart()
- {
- final DefaultJarLocator jarLocator = new DefaultJarLocator(
- new MockJavaCoreMediator(_jdtContext));
- jarLocator.getJars(_project);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestLifecycleListener.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestLifecycleListener.java
deleted file mode 100644
index 54b6eea..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestLifecycleListener.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsf.common.internal.resource.EventResult;
-import org.eclipse.jst.jsf.common.internal.resource.IResourceLifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.EventType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class TestLifecycleListener extends TestCase
-{
- private WebProjectTestEnvironment _webProjectTestEnv;
- private IResource _res1;
- private IResource _res2;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- _webProjectTestEnv = new WebProjectTestEnvironment(
- getClass().getName()+"_" + getName());
- _webProjectTestEnv.createProject(false);
- assertNotNull(_webProjectTestEnv);
- assertNotNull(_webProjectTestEnv.getTestProject());
- assertTrue(_webProjectTestEnv.getTestProject().isAccessible());
-
- _res1 = _webProjectTestEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/jsps/testdata1.jsp.data", "/testdata1.jsp");
- _res2 = _webProjectTestEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/jsps/testdata1.jsp.data", "/testdata2.jsp");
- }
-
- private void testInaccessibleCondition(IResource res, Runnable runnable, ReasonType reason)
- {
- assertTrue(res.isAccessible());
-
- LifecycleListener testListener = new LifecycleListener(res, ResourcesPlugin.getWorkspace());
- MockListener mockListener = new MockListener();
- testListener.addListener(mockListener);
-
- runnable.run();
-
- mockListener.assertAcceptedResourceInaccessible(res, reason);
- assertFalse(res.isAccessible());
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- private void testInaccessibleConditionMultiple(List<IResource> resources, Runnable runnable, List<ReasonType> reasons)
- {
- assertEquals(resources.size(), reasons.size());
-
- for (IResource res : resources)
- {
- assertTrue(res.isAccessible());
- }
-
- LifecycleListener testListener = new LifecycleListener(resources, ResourcesPlugin.getWorkspace());
- MockListener mockListener = new MockListener();
- testListener.addListener(mockListener);
-
- runnable.run();
-
- for (int i = 0; i < resources.size(); i++)
- {
- final IResource res = resources.get(i);
- final ReasonType reason = reasons.get(i);
- mockListener.assertAcceptedResourceInaccessible(res,reason);
- assertFalse(res.isAccessible());
- }
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- public void testProjectClosedForProject() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now close the project
- try {
- _webProjectTestEnv.getTestProject().close(null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
-
- };
- testInaccessibleCondition(_webProjectTestEnv.getTestProject(), runnable, ReasonType.RESOURCE_PROJECT_CLOSED);
- }
-
- public void testProjectClosedForContainedResource() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now close the project
- try {
- _webProjectTestEnv.getTestProject().close(null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
- };
- testInaccessibleCondition(_res1, runnable, ReasonType.RESOURCE_PROJECT_CLOSED);
- }
-
- public void testProjectDeletedForProject() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now delete the project
- try {
- _webProjectTestEnv.getTestProject().delete(true, null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
- };
- testInaccessibleCondition(_webProjectTestEnv.getTestProject(), runnable, ReasonType.RESOURCE_DELETED);
- }
-
- public void testProjectDeletedForContainedResource() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now delete the project
- try
- {
- _webProjectTestEnv.getTestProject().delete(true, null);
- } catch (CoreException e)
- {
- throw new RuntimeException(e);
- }
- }
- };
- testInaccessibleCondition(_res1, runnable, ReasonType.RESOURCE_PROJECT_DELETED);
- }
-
- public void testResourceDeleted() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now delete the resource
- try {
- _res1.delete(true, null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
- };
- testInaccessibleCondition(_res1, runnable, ReasonType.RESOURCE_DELETED);
- }
-
- public void testMultipleResourcesDeleted() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now delete the resource
- try {
- _res1.delete(true, null);
- _res2.delete(true, null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
- };
-
- List<IResource> resources = new ArrayList<IResource>();
- resources.add(_res1);
- resources.add(_res2);
- List<ReasonType> reasons = new ArrayList<ReasonType>();
- reasons.add(ReasonType.RESOURCE_DELETED);
- reasons.add(ReasonType.RESOURCE_DELETED);
- testInaccessibleConditionMultiple(resources, runnable, reasons);
- }
-
- public void testMultipleResourcesProjectClosed() throws Exception
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- // now delete the resource
- try {
- _res1.getProject().close(null);
- } catch (CoreException e) {
- throw new RuntimeException(e);
- }
- }
- };
-
- List<IResource> resources = new ArrayList<IResource>();
- resources.add(_res1);
- resources.add(_res2);
- List<ReasonType> reasons = new ArrayList<ReasonType>();
- reasons.add(ReasonType.RESOURCE_PROJECT_CLOSED);
- reasons.add(ReasonType.RESOURCE_PROJECT_CLOSED);
- testInaccessibleConditionMultiple(resources, runnable, reasons);
- }
-
- public void testAddResource() throws Exception
- {
- assertTrue(_res1.isAccessible());
- assertTrue(_res2.isAccessible());
-
- LifecycleListener testListener = new LifecycleListener(_res1, ResourcesPlugin.getWorkspace());
- MockListener mockListener = new MockListener();
- testListener.addListener(mockListener);
- testListener.addResource(_res2);
-
- _res1.getProject().close(null);
-
- mockListener.assertAcceptedResourceInaccessible(_res1, ReasonType.RESOURCE_PROJECT_CLOSED);
- mockListener.assertAcceptedResourceInaccessible(_res2, ReasonType.RESOURCE_PROJECT_CLOSED);
- assertFalse(_res1.isAccessible());
- assertFalse(_res2.isAccessible());
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- public void testAddRemoveResource() throws Exception
- {
- assertTrue(_res1.isAccessible());
- assertTrue(_res2.isAccessible());
-
- LifecycleListener testListener = new LifecycleListener(_res1, ResourcesPlugin.getWorkspace());
- MockListener mockListener = new MockListener();
- testListener.addListener(mockListener);
- testListener.addResource(_res2);
- testListener.removeResource(_res1);
-
- _res1.getProject().close(null);
-
- // we removed res1, so should find an event for it
- mockListener.assertNoAcceptedResourceInaccessible(_res1, ReasonType.RESOURCE_PROJECT_CLOSED);
- mockListener.assertAcceptedResourceInaccessible(_res2, ReasonType.RESOURCE_PROJECT_CLOSED);
- assertFalse(_res1.isAccessible());
- assertFalse(_res2.isAccessible());
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- public void testRemoveListenerResource() throws Exception
- {
- assertTrue(_res1.isAccessible());
- assertTrue(_res2.isAccessible());
-
- LifecycleListener testListener = new LifecycleListener(_res1, ResourcesPlugin.getWorkspace());
- testListener.addResource(_res2);
- MockListener mockListener = new MockListener();
- MockListener mockListener2 = new MockListener();
-
- testListener.addListener(mockListener);
- testListener.addListener(mockListener2);
- _res1.delete(true, null);
-
- // both listeners should get the event on res1
- mockListener.assertAcceptedResourceInaccessible(_res1, ReasonType.RESOURCE_DELETED);
- mockListener2.assertAcceptedResourceInaccessible(_res1, ReasonType.RESOURCE_DELETED);
- assertFalse(_res1.isAccessible());
-
- // remove the listener for mock2
- testListener.removeListener(mockListener2);
-
- _res2.delete(true, null);
-
- // the first mockListener should get it
- mockListener.assertAcceptedResourceInaccessible(_res2, ReasonType.RESOURCE_DELETED);
- // the second one was removed before the delete
- // so it should not have accepted an event
- mockListener2.assertNoAcceptedResourceInaccessible(_res2, ReasonType.RESOURCE_DELETED);
- assertFalse(_res2.isAccessible());
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- public void testResourceChangedEvent() throws Exception
- {
- assertTrue(_res1.isAccessible());
- assertTrue(_res2.isAccessible());
-
- LifecycleListener testListener = new LifecycleListener(_res1, ResourcesPlugin.getWorkspace());
- testListener.addResource(_res2);
- MockListener mockListener = new MockListener();
- testListener.addListener(mockListener);
-
- // simulate a content change
- _res1.touch(null);
-
- mockListener.assertAcceptedEvent(_res1, EventType.RESOURCE_CHANGED, ReasonType.RESOURCE_CHANGED_CONTENTS);
-
- testListener.removeListener(mockListener);
- testListener.dispose();
- }
-
- public void testDisposeAfterEvent() throws Exception
- {
- LifecycleListener testListener = new LifecycleListener(_res1, ResourcesPlugin.getWorkspace());
- MockListenerThatDoesDispose mockListener = new MockListenerThatDoesDispose();
- testListener.addListener(mockListener);
-
- _res1.delete(true, null);
-
- assertTrue(testListener.isDisposed());
-
- boolean caughtAssertion = false;
- try
- {
- testListener.addListener(mockListener);
- }
- catch (IllegalStateException ae)
- {
- caughtAssertion = true;
- }
-
- assertTrue(caughtAssertion);
- }
-
- /**
- * A mock object that tests the disposeAfterEvent flag.
- * @author cbateman
- *
- */
- private class MockListenerThatDoesDispose implements IResourceLifecycleListener
- {
- public EventResult acceptEvent(ResourceLifecycleEvent event)
- {
- EventResult result = EventResult.getDisposeAfterEventResult();
- return result;
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestResourceTracker.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestResourceTracker.java
deleted file mode 100644
index 4211006..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestResourceTracker.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.resource;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.jst.jsf.common.internal.resource.LifecycleListener;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceTracker;
-import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceContext;
-import org.eclipse.jst.jsf.test.util.junit4.WorkspaceRunner;
-import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
-import org.eclipse.jst.jsf.test.util.mock.MockResourceChangeEventFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-@RunWith(WorkspaceRunner.class)
-@Category(NoPluginEnvironment.class)
-public class TestResourceTracker
-{
-
- private static class TestableResourceTracker extends
- ResourceTracker<IResource>
- {
- private boolean _inAccessibleFired;
- private ReasonType _inAccessibleReason;
- private boolean _changeFired;
- private ReasonType _changeReason;
- private boolean _addFired;
- private List<ReasonType> _addReason = new ArrayList<ReasonType>();
-
- public TestableResourceTracker(final IResource resource)
- {
- super(resource);
- }
-
- @Override
- protected void fireResourceInAccessible(final IResource resource, final ReasonType reasonType)
- {
- _inAccessibleFired = true;
- _inAccessibleReason = reasonType;
- }
-
- @Override
- protected void fireResourceChanged(final IResource resource, final ReasonType reasonType)
- {
- _changeFired = true;
- _changeReason = reasonType;
- }
-
- @Override
- protected void fireResourceAdded(final IResource affectedResource,
- final ReasonType reasonType)
- {
- _addFired = true;
- _addReason.add(reasonType);
- }
-
- public final boolean isInAccessibleFired()
- {
- return _inAccessibleFired;
- }
-
- public final ReasonType getInAccessibleReason()
- {
- return _inAccessibleReason;
- }
-
- public final boolean isChangeFired()
- {
- return _changeFired;
- }
-
- public final ReasonType getChangeReason()
- {
- return _changeReason;
- }
-
- public final boolean isAddFired()
- {
- return _addFired;
- }
-
- public final List<ReasonType> getAddReason()
- {
- return _addReason;
- }
-
- }
-
- private MockResourceChangeEventFactory _eventFactory;
- @WorkspaceContext
- private IWorkspaceContextWithEvents _wsContext;
- private IFile _testResource;
- private TestableResourceTracker _resourceTracker;
- private LifecycleListener _lifecycleListener;
- private IFile _uninterestedInRes;
-
- @Before
- public void setUp() throws Exception
- {
-// _wsContext = new MockWorkspaceContext();
- _eventFactory = new MockResourceChangeEventFactory(_wsContext);
- final IProject createProject = _wsContext.createProject(
- "TestResourceTracker_Project");
- _testResource = createProject
- .getFile("/WebContent/resources/foo/resource/somelib/foo.xhtml");
- _uninterestedInRes = createProject
- .getFile("/WebContent/resources/foo/resource/uninterestedInMe/foo.xhtml");
- _resourceTracker = new TestableResourceTracker(_testResource);
- _lifecycleListener = new LifecycleListener(_wsContext.getWorkspace());
- _lifecycleListener.addListener(_resourceTracker);
- _lifecycleListener.addResource(_testResource);
- _lifecycleListener.addResource(_uninterestedInRes);
- }
-
- @After
- public void tearDown()
- {
- _resourceTracker.dispose();
- }
-
- @Test
- public void testGetResource()
- {
- assertSame(_testResource, _resourceTracker.getResource());
- }
-
- @Test
- public void testGetLastModifiedStamp()
- {
- assertEquals(-1, _resourceTracker.getLastModifiedStamp());
- }
-
- @Test
- public void testFireResourceInAccessible()
- {
- final IResourceChangeEvent event = _eventFactory
- .createSimpleProjectDeleted( _testResource
- .getProject());
- _wsContext.fireWorkspaceEvent(event);
- assertTrue(_resourceTracker.isInAccessibleFired());
- assertEquals(ReasonType.RESOURCE_PROJECT_DELETED, _resourceTracker
- .getInAccessibleReason());
- assertFalse(_resourceTracker.isAddFired());
- assertFalse(_resourceTracker.isChangeFired());
- }
-
- @Test
- public void testFireResourceChanged()
- {
- final IResourceChangeEvent event = _eventFactory
- .createSimpleFileChange(_testResource, true);
- _wsContext.fireWorkspaceEvent(event);
- assertTrue(_resourceTracker.isChangeFired());
- assertEquals(ReasonType.RESOURCE_CHANGED_CONTENTS, _resourceTracker
- .getChangeReason());
- assertFalse(_resourceTracker.isAddFired());
- assertFalse(_resourceTracker.isInAccessibleFired());
- }
-
- @Test
- public void testFireResourceAdded()
- {
- final IResourceChangeEvent event = _eventFactory
- .createSimpleFileAdded(_testResource);
- _wsContext.fireWorkspaceEvent(event);
- assertTrue(_resourceTracker.isAddFired());
- assertEquals(1, _resourceTracker.getAddReason().size());
- assertEquals(ReasonType.RESOURCE_ADDED, _resourceTracker.getAddReason().get(0));
- assertFalse(_resourceTracker.isInAccessibleFired());
- assertFalse(_resourceTracker.isChangeFired());
- }
-
- @Test
- public void testResourceFilter()
- {
- final IResourceChangeEvent event = _eventFactory
- .createSimpleFileChange(_uninterestedInRes, true);
- _wsContext.fireWorkspaceEvent(event);
- assertFalse(_resourceTracker.isInAccessibleFired());
- assertFalse(_resourceTracker.isAddFired());
- assertFalse(_resourceTracker.isChangeFired());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/sanity/TestJSFFacetedTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/sanity/TestJSFFacetedTestEnvironment.java
deleted file mode 100644
index 13d0812..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/sanity/TestJSFFacetedTestEnvironment.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.sanity;
-
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-import junit.framework.TestCase;
-
-/**
- * This is a sanity test for the utility calss JSFFactedTestEnvironment and is
- * not mean to be run as part of the application test suite.
- *
- * @author cbateman
- *
- */
-public class TestJSFFacetedTestEnvironment extends TestCase
-{
- /**
- * Test creation of a basic JSF 1.1 faceted test environment
- * @throws Exception
- */
- public void testVersion_1_1_Facet() throws Exception
- {
- WebProjectTestEnvironment webTestEnv = new WebProjectTestEnvironment(getName());
- webTestEnv.createProject(false);
-
- JSFFacetedTestEnvironment testEnv = new JSFFacetedTestEnvironment(webTestEnv);
- testEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
- }
-
- /**
- * Test creation of a basic JSF 1.1 faceted test environment
- * @throws Exception
- */
- public void testVersion_1_2_Facet() throws Exception
- {
- WebProjectTestEnvironment webTestEnv = new WebProjectTestEnvironment(getName());
- webTestEnv.createProject(false);
-
- JSFFacetedTestEnvironment testEnv = new JSFFacetedTestEnvironment(webTestEnv);
- testEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_2);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/serialization/TLDAttributeSerializationTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/serialization/TLDAttributeSerializationTests.java
deleted file mode 100644
index ba2e9f9..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/serialization/TLDAttributeSerializationTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.serialization;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.eclipse.jst.jsf.core.tests.mock.MockTLDAttributeDeclaration;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDTagAttribute;
-import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-@Category(NoPluginEnvironment.class)
-public class TLDAttributeSerializationTests
-{
- private MockTLDAttributeDeclaration _decl;
- private TLDTagAttribute _attribute;
-
- @Before
- public void setUp() throws Exception
- {
-
- _decl = new MockTLDAttributeDeclaration("mockAttr", "mockDesc", "mockId", true);
- _attribute = new TLDTagAttribute(_decl);
- }
-
- @Test
- public void testWriteRead() throws Exception
- {
- assertFalse(_attribute.hasBeenDeserialized());
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- ObjectOutputStream serializationStream = new ObjectOutputStream(stream);
- serializationStream.writeObject(_attribute);
- ByteArrayInputStream inStream = new ByteArrayInputStream(stream.toByteArray());
- ObjectInputStream deserializeStream = new ObjectInputStream(inStream);
- Object readObject = deserializeStream.readObject();
- assertNotNull(readObject);
- assertTrue(readObject instanceof TLDTagAttribute);
- TLDTagAttribute tagAttribute = (TLDTagAttribute) readObject;
- assertEquals("mockAttr", tagAttribute.getName());
- assertEquals("mockDesc", tagAttribute.getDescription());
- assertEquals(true, tagAttribute.isRequired());
- assertTrue(tagAttribute.hasBeenDeserialized());
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/ConcreteAxiomaticSetTest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/ConcreteAxiomaticSetTest.java
deleted file mode 100644
index 3c4ee0a..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/ConcreteAxiomaticSetTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.common.sets.ConcreteAxiomaticSet;
-
-public class ConcreteAxiomaticSetTest extends TestCase
-{
- AxiomaticSet _primaryColours;
- AxiomaticSet _secondaryColours;
- AxiomaticSet _allMainColours;
-
- AxiomaticSet _palette;
- AxiomaticSet _overlappingSet;
- AxiomaticSet _emptySet;
-
- @SuppressWarnings("unchecked")
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // make concreteSet1 disjoint with concreteSet2 and non-disjoint with concrete3
-
- _emptySet = new ConcreteAxiomaticSet();
-
- _primaryColours = new ConcreteAxiomaticSet();
- _primaryColours.add("blue");
- _primaryColours.add("red");
- _primaryColours.add("yellow");
-
- _secondaryColours = new ConcreteAxiomaticSet();
- _secondaryColours.add("green");
- _secondaryColours.add("purple");
- _secondaryColours.add("orange");
-
- _allMainColours = new ConcreteAxiomaticSet();
- _allMainColours.add("blue");
- _allMainColours.add("red");
- _allMainColours.add("yellow");
- _allMainColours.add("green");
- _allMainColours.add("purple");
- _allMainColours.add("orange");
-
- _palette = new ConcreteAxiomaticSet();
- _palette.add("blue");
- _palette.add("green");
- _palette.add("burgundy");
-
- _overlappingSet = new ConcreteAxiomaticSet();
- _overlappingSet.add("blue");
- _overlappingSet.add("red");
- _overlappingSet.add("yellow");
- _overlappingSet.add("green");
- _overlappingSet.add("purple");
- _overlappingSet.add("burgundy");
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- _primaryColours = null;
- _secondaryColours = null;
- _palette = null;
- _emptySet = null;
- }
-
- public void testIntersect()
- {
- // intersect the empty is set an identity
- assertTrue(_primaryColours.intersect(_secondaryColours).isEmpty());
-
- // non-disjoint intersection not empty
- assertFalse(_primaryColours.intersect(_palette).isEmpty());
- assertEquals(1, _primaryColours.intersect(_palette).size());
- assertEquals("blue", _primaryColours.intersect(_palette).getFirstElement());
-
- // intersection is commutative
- assertEquals(_primaryColours.intersect(_palette), _palette.intersect(_primaryColours));
- //intersection is associative
- assertEquals(_primaryColours.intersect(_overlappingSet).intersect(_palette)
- , _overlappingSet.intersect(_palette).intersect(_primaryColours));
-
- // intersection of disjoint sets are empty
- assertTrue(_primaryColours.intersect(_secondaryColours).isEmpty());
-
- // intersection of subset of a set with the set is the subset
- assertEquals(_primaryColours, _allMainColours.intersect(_primaryColours));
- assertEquals(_secondaryColours, _allMainColours.intersect(_secondaryColours));
- }
-
- public void testIsEquivalent()
- {
- // identity: a set is equal to itself
- assertTrue(_primaryColours.isEquivalent(_primaryColours));
-
- // two unequal sets are not equivalent
- assertFalse(_primaryColours.isEquivalent(_secondaryColours));
- }
-
- public void testUnion()
- {
- // union with empty is identity
- assertEquals(_primaryColours, _primaryColours.union(_emptySet));
-
- // primary and secondary union to allMain
- assertEquals(_allMainColours, _primaryColours.union(_secondaryColours));
-
- // union is commutative
- assertEquals(_primaryColours.union(_secondaryColours)
- , _secondaryColours.union(_primaryColours));
- // union is associative
- assertEquals(_primaryColours.union(_secondaryColours).union(_overlappingSet),
- _secondaryColours.union(_overlappingSet).union(_primaryColours));
- }
-
- public void testIsDisjoint() {
- // primary colours and secondary have no common elements
- assertTrue(_primaryColours.isDisjoint(_secondaryColours));
-
- // all sets are disjoint with the empty set
- assertTrue(_primaryColours.isDisjoint(_emptySet));
- assertTrue(_secondaryColours.isDisjoint(_emptySet));
- assertTrue(_emptySet.isDisjoint(_allMainColours));
-
- // subset is not disjoint with set
- assertFalse(_primaryColours.isDisjoint(_allMainColours));
- }
-
- public void testGetFirstElement()
- {
- // TODO:
- }
-
- public void testSubtract() {
- // A - B = A if A and B are disjoint
- assertEquals(_primaryColours, _primaryColours.subtract(_secondaryColours));
-
- // A - B = C where A = B U C and B and C are disjoint
- assertEquals(_secondaryColours, _allMainColours.subtract(_primaryColours));
- assertEquals(_primaryColours, _allMainColours.subtract(_secondaryColours));
-
- // A - B = A if B is empty
- assertEquals(_secondaryColours, _secondaryColours.subtract(_emptySet));
-
- AxiomaticSet remainder = _allMainColours.subtract(_overlappingSet);
- assertEquals(1, remainder.size());
- assertTrue(remainder.contains("orange"));
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/NodeSetTest.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/NodeSetTest.java
deleted file mode 100644
index 96ed6ab..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/NodeSetTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.set;
-
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
-import org.eclipse.jst.jsf.core.set.mapping.ElementToTagIdentifierMapping;
-import org.eclipse.jst.jsf.core.tagmatcher.XPathMatchingAlgorithm;
-import org.eclipse.jst.jsf.core.tests.tagmatcher.BaseTagMatcherTestCase;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-
-public class NodeSetTest extends BaseTagMatcherTestCase
-{
- private AxiomaticSet _ancestorsOfInputText;
- private AxiomaticSet _ancestorsOfCommandButton;
- private AxiomaticSet _ancestorsOfOutputText;
- private AxiomaticSet _inputTextSingletonSet;
-
- @Override
- protected void setUp() throws Exception
- {
- _srcFileName = "/testfiles/jsps/testdata1.jsp.data";
- _destFileName = "/testdata1.jsp";
-
- super.setUp();
-
- _ancestorsOfInputText = getAncestorsOf("/view/html/body/form/panelGrid/inputText", 5);
- _ancestorsOfCommandButton = getAncestorsOf("/view/html/body/form/commandButton", 4);
- _ancestorsOfOutputText = getAncestorsOf("/view/html/body/form/h1/outputText", 5);
-
- Document doc = ((IDOMModel)_structuredModel).getDocument();
- XPathMatchingAlgorithm matcher = new XPathMatchingAlgorithm("/view/html/body/form/panelGrid/inputText");
- _inputTextSingletonSet = matcher.evaluate(doc);
- assertEquals(1, _inputTextSingletonSet.size());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public void testIntersect()
- {
- AxiomaticSet set1 =
- _ancestorsOfInputText.intersect(_ancestorsOfCommandButton);
- set1 = new ElementToTagIdentifierMapping().map(set1);
- assertEquals(4, set1.size());
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_FORM));
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_VIEW));
- // should not contain panelgrid because command button not in it
- assertFalse(set1.contains(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID));
-
- AxiomaticSet set2 =
- _ancestorsOfOutputText.intersect(_ancestorsOfCommandButton);
- set2 = new ElementToTagIdentifierMapping().map(set2);
- assertEquals(4, set2.size());
- assertTrue(set2.contains(IJSFConstants.TAG_IDENTIFIER_FORM));
- assertTrue(set2.contains(IJSFConstants.TAG_IDENTIFIER_VIEW));
-
- // result is same as command button's ancestors, but output text
- // has an additional h1 ancestor
- assertFalse(set2.equals(new ElementToTagIdentifierMapping().map(_ancestorsOfOutputText)));
- assertTrue(set2.equals(new ElementToTagIdentifierMapping().map(_ancestorsOfCommandButton)));
- }
-
- public void testIsEquivalent() throws Exception
- {
- // this == compareTo
- assertTrue(_ancestorsOfInputText.isEquivalent(_ancestorsOfInputText));
-
- // this._data == compareTo._data
- //assertTrue(_ancestorsOfInputText.isEquivalent((AxiomaticSet) ((NodeSet)_ancestorsOfInputText).clone()));
-
- // this.size() != compareTo.size();
- assertFalse(_ancestorsOfInputText.isEquivalent(_ancestorsOfCommandButton));
-
- // this.size() == compareTo.size() but contents not same
- assertFalse(_ancestorsOfInputText.isEquivalent(_ancestorsOfOutputText));
-
- // this.size() == compareTo.size() AND contents same
- assertTrue(_ancestorsOfInputText.isEquivalent(getAncestorsOf("/view/html/body/form/panelGrid/inputText", -1)));
- }
-
- public void testUnion()
- {
- AxiomaticSet set1 =
- _ancestorsOfInputText.union(_ancestorsOfCommandButton);
- set1 = new ElementToTagIdentifierMapping().map(set1);
- assertEquals(5, set1.size());
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_FORM));
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_VIEW));
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID));
-
- AxiomaticSet set2 =
- _ancestorsOfOutputText.union(_ancestorsOfCommandButton);
- set2 = new ElementToTagIdentifierMapping().map(set2);
- assertEquals(5, set2.size());
- assertTrue(set2.contains(IJSFConstants.TAG_IDENTIFIER_FORM));
- assertTrue(set2.contains(IJSFConstants.TAG_IDENTIFIER_VIEW));
- assertFalse(set2.contains(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID));
- }
-
- public void testIsDisjoint()
- {
- assertFalse(_ancestorsOfInputText.isDisjoint(_ancestorsOfCommandButton));
- assertFalse(_ancestorsOfInputText.isDisjoint(_ancestorsOfOutputText));
- assertFalse(_ancestorsOfInputText.isDisjoint(_ancestorsOfInputText));
-
- assertTrue(_ancestorsOfInputText.isDisjoint(_inputTextSingletonSet));
- assertTrue(_ancestorsOfOutputText.isDisjoint(_inputTextSingletonSet));
- assertTrue(_ancestorsOfCommandButton.isDisjoint(_inputTextSingletonSet));
- }
-
- public void testSubtract()
- {
- // the only non-common parent is the panel grid
- AxiomaticSet set1 = _ancestorsOfInputText.subtract(_ancestorsOfCommandButton);
- set1 = new ElementToTagIdentifierMapping().map(set1);
- assertEquals(1, set1.size());
- assertTrue(set1.contains(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID));
-
- // all of command button's parents are also parents of inputText
- set1 = _ancestorsOfCommandButton.subtract(_ancestorsOfInputText);
- set1 = new ElementToTagIdentifierMapping().map(set1);
- assertEquals(0, set1.size());
-
- // no common elements
- set1 = _ancestorsOfCommandButton.subtract(_inputTextSingletonSet);
- assertEquals(_ancestorsOfCommandButton, set1);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestElementToTagIdentifierMapping.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestElementToTagIdentifierMapping.java
deleted file mode 100644
index 2c6438e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestElementToTagIdentifierMapping.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.set;
-
-import org.eclipse.jst.jsf.core.tests.tagmatcher.BaseTagMatcherTestCase;
-
-public class TestElementToTagIdentifierMapping extends BaseTagMatcherTestCase
-{
- protected void setUp() throws Exception
- {
- _srcFileName = "/testfiles/jsps/testdata1.jsp.data";
- _destFileName = "/testdata1.jsp";
- super.setUp();
- }
-
- public void testElementToIdMapping()
- {
- // TODO:
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestMemberConstraint.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestMemberConstraint.java
deleted file mode 100644
index e4ca157..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestMemberConstraint.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.set;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.common.sets.ConcreteAxiomaticSet;
-import org.eclipse.jst.jsf.core.set.constraint.MemberConstraint;
-
-public class TestMemberConstraint extends TestCase
-{
- private AxiomaticSet _set1;
- private AxiomaticSet _set2;
- private AxiomaticSet _set3;
-
- private AxiomaticSet _constraintSet1;
- private AxiomaticSet _constraintSet2;
- private AxiomaticSet _constraintSet3;
-
- public void testMemberConstraint()
- {
- // A is always a subset of itself
- assertTrue(new MemberConstraint(_set1).passesConstraint(_set1));
- assertTrue(new MemberConstraint(_set2).passesConstraint(_set2));
- assertTrue(new MemberConstraint(_set3).passesConstraint(_set3));
-
- // constraint 1
- assertTrue(new MemberConstraint(_constraintSet1).passesConstraint(_set1));
- Diagnostic fail = new MemberConstraint(_constraintSet1).isSatisfied(_set2);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(1, fail.getData().size());
- assertTrue(fail.getData().contains("element2"));
- fail = new MemberConstraint(_constraintSet1).isSatisfied(_set3);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(1, fail.getData().size());
- assertTrue(fail.getData().contains("element2"));
-
- // constraint 2
- fail = new MemberConstraint(_constraintSet2).isSatisfied(_set1);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertTrue(fail.getData().contains("element7"));
- assertEquals(1, fail.getData().size());
- assertTrue(new MemberConstraint(_constraintSet2).passesConstraint(_set2));
- fail = new MemberConstraint(_constraintSet2).isSatisfied(_set3);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(1, fail.getData().size());
- assertTrue(fail.getData().contains("element7"));
-
- // constraint 3
- fail = new MemberConstraint(_constraintSet3).isSatisfied(_set1);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(1, fail.getData().size());
- assertTrue(fail.getData().contains("element7"));
- fail = new MemberConstraint(_constraintSet3).isSatisfied(_set2);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(2, fail.getData().size());
- assertTrue(fail.getData().contains("element1"));
- assertTrue(fail.getData().contains("element2"));
- fail = new MemberConstraint(_constraintSet3).isSatisfied(_set3);
- assertEquals(Diagnostic.ERROR, fail.getSeverity());
- assertEquals(2, fail.getData().size());
- assertTrue(fail.getData().contains("element2"));
- assertTrue(fail.getData().contains("element7"));
-
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
-
- List<String> items = new ArrayList<String>();
- items.add("element1");
- items.add("element2");
- items.add("element3");
- items.add("element4");
- _set1 = createSet(items);
-
- items.clear();
- items.add("element5");
- items.add("element6");
- items.add("element7");
- items.add("element8");
- _set2 = createSet(items);
-
- items.clear();
- items.add("element1");
- items.add("element5");
- _set3 = createSet(items);
-
- // setup a constraint set that will pass for set1
- // fail for set2 (they are disjoint) and fail for set3
- items.clear();
- items.add("element2");
- _constraintSet1 = createSet(items);
-
- // setup a constraint set that will pass for set2
- // fail for set1 and fail for set3
- items.clear();
- items.add("element7");
- _constraintSet2 = createSet(items);
-
- // setup a constraint set that will fail on all three
- // even though it has common element with all sets
- items.clear();
- items.add("element1"); // match 1 and 3
- items.add("element2"); // match 1
- items.add("element7"); // match 2
- _constraintSet3 = createSet(items);
- }
-
- @SuppressWarnings("unchecked")
- protected AxiomaticSet createSet(List<String> items)
- {
- ConcreteAxiomaticSet set = new ConcreteAxiomaticSet();
- set = new ConcreteAxiomaticSet();
- for (Iterator<String> it = items.iterator(); it.hasNext();)
- {
- set.add(it.next());
- }
- return set;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestXPathValidation.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestXPathValidation.java
deleted file mode 100644
index 7dfdc65..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestXPathValidation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.set;
-
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.common.sets.ConcreteAxiomaticSet;
-import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
-import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
-import org.eclipse.jst.jsf.core.set.constraint.MemberConstraint;
-import org.eclipse.jst.jsf.core.set.mapping.ElementToTagIdentifierMapping;
-import org.eclipse.jst.jsf.core.tagmatcher.XPathMatchingAlgorithm;
-import org.eclipse.jst.jsf.core.tests.tagmatcher.BaseTagMatcherTestCase;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public class TestXPathValidation extends BaseTagMatcherTestCase {
-
- protected void setUp() throws Exception
- {
- _srcFileName = "/testfiles/jsps/testdata1.jsp.data";
- _destFileName = "/testdata1.jsp";
-
- super.setUp();
- }
-
- @SuppressWarnings("unchecked")
- public void testValidateParentMembership()
- {
- AxiomaticSet inputAncestors = getAncestorsOfInputText();
-
- //map the set to TagIds
- inputAncestors = new ElementToTagIdentifierMapping().map(inputAncestors);
- // create constraint set: form and view must be parents of inputText
- AxiomaticSet constraintSet = new ConcreteAxiomaticSet();
- constraintSet.add(TagIdentifierFactory.createJSPTagWrapper(ITLDConstants.URI_JSF_HTML, "form"));
- constraintSet.add(TagIdentifierFactory.createJSPTagWrapper(ITLDConstants.URI_JSF_CORE, "view"));
-
- // create an apply member constraint
- MemberConstraint memberConstraint = new MemberConstraint(constraintSet);
- assertTrue(memberConstraint.passesConstraint(inputAncestors));
-
- // test a constraint set that isn't satisfied: no ancestor is inputLabel
- constraintSet.clear();
- constraintSet.add(TagIdentifierFactory.createJSPTagWrapper(ITLDConstants.URI_JSF_HTML, "inputLabel"));
- memberConstraint = new MemberConstraint(constraintSet);
- assertTrue(memberConstraint.failsConstraint(inputAncestors));
- }
-
- protected AxiomaticSet getAncestorsOfInputText()
- {
- Document doc = ((IDOMModel)_structuredModel).getDocument();
- System.out.println(System.currentTimeMillis());
- XPathMatchingAlgorithm matcher = new XPathMatchingAlgorithm("/view/html/body/form/panelGrid/inputText");
- AxiomaticSet set = matcher.evaluate(doc);
- assertEquals(1, set.size());
-
- // get all of the ancestors of the inputText
- final Node inputText = (Node) set.getFirstElement();
- matcher = new XPathMatchingAlgorithm("ancestor::*");
- return matcher.evaluate(inputText);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/ConcatStrategy.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/ConcatStrategy.java
deleted file mode 100644
index 14a5b90..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/ConcatStrategy.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.strategy;
-
-import java.util.regex.Pattern;
-
-import org.eclipse.jst.jsf.common.internal.strategy.IIdentifiableStrategy;
-
-class ConcatStrategy implements IIdentifiableStrategy<String, String, String>
-{
- private final Pattern _pattern;
- private final String _concat;
- private final String _id;
-
- public ConcatStrategy(final Pattern pattern, final String toConcat, final String id)
- {
- _pattern = pattern;
- _concat = toConcat;
- _id = id;
- }
-
- public String perform(String input) throws Exception
- {
- if (_pattern.matcher(input).matches())
- {
- return input.concat(_concat);
- }
- return getNoResult();
- }
-
- public String getNoResult()
- {
- return null;
- }
-
- public String getId()
- {
- return _id;
- }
-
- public String getDisplayName()
- {
- return "Concat strategy, id="+getId();
- }
-
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/StrategyCompositeTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/StrategyCompositeTests.java
deleted file mode 100644
index 67eb0b8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/StrategyCompositeTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.strategy;
-
-import static junit.framework.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import org.eclipse.jst.jsf.common.internal.strategy.SimpleStrategyComposite;
-import org.junit.Before;
-import org.junit.Test;
-
-
-public class StrategyCompositeTests
-{
- private ConcatStrategy _concatStrategyAAAbbb;
- private ConcatStrategy _concatStrategyAAAccc;
- private ConcatStrategy _concatStrategyBBBccc;
- private ConcatStrategy _concatStrategyCCCaaa;
- private List<ConcatStrategy> _strategies;
-
- @Before
- public void setup() throws Exception
- {
- _concatStrategyAAAbbb = new ConcatStrategy(Pattern.compile("^AAA.*"), "bbb", "AAA");
- _concatStrategyAAAccc = new ConcatStrategy(Pattern.compile("^AAA.*"), "ccc", "AAA");
- _concatStrategyBBBccc = new ConcatStrategy(Pattern.compile("^BBB.*"), "ccc", "BBB");
- _concatStrategyCCCaaa = new ConcatStrategy(Pattern.compile("^CCC.*"), "aaa", "CCC");
- _strategies = new ArrayList<ConcatStrategy>();
- _strategies.add(_concatStrategyAAAbbb);
- _strategies.add(_concatStrategyAAAccc);
- _strategies.add(_concatStrategyBBBccc);
- _strategies.add(_concatStrategyCCCaaa);
- }
-
- @Test
- public void testDefaultPerform()
- {
- SimpleStrategyComposite<String, String, String, String, ConcatStrategy> testComposite
- = new SimpleStrategyComposite<String, String, String, String, ConcatStrategy>(_strategies);
- assertEquals("AAAbbb", testComposite.perform("AAA"));
- assertEquals("AAAqqqbbb", testComposite.perform("AAAqqq"));
- assertEquals("BBBtccc", testComposite.perform("BBBt"));
- assertEquals("CCC_____aaa", testComposite.perform("CCC_____"));
- }
-
-// @Test
-// public void testListMergePerform()
-// {
-// final List<String> composedResult = new ArrayList<String>();
-// new MergingCompositionStrategy.ListMergingCompositionStrategy<String, List<String>, ConcatStrategy>(composedResult, Collections.EMPTY_LIST);
-// SimpleStrategyComposite<String, String, String, ConcatStrategy> testComposite
-// = new SimpleStrategyComposite<String, String, String, ConcatStrategy>(_strategies,
-// );
-// }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/BaseTagMatcherTestCase.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/BaseTagMatcherTestCase.java
deleted file mode 100644
index 4e7d89d..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/BaseTagMatcherTestCase.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.tagmatcher;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.tagmatcher.XPathMatchingAlgorithm;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-
-
-public class BaseTagMatcherTestCase extends TestCase {
- /**
- * The dynamic web project test environment
- */
- protected WebProjectTestEnvironment _testEnv;
- /**
- * A handle to the Java project test environment
- */
- protected JDTTestEnvironment _jdtTestEnv;
- /**
- * Name of the test data file containing the JSP source for this test
- */
- protected String _srcFileName;
- /**
- * Name of the file and path where the JSP source should be put in the
- * test project
- */
- protected String _destFileName;
-
- /**
- * The file handle to the JSP in the workspace
- */
- protected IFile _testJSP;
- /**
- * The SSE structured model for the JSP
- */
- protected IStructuredModel _structuredModel;
- /**
- * The SSE structured document for the JSP
- */
- protected IStructuredDocument _structuredDocument;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
-
- _testEnv = new WebProjectTestEnvironment("ELValidationTest_"+this.getClass().getName()+"_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- // load a dummy tld for core
- // NOTE: the TLDs seem to need to be loaded BEFORE any JSPs that use them.
- // probably adding the jsp kicks off something that searches for TLD's that doesn't
- // get kicked if the TLDs are added after.
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/myfaces_core.tld.data", "META-INF/myfaces_core.tld");
-
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/myfaces_html.tld.data", "META-INF/myfaces_html.tld");
-
- _testJSP = (IFile) _testEnv.loadResourceInWebRoot
- (TestsPlugin.getDefault().getBundle(),
- _srcFileName, _destFileName);
-
- _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
- _structuredDocument = _structuredModel.getStructuredDocument();
-
- // initialize test case for faces 1.1
- JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- if (_structuredModel != null)
- {
- _structuredModel.releaseFromRead();
- }
- _testEnv.getTestProject().close(null);
- }
-
- protected final AxiomaticSet getAncestorsOf(String xpathToChild, int expectedAncestors)
- {
- Document doc = ((IDOMModel)_structuredModel).getDocument();
- XPathMatchingAlgorithm matcher = new XPathMatchingAlgorithm(xpathToChild);
- AxiomaticSet set = matcher.evaluate(doc);
- assertEquals(1, set.size());
-
- // get all of the ancestors of the inputText
- final Node inputText = (Node) set.getFirstElement();
- matcher = new XPathMatchingAlgorithm("ancestor::*");
- AxiomaticSet result = matcher.evaluate(inputText);
-
- assertNotNull(result);
-
- if (expectedAncestors >= 0)
- {
- assertEquals(expectedAncestors, result.size());
- }
-
- return result;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/TestXPathTagMatcher.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/TestXPathTagMatcher.java
deleted file mode 100644
index 6e8dfbe..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/TestXPathTagMatcher.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.tagmatcher;
-
-import java.util.Iterator;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.common.sets.AxiomaticSet;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
-import org.eclipse.jst.jsf.core.internal.tld.CMUtil;
-import org.eclipse.jst.jsf.core.set.mapping.ElementToTagIdentifierMapping;
-import org.eclipse.jst.jsf.core.tagmatcher.XPathMatchingAlgorithm;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-public class TestXPathTagMatcher extends BaseTagMatcherTestCase {
-
- protected void setUp() throws Exception {
- _srcFileName = "/testfiles/jsps/testdata1.jsp.data";
- _destFileName = "/testdata1.jsp";
- super.setUp();
- }
-
- public void testSimpleMatches()
- {
- // get the view tag
- Document doc = ((IDOMModel)_structuredModel).getDocument();
- System.out.println(System.currentTimeMillis());
- XPathMatchingAlgorithm viewMatcher = new XPathMatchingAlgorithm("/view");
- AxiomaticSet set = viewMatcher.evaluate(doc);
- System.out.println(System.currentTimeMillis());
-
- // get an input nested along a form path
- assertEquals(1, set.size());
- IStructuredDocumentContext context =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_structuredDocument, 529);
- IDOMContextResolver resolver =
- IStructuredDocumentContextResolverFactory.INSTANCE
- .getDOMContextResolver(context);
-
- Node node = resolver.getNode();//(Node) set.getFirstElement();
- assertEquals("f:view", node.getNodeName());
- System.out.println(CMUtil.getElementNamespaceURI((Element) node));
- XPathMatchingAlgorithm matcher = new XPathMatchingAlgorithm("html/body/form/panelGrid/inputText");
- set = matcher.evaluate(node);
- System.out.println(System.currentTimeMillis());
- assertEquals(1, set.size());
-
- // get all of the ancestors of the inputText
- final Node inputText = (Node) set.getFirstElement();
- System.out.println(CMUtil.getElementNamespaceURI((Element) inputText));
- matcher = new XPathMatchingAlgorithm("ancestor::*");
- set = matcher.evaluate(inputText);
- assertEquals(5,set.size());
-
- set = new ElementToTagIdentifierMapping().map(set);
-
- for (final Iterator<?> it = set.iterator(); it.hasNext();)
- {
- TagIdentifier tagId = (TagIdentifier) it.next();
- System.out.println(tagId.getUri());
- System.out.println(tagId.getTagName());
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeComparatorTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeComparatorTests.java
deleted file mode 100644
index 3f76745..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeComparatorTests.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.core.tests.types;
-
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.jsf.common.internal.types.CompositeType;
-import org.eclipse.jst.jsf.common.internal.types.IAssignable;
-import org.eclipse.jst.jsf.common.internal.types.TypeComparator;
-import org.eclipse.jst.jsf.common.internal.types.TypeComparatorDiagnosticFactory;
-import org.eclipse.jst.jsf.common.internal.types.TypeComparatorPreferences;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-
-/**
- * Unit tests for the composite type comparator. Indirectly exercises
- * type transfomer and coercers.
- *
- * @author cbateman
- *
- */
-public class TypeComparatorTests extends TestCase
-{
- // basic types
- private final CompositeType simpleString =
- new CompositeType("Ljava.lang.String;", IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType simpleInteger =
- new CompositeType(Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType simpleLong =
- new CompositeType(Signature.SIG_LONG, IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType simpleBoolean =
- new CompositeType(Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType simpleDouble =
- new CompositeType(Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
-
- // boxed types
- private final CompositeType boxedInteger =
- new CompositeType("Ljava.lang.Integer;", IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType boxedLong =
- new CompositeType("Ljava.lang.Long;", IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType boxedBoolean =
- new CompositeType("Ljava.lang.Boolean;", IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType boxedDouble =
- new CompositeType("Ljava.lang.Double;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- // single interface types
- private final CompositeType comparableType =
- new CompositeType("Ljava.lang.Comparable;", IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType mapType =
- new CompositeType("Ljava.util.Map;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
-
- // multi-types
- private final CompositeType objectAndComparable =
- new CompositeType(new String[] {"Ljava.lang.Object;", "Ljava.lang.Comparable;"}
- , IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType objectAndMap =
- new CompositeType(new String[] {"Ljava.lang.Object;", "Ljava.util.Map;"}
- , IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType objectAndCollection =
- new CompositeType(new String[] {"Ljava.lang.Object;", "Ljava.util.Collection;"}
- , IAssignable.ASSIGNMENT_TYPE_RHS);
-
- // read/write types
- private final CompositeType readWritePrimitiveLong =
- new CompositeType(Signature.SIG_LONG,
- IAssignable.ASSIGNMENT_TYPE_RHS | IAssignable.ASSIGNMENT_TYPE_LHS);
- private final CompositeType readWriteString =
- new CompositeType("Ljava.lang.String;",
- IAssignable.ASSIGNMENT_TYPE_LHS | IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType readWriteObject =
- new CompositeType("Ljava.lang.Object;",
- IAssignable.ASSIGNMENT_TYPE_LHS | IAssignable.ASSIGNMENT_TYPE_RHS);
- private final CompositeType writeOnlyObject =
- new CompositeType("Ljava.lang.Object;",IAssignable.ASSIGNMENT_TYPE_LHS);
-
- // method types
- private final static String actionMethodSig =
- Signature.createMethodSignature(new String[0]
- , "Ljava.lang.String;");
- private final static String actionListenerSig =
- Signature.createMethodSignature
- (new String[]{"Ljavax.faces.event.ActionEvent;"}
- , Signature.SIG_VOID);
- private final static String hasReturnAndArgSig =
- Signature.createMethodSignature
- (new String[]{"Ljavax.faces.event.ActionEvent;"}
- , "Ljava.lang.String;");
- private final static String sameNumArgsDiffTypeSig =
- Signature.createMethodSignature
- (new String[]{"Ljava.lang.String;"}
- , "Ljava.lang.String;");
-
- private final CompositeType actionMethod =
- new CompositeType(actionMethodSig,
- IAssignable.ASSIGNMENT_TYPE_NONE);
- private final CompositeType actionListener =
- new CompositeType(actionListenerSig,
- IAssignable.ASSIGNMENT_TYPE_NONE);
- private final CompositeType hasReturnAndArg =
- new CompositeType(hasReturnAndArgSig,
- IAssignable.ASSIGNMENT_TYPE_NONE);
-
- private final CompositeType actionAndActionListener =
- new CompositeType(new String[] {actionMethodSig, actionListenerSig}
- , IAssignable.ASSIGNMENT_TYPE_NONE);
- private final CompositeType sameNumArgsDiffType =
- new CompositeType(new String[] {sameNumArgsDiffTypeSig}
- , IAssignable.ASSIGNMENT_TYPE_NONE);
-
- private final CompositeType takesUnboxedInt =
- new CompositeType(Signature.createMethodSignature(new String[]{Signature.SIG_INT}, Signature.SIG_VOID)
- , IAssignable.ASSIGNMENT_TYPE_NONE);
- private final CompositeType takesBoxedInt =
- new CompositeType(Signature.createMethodSignature(new String[]{TypeConstants.TYPE_BOXED_INTEGER}, Signature.SIG_VOID)
- , IAssignable.ASSIGNMENT_TYPE_NONE);
-
-
- private TypeComparator _typeComparator;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- _typeComparator = new TypeComparator(new TypeComparatorDiagnosticFactory(new TypeComparatorPreferences()));
- }
-
- /**
- * Sanity check on simple types
- */
- public void testSimpleTypes()
- {
- // simple integers always same
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, simpleInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple longs always same
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, simpleLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple double always same
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, simpleDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple boolean always same
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleBoolean, simpleBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple strings always same
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleString, simpleString);
- assertTrue(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * test type compatibility coercing to integer
- */
- public void testIntegerCoercions()
- {
- // simple longs can coerce to integer
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, simpleLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple doubles can coerce to integer
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, simpleDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // strings can coerce to integer
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, simpleString);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // booleans cannot coerce to integer
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, simpleBoolean);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * test type compatibility coercing to long
- */
- public void testLongCoercions()
- {
- // simple integer can coerce to long
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, simpleInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple doubles can coerce to long
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, simpleDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // strings can coerce to long
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, simpleString);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // booleans cannot coerce to long
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, simpleBoolean);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-
- public void testBooleanCoercions()
- {
- // noop: boolean should always coerce to boolean
- Diagnostic result =
- _typeComparator.calculateTypeCompatibility
- (simpleBoolean, simpleBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // noop: works also for boxed
- result =
- _typeComparator.calculateTypeCompatibility
- (simpleBoolean, boxedBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // noop: works also for boxed
- result =
- _typeComparator.calculateTypeCompatibility
- (boxedBoolean, simpleBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // always coerce strings to booleans
- result =
- _typeComparator.calculateTypeCompatibility
- (simpleBoolean, simpleString);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // no number -> boolean coercion
- result =
- _typeComparator.calculateTypeCompatibility
- (simpleBoolean, simpleDouble);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-
-
- /**
- * test type compatibility coercing to double
- */
- public void testDoubleCoercions()
- {
- // simple longs can coerce to double
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, simpleLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // simple integer can coerce to double
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, simpleInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // strings can coerce to double
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, simpleString);
-
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // booleans cannot coerce to double
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, simpleBoolean);
-
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
- /**
- * test type compatibility coercing to string
- */
- public void testStringCoercions()
- {
- // everything coerces to String
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleString, simpleLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // everything coerces to String
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleString, simpleDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // everything coerces to String
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleString, simpleInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // everything coerces to String
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleString, simpleBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * Test compatibilty of boxed types when their simple type is expected
- */
- public void testSimpleToBoxConversions()
- {
- // Integer should convert to int
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(simpleInteger, boxedInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // Long should convert to long
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleLong, boxedLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // Double should convert to double
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleDouble, boxedDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // Boolean should convert to boolean
- result =
- _typeComparator.
- calculateTypeCompatibility(simpleBoolean, boxedBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * Test compatibilty of simple types when their boxed type is expected
- */
- public void testBoxToSimpleConversions()
- {
- // int should convert to Integer
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(boxedInteger, simpleInteger);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // long should convert to Long
- result =
- _typeComparator.
- calculateTypeCompatibility(boxedLong, simpleLong);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // double should convert to Double
- result =
- _typeComparator.
- calculateTypeCompatibility(boxedDouble, simpleDouble);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // boolean should convert to Boolean
- result =
- _typeComparator.
- calculateTypeCompatibility(boxedBoolean, simpleBoolean);
- assertTrue(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * Test compatiblity when an interface is expected against a list of
- * possible types
- */
- public void testObjectLists()
- {
- // check for comparable
- Diagnostic result =
- _typeComparator.
- calculateTypeCompatibility(comparableType, objectAndComparable);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // not comparable
- result = _typeComparator.
- calculateTypeCompatibility(comparableType, objectAndCollection);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // check for map
- result =
- _typeComparator.
- calculateTypeCompatibility(mapType, objectAndMap);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // not map
- result = _typeComparator.
- calculateTypeCompatibility(mapType, objectAndCollection);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-
- /**
- * Tests assignability, for example when read/write expected, but only
- * read-only returned.
- */
- public void testAssignability()
- {
- // can assign read/write to read-only
- Diagnostic result =
- _typeComparator.calculateTypeCompatibility(simpleLong, readWritePrimitiveLong);
- assertEquals(result.getSeverity(), Diagnostic.OK);
-
- // can NOT assign read-only to read/write
- result =
- _typeComparator.calculateTypeCompatibility(readWritePrimitiveLong, simpleLong);
- assertNotSame(result.getSeverity(), Diagnostic.OK);
-
- // check bi-directional type comparison -- e.g when a read/write string
- // is expected, we can always coerce object to string.
- result =
- _typeComparator.calculateTypeCompatibility(readWriteString, readWriteObject);
- assertNotSame(result.getSeverity(), Diagnostic.OK);
-
- // this should fail because a readable object is expected, but one
- // is not provided (i.e. "not gettable")
- result =
- _typeComparator.calculateTypeCompatibility(readWriteObject, writeOnlyObject);
- assertNotSame(result.getSeverity(), Diagnostic.OK);
- }
-
- public void testMethodSignatures()
- {
- // compare a method to itself should always work; return type, no args
- Diagnostic result =
- _typeComparator.calculateTypeCompatibility(actionMethod, actionMethod);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // compare same when method has no return but args
- result =
- _typeComparator.calculateTypeCompatibility(actionListener, actionListener);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // methods are not compatible
- result =
- _typeComparator.calculateTypeCompatibility(actionMethod, actionListener);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // reverse order makes no diff
- result =
- _typeComparator.calculateTypeCompatibility(actionListener,actionMethod);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // same signature must succeed
- result =
- _typeComparator.calculateTypeCompatibility(hasReturnAndArg,hasReturnAndArg);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // boxed vs. unboxed arguments should succeed for same type
- result = _typeComparator.calculateTypeCompatibility(takesBoxedInt, takesUnboxedInt);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // and in reverse...
- result = _typeComparator.calculateTypeCompatibility(takesUnboxedInt, takesBoxedInt);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // won't satify, event though return matches
- result = _typeComparator.calculateTypeCompatibility(actionMethod, hasReturnAndArg);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // nor in reverse..
- result = _typeComparator.calculateTypeCompatibility(hasReturnAndArg, actionMethod);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // won't satify, event though args matches
- result = _typeComparator.calculateTypeCompatibility(actionListener, hasReturnAndArg);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // nor in reverse...
- result = _typeComparator.calculateTypeCompatibility(hasReturnAndArg, actionListener);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // check same return and arg count, diff arg
- result = _typeComparator.calculateTypeCompatibility(hasReturnAndArg, sameNumArgsDiffType);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
-
- // test multiple
-
- // this will succeed because actionMethod is in the list
- result = _typeComparator.calculateTypeCompatibility(actionAndActionListener, actionMethod);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // this will succeed because actionListener is in the list
- result = _typeComparator.calculateTypeCompatibility(actionAndActionListener, actionListener);
- assertTrue(result.getSeverity() == Diagnostic.OK);
-
- // this will fail because hasReturnAndArg is not in the list
- result = _typeComparator.calculateTypeCompatibility(actionAndActionListener, hasReturnAndArg);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-
- public void testValueMethodMix()
- {
- // a value binding will never be compatible with a method binding
- Diagnostic result =
- _typeComparator.calculateTypeCompatibility(actionMethod, readWriteObject);
- assertFalse(result.getSeverity() == Diagnostic.OK);
-
- // nor in reverse...
- result =
- _typeComparator.calculateTypeCompatibility(readWriteObject,actionMethod);
- assertFalse(result.getSeverity() == Diagnostic.OK);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeTransformerTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeTransformerTests.java
deleted file mode 100644
index faed0c6..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeTransformerTests.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.core.tests.types;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.jsf.common.internal.types.CompositeType;
-import org.eclipse.jst.jsf.common.internal.types.IAssignable;
-import org.eclipse.jst.jsf.common.internal.types.TypeTransformer;
-
-/**
- * @author cbateman
- *
- */
-public class TypeTransformerTests extends TestCase {
-
- private final static CompositeType primitiveLong =
- new CompositeType("J", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType primitiveInteger =
- new CompositeType("I", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType primitiveLongArray =
- new CompositeType("[J", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType primitiveIntegerArrayArray =
- new CompositeType("[[I", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType boxedLong =
- new CompositeType("Ljava.lang.Long;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType boxedInteger =
- new CompositeType("Ljava.lang.Integer;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType boxedLongArray =
- new CompositeType("[Ljava.lang.Long;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- private final static CompositeType boxedIntegerArrayArray =
- new CompositeType("[[Ljava.lang.Integer;", IAssignable.ASSIGNMENT_TYPE_RHS);
-
- /**
- * Simple test for boxing primitives
- */
- public void testBoxPrimitives()
- {
- CompositeType newType = TypeTransformer.transformBoxPrimitives(primitiveLong);
- assertTrue(exactMatch(newType, boxedLong));
- newType = TypeTransformer.transformBoxPrimitives(primitiveInteger);
- assertTrue(exactMatch(newType, boxedInteger));
- newType = TypeTransformer.transformBoxPrimitives(primitiveLongArray);
- assertTrue(exactMatch(newType, boxedLongArray));
- newType = TypeTransformer.transformBoxPrimitives(primitiveIntegerArrayArray);
- assertTrue(exactMatch(newType, boxedIntegerArrayArray));
- }
-
- /**
- * Simple test for unboxing primitives
- */
- public void testUnboxPrimitives()
- {
- CompositeType newType = TypeTransformer.transformUnboxPrimitives(boxedLong);
- assertTrue(exactMatch(newType, primitiveLong));
- newType = TypeTransformer.transformUnboxPrimitives(boxedInteger);
- assertTrue(exactMatch(newType, primitiveInteger));
- newType = TypeTransformer.transformUnboxPrimitives(boxedLongArray);
- assertTrue(exactMatch(newType, primitiveLongArray));
- newType = TypeTransformer.transformUnboxPrimitives(boxedIntegerArrayArray);
- assertTrue(exactMatch(newType, primitiveIntegerArrayArray));
- }
-
-
- private static boolean exactMatch(CompositeType t1, CompositeType t2)
- {
- String[] s1 = t1.getSignatures();
- String[] s2 = t2.getSignatures();
-
- if (s1.length != s2.length)
- {
- return false;
- }
-
- for (int i = 0; i < s1.length; i++)
- {
- if (!s1[i].equals(s2[i]))
- {
- return false;
- }
- }
-
- // if we get to here, just verify assignability
- if (t1.getAssignmentTypeMask() != t2.getAssignmentTypeMask())
- {
- return false;
- }
-
- // if we get to here, then signatures and assignability match
- // exactly. So exactMatch
- return true;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFCoreUtilHelper.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFCoreUtilHelper.java
deleted file mode 100644
index 042f721..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFCoreUtilHelper.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Oracle Corporation.
- * 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:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.util;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.jst.j2ee.internal.web.archive.operations.WebFacetProjectCreationDataModelProvider;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver;
-import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
-import org.eclipse.jst.jsf.context.symbol.ISymbol;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.eclipse.jst.jsf.core.internal.AbstractTagRegistryFactoryProvider;
-import org.eclipse.jst.jsf.core.internal.CompositeTagRegistryFactory;
-import org.eclipse.jst.jsf.core.internal.ITagRegistryFactoryInfo;
-import org.eclipse.jst.jsf.core.internal.ITagRegistryFactoryProvider;
-import org.eclipse.jst.jsf.core.internal.jsflibraryconfig.JSFLibraryRegistryUtil;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryFactory;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.mock.MockJSPTagRegistry;
-import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
-import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory;
-import org.eclipse.jst.jsf.designtime.resolver.ISymbolContextResolver;
-import org.eclipse.jst.jsf.designtime.resolver.StructuredDocumentSymbolResolverFactory;
-import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-@SuppressWarnings("deprecation")
-public final class JSFCoreUtilHelper
-{
- private static final String JSFRUNTIMEJARSDIR = "jsfRuntimeJarsDirectoryV";
- private static String JSF11Path = "";
- private static String JSF12Path = "";
- private static String JSF20Path = "";
-
- /**
- * Constructs jsfLib using this plugin's install path and "testfiles" subdirectory
- * @param id
- * @param name
- * @param archivefiles
- * @param bImpl
- * @return
- */
- public static JSFLibrary constructJSFLib(
- final String id,
- final String name,
- final String[] archivefiles,
- final boolean bImpl) {
-
- final String pathTestFiles = TestsPlugin.getInstallLocation().getPath() + "testfiles/";
-
- return constructJSFLib(id, name, pathTestFiles, archivefiles, bImpl);
- }
-
- /**
- * @param id
- * @param name
- * @param pluginRelativePathToArchiveFiles
- * @param archivefiles
- * @param bImpl
- * @return JSF Library
- */
- public static JSFLibrary constructJSFLib(
- final String id,
- final String name,
- final String basePathToArchiveFiles,
- final String[] archivefiles,
- final boolean bImpl) {
-
- ArchiveFile archiveFile = null;
- String testData;
- final JSFLibrary jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
-// jsfLib.setID(id);
- jsfLib.setName(name);
- jsfLib.setImplementation(bImpl);
-
- for (final String archivefile2 : archivefiles) {
- testData = basePathToArchiveFiles + archivefile2;
- archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(testData);
- archiveFile.setJSFLibrary(jsfLib);
- }
-
- return jsfLib;
- }
-
- /**
- * Create a Dynamic Web application with given name using default operation.
- * If project with given name already exists, then it returns that project.
- *
- * @param aProjectName Project name.
- * @return IProject instance.
- * @throws Exception on error.
- */
- public static IProject createWebProject(final String aProjectName) throws Exception {
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(aProjectName);
- if (!project.exists()) {
- final IDataModel dataModel = DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider());
- dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProjectName);
- dataModel.getDefaultOperation().execute(new NullProgressMonitor(), null);
- }
- return ResourcesPlugin.getWorkspace().getRoot().getProject(aProjectName);
- }
-
- /**
- * If the JSF Library registry is empty, it will seed it with an Impl and non-Impl library
- */
- public static void createJSFLibraryRegistry(){
- if (JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getAllJSFLibraries().size() < 2){
- //create Impl
- JSFLibrary lib = constructJSFLib("AN-IMPL-LIB", "/testfiles/JSFLib/", true, false);
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().addJSFLibrary(lib);
- //create non-Impl. Uses same jars but declares it to be non implementation
- lib = constructJSFLib("A-NON-IMPL-LIB", "/testfiles/JSFLib/", false, false);
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().addJSFLibrary(lib);
- //create plugin impl
- lib = constructJSFLib("AN-IMPL-LIB-PP", "/testfiles/JSFLib/", true, true);
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().addJSFLibrary(lib);
- //create plugin-non impl
-
- }
- }
-
- /**
- * Convenience method to get new JSFLibraryRegistry instance from factory.
- * Note that the returned instance is not associated with a resource and so
- * cannot be loaded or saved unless a resource is created and the returned
- * instance is set in the resource contents.
- *
- * @return JSFLibraryRegistry instance.
- */
- public static JSFLibraryRegistry getNewJSFLibraryRegistry() {
- return JSFLibraryRegistryFactory.eINSTANCE.createJSFLibraryRegistry();
- }
-
- /**
- * Convenience method to get the JSFLibraryRegistry instance
- * (which will cause the loadJSFLibraryRegistry() and
- * loadJSFLibraryExtensions() methods to be called and will
- * subsequently allow saveJSFLibraryRegistry() to be called,
- * if desired).
- *
- * @return JSFLibraryRegistry instance from JSFCorePlugin.
- */
- public static JSFLibraryRegistry getJSFLibraryRegistryFromJSFLibraryHelper() {
- return JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
- }
-
- /**
- * Creates a JSF Library from all the jars and zips found at the relative path from this plugin
- *
- * @param name
- * @param relPathToArchives
- * @param isImpl
- * @param isFakedPlugginLib
- * @return JSFLibrary
- */
- public static JSFLibrary constructJSFLib(
- final String name,
- final String relPathToArchives,
- final boolean isImpl,
- final boolean isFakedPlugginLib) {
-
- JSFLibrary jsfLib = null;
- if (isFakedPlugginLib){
- jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createPluginProvidedJSFLibrary();
-// jsfLib.setID("fakePluginLib_"+name);
- } else {
- jsfLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
- }
-
- jsfLib.setName(name);
- jsfLib.setImplementation(isImpl);
-
- final File pathTestFiles = new File(TestsPlugin.getInstallLocation().getPath()
- + File.separator + relPathToArchives);
- final FilenameFilter jars = new FilenameFilter(){
- public boolean accept(File dir, String name_) {
- if (name_.length() >=5){
- String lastChars = name_.toLowerCase().substring(name_.length() - 4);
- if (lastChars.equals(".jar") || lastChars.equals(".zip")) {
- return true;
- }
- }
- return false;
- }
- };
-
- final String[] fileNames = pathTestFiles.list(jars);
- for (final String fileName2 : fileNames) {
- final String fileName = pathTestFiles.getAbsolutePath().concat(File.separator).concat(fileName2);
- final ArchiveFile archiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
- archiveFile.setRelativeToWorkspace(false);
- archiveFile.setSourceLocation(fileName);
- archiveFile.setJSFLibrary(jsfLib);
- }
-
- return jsfLib;
- }
-
- /**
- * @param jsfVersion
- * @return Directory name for jsf runtime jars.
- * <br>Will be null if not set in JSFRUNTIMEJARSDIRV<b>X.X</b> system property
- */
- public static String getJSFRuntimeJarsDirectory(final JSFVersion jsfVersion) {
- final String propertyName = JSFRUNTIMEJARSDIR+jsfVersion.toString();
- String res = System.getProperty(propertyName);
- if (res == null) {
- //check env var also
- res = System.getenv(propertyName);
- }
-
- // do some tracing the first time a new value is returned for 1.1 or 1.2
- if (jsfVersion == JSFVersion.V1_1
- && JSF11Path != res)
- {
- System.out.printf("Using jsf runtime path %s for propertyName %s\n", res, propertyName);
- JSF11Path = res;
- }
- else if (jsfVersion == JSFVersion.V1_2
- && JSF12Path != res)
- {
- System.out.printf("Using jsf runtime path %s for propertyName %s\n", res, propertyName);
- JSF12Path = res;
- }
- else if (jsfVersion == JSFVersion.V2_0
- && JSF20Path != res) {
- System.out.printf("Using jsf runtime path %s for propertyName %s\n", res, propertyName);
- JSF20Path = res;
- }
- return res;
- }
-
- /**
- * Returns true if the environment property holding the name of the directory that points at the
- * runtime jars exist.
- * <p>
- * The expected property name is jsfRuntimeJarsDirectoryVXX where XX is the
- * JSFVersion. <br>i.e "jsfRuntimeJarsDirectoryV1.1", or "jsfRuntimeJarsDirectoryV1.2"
- * <p>
- * It <b>does</b> check for the existence of the directory.<br>
- * It <b>does not</b> check for any jars within that directory.
- *
- * @param jsfVersion as String. ie. "1.1", or "1.2"
- * @return true if the property is set
- */
- public static boolean isJSFRuntimeJarsDirectoryPropertySet(final JSFVersion jsfVersion) {
- final String dirName = getJSFRuntimeJarsDirectory(jsfVersion);
- if (dirName != null && dirName.trim().length() != 0)
- {
- final File dir = new File(dirName);
-
- if (dir.exists() && dir.isDirectory())
- {
- return true;
- }
- else
- {
- System.err.printf("Dir: %s either doesn't exists or is not a directory\n",dirName);
- }
- }
- else
- {
- System.err.println("dirName is null");
- }
-
- return false;
- }
-
- public static boolean createRegistryAndAddReferences(final JSFFacetedTestEnvironment jsfFacedEnv, final String[] archiveFiles, final JSFVersion jsfVersion) throws CoreException {
- final JSFLibraryRegistry jsfLibRegistry =
- JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
-
- if (archiveFiles != null)
- {
- final String libIDandName = "_internalJSFRuntimeLibraryV" + jsfVersion + "_";
- final JSFLibrary jsfImpl = JSFCoreUtilHelper.
- constructJSFLib(libIDandName, libIDandName,"", archiveFiles, true);
- jsfLibRegistry.addJSFLibrary(jsfImpl);
- JSFLibraryRegistryUtil.getInstance().saveJSFLibraryRegistry();
- jsfFacedEnv.addJSFLibraryReference(jsfImpl, true);
- return true;
- }
-
- return false;
- }
-
- public static String[] getJSFRuntimeJarNames(final JSFVersion version) throws IOException
- {
- String[] jarNames = null;
- final String dirName = getJSFRuntimeJarsDirectory(version);
- System.out.printf("Using dirName: %s\n", dirName);
- if (dirName != null) {
- final File dir = new File(dirName);
- if (dir.exists() && dir.isDirectory()) {
- final File[] jars = dir.listFiles();
- if (jars != null && jars.length > 0) {
- jarNames = new String[jars.length];
- for (int i = 0; i < jars.length; i++) {
- jarNames[i] = jars[i].getAbsolutePath();
- }
- }
- }
- else
- {
- throw new FileNotFoundException(dirName+" is either does not exist or is not a directory");
- }
- }
- else
- {
- throw new FileNotFoundException("dirName is null");
- }
- return jarNames;
- }
-
- public static boolean isJSFRuntimeJarsDirectoryValid(final JSFVersion jsfVersion)
- {
- try
- {
- return getJSFRuntimeJarNames(jsfVersion) != null;
- }
- catch (final IOException e)
- {
- return false;
- }
- }
-
- /**
- * Attempts to create and initialize a JSF library for the jar files stored at the location
- * pointed to by the standard env variable (@see getJSFRuntimeJarsDirectory)
- * @param jsfVersion
- * @param jsfFacetedTestEnv
- * @return true if successful
- * @throws Exception
- */
- public static boolean addJSFRuntimeJarsToClasspath(final JSFVersion jsfVersion, final JSFFacetedTestEnvironment jsfFacetedTestEnv) throws Exception
- {
- final String[] jarNames = getJSFRuntimeJarNames(jsfVersion);
- return createRegistryAndAddReferences(jsfFacetedTestEnv, jarNames, jsfVersion);
- }
-
- /**
- * @param testClass
- * @param jsfVersion
- * @return a message informing a test suite runner that the environment variable
- * isn't correct for finding JSF library jar files
- */
- public static String getTestRequiresJSFRuntimeMessage(final Class<?> testClass, final JSFVersion jsfVersion) {
- final StringBuffer sb = new StringBuffer();
- sb.append("Unable to run test suite \"");
- sb.append(testClass.getName());
- sb.append("\"; JSF runtime (v");
- sb.append(jsfVersion.toString());
- sb.append(") is required but not present.\nSystem property or environment variable \"jsfRuntimeJarsDirectoryV");
- sb.append(jsfVersion.toString());
- sb.append("\" must be set to point to a directory containing JSF runtime (v");
- sb.append(jsfVersion.toString());
- sb.append(") JARs.");
- return sb.toString();
- }
-// /**
-// * Creates a JSF Library from all the jars and zips found at the relative
-// * path from this plugin.
-// *
-// * @param ID
-// * @param name
-// * @param relPathToArchives
-// * @param isImpl
-// * @param isFakedPlugginLib
-// * @return JSFLibrary
-// */
-// public static JSFLibrary constructJSFLib(
-// String ID,
-// String name,
-// String relPathToArchives,
-// boolean isImpl,
-// boolean isFakedPlugginLib) {
-//
-// JSFLibrary jsfLib = constructJSFLib(name, relPathToArchives, isImpl, isFakedPlugginLib);
-//// jsfLib.setID(ID);
-// return jsfLib;
-// }
-
- /**
- * @param jspFile
- * @param offset
- * @return the context wrapper. Caller must ensure dispose is called so
- * model is released when finished.
- * @throws Exception
- */
- public static void assertELSanity(final IFile jspFile, final int offset,
- final String attrName, final String elExpr) throws Exception {
- ContextWrapper wrapper = null;
- try {
- wrapper = JSFCoreUtilHelper.getDocumentContext(jspFile, offset);
- final IStructuredDocumentContext context = wrapper.getContext();
- final IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
- .getDOMContextResolver(context);
- final Node node = resolver.getNode();
- // bJSFTestUtil.getIndexedRegion((IStructuredDocument)
- // context.getStructuredDocument(), 589);
- Assert.assertTrue(node instanceof Attr);
- Assert.assertEquals(attrName, ((Attr) node).getNodeName());
- Assert.assertEquals(elExpr, ((Attr) node).getNodeValue());
- } finally {
- if (wrapper != null) {
- wrapper.dispose();
- }
- }
- }
-
- public static void assertELVariableSanity(final IFile jspFile,
- final String varName) throws Exception {
- ContextWrapper contextWrapper = null;
-
- try {
- contextWrapper = JSFCoreUtilHelper.getDocumentContext(jspFile, -1);
- final ISymbolContextResolver symbolResolver = StructuredDocumentSymbolResolverFactory
- .getInstance().getSymbolContextResolver(
- contextWrapper.getContext());
- final ISymbol bundleVar = symbolResolver.getVariable(varName);
- Assert.assertNotNull(bundleVar);
- } finally {
- if (contextWrapper != null) {
- contextWrapper.dispose();
- }
- }
- }
-
-
- public static ContextWrapper getDocumentContext(final IFile jspFile,
- final int offset) throws Exception {
- final IModelManager modelManager = StructuredModelManager
- .getModelManager();
-
- IStructuredModel model = null;
-
- model = modelManager.getModelForRead(jspFile);
- Assert.assertTrue(model instanceof DOMModelForJSP);
- final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE
- .getContext(model.getStructuredDocument(), offset);
- return new ContextWrapper(context, model);
- }
-
- public static class ContextWrapper {
- private final IStructuredDocumentContext _context;
- private final IStructuredModel _model;
-
- public ContextWrapper(final IStructuredDocumentContext context,
- final IStructuredModel model) {
- super();
- _context = context;
- _model = model;
- }
-
- public IStructuredDocumentContext getContext() {
- return _context;
- }
-
- public IStructuredModel getModel() {
- return _model;
- }
-
- public void dispose() {
- _model.releaseFromRead();
- }
- }
-
- public static void injectTestTagRegistryFactoryProvider(
- ITagRegistryFactoryProvider abstractTagRegistryFactoryProvider)
- {
- CompositeTagRegistryFactory.getInstance().setTestInjectedProvider(abstractTagRegistryFactoryProvider);
- }
-
- public static ITagRegistryFactoryProvider createSimpleRegistryFactory()
- {
- return new JSPandFaceletTagRegistryFactoryProvider();
- }
-
- private static class JSPandFaceletTagRegistryFactoryProvider extends AbstractTagRegistryFactoryProvider
- {
- @Override
- public Set<ITagRegistryFactoryInfo> getTagRegistryFactories()
- {
- Set<IContentType> contentTypes = new HashSet<IContentType>();
- final IContentTypeManager typeManager = Platform.getContentTypeManager();
-
- IContentType jspContentType =
- typeManager.getContentType("org.eclipse.jst.jsp.core.jspsource");
- contentTypes.add(jspContentType);
- Set<ITagRegistryFactoryInfo> infos = new HashSet<ITagRegistryFactoryInfo>();
- infos.add(new MyTagRegistryFactoryInfo(contentTypes, new MyTagRegistryFactory(), "JSP Test Factory", "Test ONLY!!! USER SHOULD NEVER SEE THIS"));
-
- IContentType htmlContentType =
- typeManager.getContentType("org.eclipse.wst.html.core.htmlsource");
- contentTypes.add(htmlContentType);
- infos.add(new MyTagRegistryFactoryInfo(contentTypes, new MyTagRegistryFactory(), "Facelet Test Factory", "Test ONLY!!! USER SHOULD NEVER SEE THIS"));
-
-
- return infos;
- }
- }
-
- private static class MyTagRegistryFactory extends TagRegistryFactory
- {
- private final String _displayName;
-
- MyTagRegistryFactory()
- {
- _displayName = "TEST ONLY!!! YOU SHOULD NOT SEE THIS!!";
- }
-
- public String getDisplayName()
- {
- return _displayName;
- }
-
- @Override
- public ITagRegistry createTagRegistry(IProject project)
- throws TagRegistryFactoryException
- {
- return new MockJSPTagRegistry();
- }
-
- @Override
- public boolean isInstance(IProject project)
- {
- // always create a new one.
- return false;
- }
-
- @Override
- public boolean projectIsValid(IProject project) {
- if (project == null)
- {
- return false;
- }
-
- return true;
- }
-
- }
-
- private static class MyTagRegistryFactoryInfo implements ITagRegistryFactoryInfo
- {
- private final Set<IContentType> _contentTypes;
- private final TagRegistryFactory _factory;
- private final String _id;
- private final String _description;
-
- /**
- * @param contentTypes
- * @param factory
- * @param id
- * @param description
- */
- public MyTagRegistryFactoryInfo(final Set<IContentType> contentTypes,
- TagRegistryFactory factory, String id, String description)
- {
- _contentTypes = contentTypes;
- _factory = factory;
- _id = id;
- _description = description;
- }
-
- public Set<IContentType> getContentTypes()
- {
- return _contentTypes;
- }
-
- public TagRegistryFactory getTagRegistryFactory()
- {
- return _factory;
- }
-
- public String getId()
- {
- return _id;
- }
-
- public String getDescription()
- {
- return _description;
- }
-
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFFacetedTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFFacetedTestEnvironment.java
deleted file mode 100644
index bae76d6..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFFacetedTestEnvironment.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.core.tests.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider;
-import org.eclipse.jst.jsf.core.jsflibraryconfiguration.JSFLibraryConfigurationHelper;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject.Action;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject.Action.Type;
-
-/**
- * Augments a ProjectEnvironment with JSF faceting
- *
- * @author cbateman
- *
- */
-@SuppressWarnings("deprecation")
-public class JSFFacetedTestEnvironment
-{
- private final WebProjectTestEnvironment _projectTestEnvironment;
- private JSFFacetInstallDataModelProvider _modelProvider;
- private IDataModel _model;
-
- /**
- * @param projectTestEnvironment
- */
- public JSFFacetedTestEnvironment(
- final WebProjectTestEnvironment projectTestEnvironment)
- {
- super();
- _projectTestEnvironment = projectTestEnvironment;
- }
-
- /**
- * Initialize the facet
- *
- * @param version --
- * the version of the facet. Valid strings are constant publics
- * on this class starting FACET_VERSION
- */
- public void initialize(final String version) throws CoreException,
- ExecutionException
- {
- final IProject project = _projectTestEnvironment.getTestProject();
- // NO LONGER seeding JSFLib registry if not present
- // call generateJSFLibraryRegistry if needed
-
- _modelProvider = new JSFFacetInstallDataModelProvider();
- _model = DataModelFactory.createDataModel(_modelProvider);
- _model.setStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME,
- project.getName());
-
- final Set<Action> actions = getAddFacetActions(version);
-
- final IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- facetedProject.modify(actions, null);
-
- //Commenting out for [Bug 225130] Failing JSF Junits due to change in FacetProjectCreationOperation
- //FacetProjectCreationOperation.addDefaultFactets(facetedProject, null);
- }
-
- private Set<Action> getAddFacetActions(final String jsfVersion)
- {
- final Set<Action> actions = new HashSet<Action>();
- final IProjectFacetVersion jsfFacet = getJSFFacet(jsfVersion);
-
- actions.add(new IFacetedProject.Action((Type) _model
- .getProperty(IFacetDataModelProperties.FACET_TYPE), jsfFacet,
- _model));
-
- return actions;
- }
-
- private IProjectFacetVersion getJSFFacet(final String version)
- {
- final IProjectFacet facet = ProjectFacetsManager
- .getProjectFacet(IJSFCoreConstants.JSF_CORE_FACET_ID);
- return facet.getVersion(version);
- }
-
- public void generateJSFLibraryRegistry()
- {
- JSFCoreUtilHelper.createJSFLibraryRegistry();
- }
-
- public void addJSFLibraryReference(final JSFLibrary lib, final boolean isDeployed)
- throws CoreException
- {
- final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(
- this._projectTestEnvironment);
- final IPath path = new Path(
- JSFLibraryConfigurationHelper.JSF_LIBRARY_CP_CONTAINER_ID)
- .append(lib.getID());
-
- IClasspathEntry cpEntry = null;
- if (isDeployed)
- {
- final IClasspathAttribute depAttrib = JavaCore
- .newClasspathAttribute(
- IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY,
- ClasspathDependencyUtil.getDefaultRuntimePath(true)
- .toString());
- cpEntry = JavaCore.newContainerEntry(path, null,
- new IClasspathAttribute[]
- { depAttrib }, true);
- }
- else
- {
- cpEntry = JavaCore.newContainerEntry(path);
- }
- jdtTestEnv.addClasspathEntry(cpEntry);
- }
-
- /**
- * Dispose of held resources
- */
- public void dispose()
- {
- if (_model != null)
- {
- _model.dispose();
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestCMUtil.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestCMUtil.java
deleted file mode 100644
index 9b0a3f8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestCMUtil.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.util;
-
-import java.util.zip.ZipFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.jsf.core.internal.tld.CMUtil;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class TestCMUtil extends TestCase {
-
- private WebProjectTestEnvironment _webProject;
- private IProject _project;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
-
- final ZipFile zipFile = JSFTestUtil.createZipFile(TestsPlugin.getDefault().getBundle()
- , "/testfiles/testzips/TLDTests.zip");
-
- _webProject = new WebProjectTestEnvironment(this, JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.4"));
- _webProject.createFromZip(zipFile, true);
- assertNotNull(_webProject);
-
- _project = _webProject.getTestProject();
- assertNotNull(_project);
- assertTrue(_project.isAccessible());
-
- }
-
- public void testGetURIFromDoc() {
-
- for (ITaglibRecord tldRec : TaglibIndex.getAvailableTaglibRecords(_project.getFullPath())){
- if (tldRec.getDescriptor().getShortName().equals("tags"))
- assertEquals("/WEB-INF/tags", CMUtil.getURIFromTaglibRecord(tldRec, _project));
- else if (tldRec.getDescriptor().getShortName().equals("moreTags"))
- assertEquals("/WEB-INF/tags/moreTags", CMUtil.getURIFromTaglibRecord(tldRec, _project));
- else if (tldRec.getDescriptor().getShortName().equals("mysample"))
- assertEquals("/WEB-INF/SampleTagLib.tld", CMUtil.getURIFromTaglibRecord(tldRec, _project));
- else if (tldRec.getDescriptor().getShortName().equals("XXXXmysample"))
- assertEquals("/WEB-INF/tlds/XXXXSampleTagLib.tld", CMUtil.getURIFromTaglibRecord(tldRec, _project));
- else if (tldRec.getDescriptor().getShortName().equals("uri-supplied"))
- assertEquals("uri-supplied", CMUtil.getURIFromTaglibRecord(tldRec, _project));
- }
- }
-
- public void testGetURIFromTaglibRecord() {
-
- CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
- for (ITaglibRecord tldRec : TaglibIndex.getAvailableTaglibRecords(_project.getFullPath())){
- TLDDocument tldDoc = (TLDDocument)factory.createCMDocument(tldRec);
- if (tldRec.getDescriptor().getShortName().equals("tags"))
- assertEquals("/WEB-INF/tags", CMUtil.getURIFromDoc(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("moreTags"))
- assertEquals("/WEB-INF/tags/moreTags", CMUtil.getURIFromDoc(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("mysample"))
- assertEquals("/WEB-INF/SampleTagLib.tld", CMUtil.getURIFromDoc(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("XXXXmysample"))
- assertEquals("/WEB-INF/tlds/XXXXSampleTagLib.tld", CMUtil.getURIFromDoc(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("uri-supplied"))
- assertEquals("uri-supplied", CMUtil.getURIFromDoc(tldDoc, _project));
- }
- }
-
- public void testIsTagDirDocument() {
-
- CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
- for (ITaglibRecord tldRec : TaglibIndex.getAvailableTaglibRecords(_project.getFullPath())){
-
- TLDDocument tldDoc = (TLDDocument)factory.createCMDocument(tldRec);
- if (tldRec.getDescriptor().getShortName().equals("tags"))
- assertTrue(CMUtil.isTagDirDocument(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("moreTags"))
- assertTrue(CMUtil.isTagDirDocument(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("mysample"))
- assertFalse(CMUtil.isTagDirDocument(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("XXXXmysample"))
- assertFalse(CMUtil.isTagDirDocument(tldDoc, _project));
- else if (tldRec.getDescriptor().getShortName().equals("uri-supplied"))
- assertFalse(CMUtil.isTagDirDocument(tldDoc, _project));
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanIntrospector.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanIntrospector.java
deleted file mode 100644
index 34ab6a9..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanIntrospector.java
+++ /dev/null
@@ -1,671 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.core.tests.util;
-
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector;
-import org.eclipse.jst.jsf.common.util.JDTBeanProperty;
-import org.eclipse.jst.jsf.common.util.JDTBeanPropertyWorkingCopy;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Tester fot he JDTBeanIntrospector class
- *
- * @author cbateman
- *
- */
-public class TestJDTBeanIntrospector extends TestCase
-{
- // TODO: test the getAllMethods. also ensure that we get coverage of the
- // case
- // where a type has no supers
- private JDTTestEnvironment _jdtTestEnvironment;
- private IType _testBean1Type;
- private IType _testBeanSubclassType;
- private IType _testBeanGenericType;
- private IType _testInterface;
- private Map<String, JDTBeanProperty> _properties;
- private Map<String, JDTBeanProperty> _subClassProperties;
- private Map<String, JDTBeanProperty> _genericTypeProperties;
- private Map<String, JDTBeanProperty> _interfaceProperties;
-
- private final static String srcFolderName = "src";
- private final static String packageName1 = "com.test";
- private final static String testBeanName1 = "TestBean1";
- private final static String testBeanSubclassName1 =
- "TestBean1Subclass";
- private final static String testAnotherBeanName = "AnotherBean";
- private final static String testBeanGenericName =
- "TestBeanGeneric";
- private final static String testBeanInterface = "IBeanInterface";
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true,
- "www-proxy.us.oracle.com", "80");
-
- final WebProjectTestEnvironment projectTestEnvironment =
- new WebProjectTestEnvironment("TestJDTBeanIntrospector_"
- + getClass().getName() + "_" + getName());
- projectTestEnvironment.createProject(true);
-
- _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
- TestFileResource codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data");
- String code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanName1, code);
-
- _testBean1Type =
- _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanName1);
- assertNotNull(_testBean1Type);
-
- // load TestBean1Subclass
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1Subclass.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanSubclassName1, code);
-
- _testBeanSubclassType =
- _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanSubclassName1);
- assertNotNull(_testBeanSubclassType);
- // sanity to make sure we don't somehow accidently get the same class
- assertNotSame(_testBean1Type, _testBeanSubclassType);
-
- // load anotherBean
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/AnotherBean.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testAnotherBeanName, code);
-
- assertNotNull(_jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testAnotherBeanName));
-
- // load TestBeanGeneric
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBeanGeneric.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanGenericName, code);
-
- _testBeanGenericType =
- _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanGenericName);
- assertNotNull(_testBeanGenericType);
-
- // load IBeanInterface
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/IBeanInterface.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanInterface, code);
-
- _testInterface = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanInterface);
- assertNotNull(_testInterface);
- assertTrue(_testInterface.exists());
-
- // introspect after classes loaded to ensure all dependencies
- // are in the project
- JDTBeanIntrospector beanIntrospector =
- new JDTBeanIntrospector(_testBean1Type);
- _properties = beanIntrospector.getProperties();
-
- beanIntrospector = new JDTBeanIntrospector(_testBeanSubclassType);
- _subClassProperties = beanIntrospector.getProperties();
-
- beanIntrospector = new JDTBeanIntrospector(_testBeanGenericType);
- _genericTypeProperties = beanIntrospector.getProperties();
-
- beanIntrospector = new JDTBeanIntrospector(_testInterface);
- _interfaceProperties = beanIntrospector.getProperties();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- final IProject project = _jdtTestEnvironment.getJavaProject().getProject();
-
- try
- {
- project.close(null);
- project.delete(true, null);
- }
- catch (final CoreException ce)
- {
- ce.printStackTrace(System.err);
- }
- }
-
- /**
- * Basic high-level sanity check on the generate properties map
- */
- public void testMapSanity()
- {
- final int NUM_PROPS = 15;
-
- checkMapSanity(_properties, NUM_PROPS);
- // sub class an locally defined property in addition to what
- // is inherited
- checkMapSanity(_subClassProperties, NUM_PROPS + 1);
-
- checkMapSanity(_genericTypeProperties, 6);
- }
-
- private void checkMapSanity(final Map<String, JDTBeanProperty> properties,
- final int numProps)
- {
- assertEquals("Check extra or missing properties", numProps, properties
- .size());
- assertNull("Empty string is invalid property name", properties.get(""));
- assertNull("Null is not a valid property name", properties.get(null));
-
- // ensure type correctness of all values
- for (final JDTBeanProperty value : properties.values())
- {
- // no working copies should slip their way in
- assertFalse(value instanceof JDTBeanPropertyWorkingCopy);
- }
- }
-
- /**
- *
- */
- public void testStringProp1()
- {
- testStringProp1(_properties);
- }
-
- /**
- * Test the inherited stringProp1 property
- */
- public void testStringProp1SubClass()
- {
- testStringProp1(_subClassProperties);
- }
-
- private void testStringProp1(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("stringProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a String", "Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("IType should resolve", property.getType());
- }
-
- /**
- *
- */
- public void testBooleanIsProp1()
- {
- testBooleanIsProp1(_properties);
- }
-
- /**
- * Test inherited property
- */
- public void testBooleanIsProp1SubClass()
- {
- testBooleanIsProp1(_subClassProperties);
- }
-
- private void testBooleanIsProp1(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("booleanIsProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean", Signature.SIG_BOOLEAN,
- property.getTypeSignature());
- assertNull("IType won't resolve", property.getType());
- }
-
- /**
- *
- */
- public void testBooleanIsProp2()
- {
- testBooleanIsProp2(_properties);
- }
-
- /**
- * Test inherited property
- */
- public void testBooleanIsProp2SubClass()
- {
- testBooleanIsProp2(_subClassProperties);
- }
-
- private void testBooleanIsProp2(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("booleanIsProp2");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean", Signature.SIG_BOOLEAN,
- property.getTypeSignature());
- assertNull("IType won't resolve", property.getType());
- assertEquals("Make sure the is getter is chosen", "isBooleanIsProp2",
- property.getGetter().getElementName());
- }
-
- /**
- *
- */
- public void testNotBooleanIsProp1()
- {
- testNotBooleanIsProp1(_properties);
- }
-
- /**
- * test inherited
- */
- public void testNotBooleanIsProp1SubClass()
- {
- testNotBooleanIsProp1(_subClassProperties);
- }
-
- /**
- *
- */
- private void testNotBooleanIsProp1(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("notBooleanIsProp1");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a boolean", Signature.SIG_BOOLEAN,
- property.getTypeSignature());
- assertNull("IType won't resolve", property.getType());
- assertEquals("Make sure the get getter is chosen",
- "getNotBooleanIsProp1", property.getGetter().getElementName());
- }
-
- /**
- * test property
- */
- public void testStringProperty2()
- {
- testStringProperty2(_properties);
- }
-
- /**
- * test inherited
- */
- public void testStringProperty2SubClass()
- {
- testStringProperty2(_subClassProperties);
- }
-
- /**
- *
- */
- private void testStringProperty2(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("stringProperty2");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a String", "Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("IType should resolve", property.getType());
- }
-
- /**
- *
- */
- public void testReadonlyStringProperty()
- {
- testReadonlyStringProperty(_properties);
- }
-
- /**
- * inherited
- */
- public void testReadonlyStringPropertySubClass()
- {
- testReadonlyStringProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testReadonlyStringProperty(
- final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("readonlyStringProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a String", "Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("IType should resolve", property.getType());
- }
-
- /**
- * test property
- */
- public void testReadonlyBooleanProperty()
- {
- testReadonlyBooleanProperty(_properties);
- }
-
- /**
- * test inherited property
- */
- public void testReadonlyBooleanPropertySubClass()
- {
- testReadonlyBooleanProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testReadonlyBooleanProperty(
- final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("readonlyBooleanProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertFalse("No setter for this property", property.isWritable());
- assertEquals("Signature must be for a boolean", Signature.SIG_BOOLEAN,
- property.getTypeSignature());
- assertNull("IType won't resolve", property.getType());
- }
-
- /**
- *
- */
- public void testWriteonlyStringProperty()
- {
- testWriteonlyStringProperty(_properties);
- }
-
- /**
- * test inherited
- */
- public void testWriteonlyStringPropertySubClass()
- {
- testWriteonlyStringProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testWriteonlyStringProperty(
- final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("writeonlyStringProperty");
- assertNotNull(property);
-
- assertFalse("No getter for this property", property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a String", "Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("IType should resolve", property.getType());
- }
-
- /**
- * test property
- */
- public void testStringArrayProperty()
- {
- testStringArrayProperty(_properties);
- }
-
- /**
- * test inherited
- */
- public void testStringArrayPropertySubClass()
- {
- testStringArrayProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testStringArrayProperty(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("stringArrayProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a String[]", "[Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("Should resolve the base type", property.getType());
- assertEquals(1, property.getArrayCount());
- }
-
- /**
- *
- */
- public void testCollectionProperty()
- {
- testCollectionProperty(_properties);
- }
-
- /**
- * test inherited
- */
- public void testCollectionPropertySubClass()
- {
- testCollectionProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testCollectionProperty(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("collectionProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a Collection",
- "Ljava.util.Collection;", property.getTypeSignature());
- assertNotNull("Should have a type", property.getType());
- }
-
- /**
- *
- */
- public void testMapProperty()
- {
- testMapProperty(_properties);
- }
-
- /**
- *
- */
- public void testMapPropertySubClass()
- {
- testMapProperty(_subClassProperties);
- }
-
- /**
- *
- */
- private void testMapProperty(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("mapProperty");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for a Map", "Ljava.util.Map;", property
- .getTypeSignature());
- assertNotNull("Should have a type", property.getType());
- }
-
- /**
- * test a locally defined bean type
- */
- public void testAnotherBean()
- {
- testAnotherBean(_properties);
- }
-
- /**
- * test inherited
- */
- public void testAnotherBeanSubClass()
- {
- testAnotherBean(_subClassProperties);
- }
-
- private void testAnotherBean(final Map<String, JDTBeanProperty> properties)
- {
- final JDTBeanProperty property = properties.get("anotherBean");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be for com.test.AnotherBean",
- "Lcom.test.AnotherBean;", property.getTypeSignature());
- assertNotNull("Should have a type", property.getType());
- }
-
- /**
- * Test a property that's in the sub-class but not the parent
- */
- public void testSubclassOnly()
- {
- final String inheritedPropertyName = "locallyDefinedProperty";
-
- // ensure we didn't some how put an inherited property into the
- // parent
- assertNull(_properties.get(inheritedPropertyName));
- final JDTBeanProperty property =
- _subClassProperties.get(inheritedPropertyName);
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- // no setter
- assertFalse(property.isWritable());
- assertEquals("Signature must be for a String", "Ljava.lang.String;",
- property.getTypeSignature());
- assertNotNull("Should have a type", property.getType());
-
- }
-
- public void testGenericListOfStringProperty() throws Exception
- {
- final JDTBeanProperty property = _genericTypeProperties.get("listOfStrings");
- assertEquals(TypeConstants.TYPE_LIST, property.getTypeSignature());
-
- assertEquals(1, property.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, property
- .getTypeParameterSignatures().get(0));
- }
-
- public void testGenericArrayListOfStringProperty() throws Exception
- {
- final JDTBeanProperty property =
- _genericTypeProperties.get("arrayListOfStrings");
- assertEquals("Ljava.util.ArrayList;", property.getTypeSignature());
-
- assertEquals(1, property.getTypeParameterSignatures().size());
- assertEquals(TypeConstants.TYPE_STRING, property
- .getTypeParameterSignatures().get(0));
- }
-
- public void testGenericListOfListOfStringProperty() throws Exception
- {
- final JDTBeanProperty property =
- _genericTypeProperties.get("listOfListOfStrings");
- assertEquals("Ljava.util.List;", property.getTypeSignature(true));
- assertEquals("Ljava.util.List<Ljava.util.List<Ljava.lang.String;>;>;",
- property.getTypeSignature(false));
-
- assertEquals(1, property.getTypeParameterSignatures().size());
- assertEquals("Ljava.util.List<Ljava.lang.String;>;", property
- .getTypeParameterSignatures().get(0));
- }
-
- public void testGenericMapOfString_StringProperty() throws Exception
- {
- final JDTBeanProperty property =
- _genericTypeProperties.get("mapOfString_String");
- assertEquals("Ljava.util.Map;", property.getTypeSignature(true));
- assertEquals("Ljava.util.Map<Ljava.lang.String;Ljava.lang.String;>;",
- property.getTypeSignature(false));
-
- assertEquals(2, property.getTypeParameterSignatures().size());
- assertEquals("Ljava.lang.String;", property
- .getTypeParameterSignatures().get(0));
- assertEquals("Ljava.lang.String;", property
- .getTypeParameterSignatures().get(1));
- }
-
- // test regression of https://bugs.eclipse.org/bugs/show_bug.cgi?id=197506
- public void testUnboundedProperty_List() throws Exception
- {
- final JDTBeanProperty property = _genericTypeProperties.get("unboundedList");
- assertEquals("Ljava.util.List;", property.getTypeSignature(true));
- assertEquals("Ljava.util.List<Ljava.lang.Object;>;", property
- .getTypeSignature(false));
-
- assertEquals(1, property.getTypeParameterSignatures().size());
- assertEquals("Ljava.lang.Object;", property
- .getTypeParameterSignatures().get(0));
- }
-
- public void testPropertyInheritedFromInterface() throws Exception
- {
- final JDTBeanProperty property = _interfaceProperties.get("inheritedThroughInterface");
- assertNotNull(property);
-
- assertTrue(property.isReadable());
- assertTrue(property.isWritable());
- assertEquals("Signature must be int", Signature.SIG_INT,
- property.getTypeSignature());
- assertNull("IType won't resolve", property.getType());
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanPropertyWorkingCopy.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanPropertyWorkingCopy.java
deleted file mode 100644
index 652145b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanPropertyWorkingCopy.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-package org.eclipse.jst.jsf.core.tests.util;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.jsf.common.util.JDTBeanProperty;
-import org.eclipse.jst.jsf.common.util.JDTBeanPropertyWorkingCopy;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Tests basic operations on the jdt bean property
- *
- * @author cbateman
- *
- */
-public class TestJDTBeanPropertyWorkingCopy extends TestCase
-{
- private JDTTestEnvironment _jdtTestEnvironment;
- private IType _testBean1Type;
-
- private final static String srcFolderName = "src";
- private final static String packageName1 = "com.test";
- private final static String testBeanName1 = "TestBean1";
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true,
- "www-proxy.us.oracle.com", "80");
-
- final WebProjectTestEnvironment projectTestEnvironment =
- new WebProjectTestEnvironment("TestJDTBeanPropertyWorkingCopy"
- + getClass().getName() + "_" + getName());
- projectTestEnvironment.createProject(true);
-
- _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
-
- // load TestBean1
- final TestFileResource codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data");
- final String code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanName1, code);
-
- _testBean1Type =
- _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanName1);
- assertNotNull(_testBean1Type);
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- final IProject project = _jdtTestEnvironment.getJavaProject().getProject();
-
- try
- {
- project.close(null);
- project.delete(true, null);
- }
- catch (final CoreException ce)
- {
- ce.printStackTrace(System.err);
- }
- }
-
- /**
- * Test simple dt bean introspection
- */
- public void testSimpleBeanProperty()
- {
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getStringProp1", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setStringProp1", new String[]
- { "QString;" });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.addSetter(simpleSetter);
- workingCopy.setGetter(simpleGetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // we provided both a get and set, so should be readable and writable
- assertTrue(beanProperty.isReadable());
- assertTrue(beanProperty.isWritable());
-
- // the getter and setter methods should match the ones we gave
- assertTrue(beanProperty.getGetter() == simpleGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to a String
- assertEquals("Ljava.lang.String;",beanProperty.getTypeSignature());
-
- // should be able to resolve the IType
- assertNotNull(beanProperty.getType());
- }
-
- /**
- * Test a simple dt bean based on a boolean "is" getter
- */
- public void testSimpleIsBeanProperty()
- {
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("isBooleanIsProp1", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setBooleanIsProp1", new String[]
- { Signature.SIG_BOOLEAN });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.addSetter(simpleSetter);
- workingCopy.setGetter(simpleGetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // we provided both a get and set, so should be readable and writable
- assertTrue(beanProperty.isReadable());
- assertTrue(beanProperty.isWritable());
-
- // the getter and setter methods should match the ones we gave
- assertTrue(beanProperty.getGetter() == simpleGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to a String
- assertEquals(Signature.SIG_BOOLEAN
- , beanProperty.getTypeSignature());
-
- // should be a boolean so no IType
- assertNull(beanProperty.getType());
- }
-
- /**
- * Assert that where there is both and "is" and "get" accessor for a boolean
- * property, the "is" accessor is always the one that is used
- */
- public void testIsAccessorTakesPrecedence()
- {
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleIsGetter =
- _testBean1Type.getMethod("isBooleanIsProp2", new String[0]);
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getBooleanIsProp2", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setBooleanIsProp2", new String[]
- { Signature.SIG_BOOLEAN });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
- assertNotNull(simpleIsGetter);
-
- workingCopy.setIsGetter(simpleIsGetter);
- workingCopy.addSetter(simpleSetter);
- workingCopy.setGetter(simpleGetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // we provided both a get and set, so should be readable and writable
- assertTrue(beanProperty.isReadable());
- assertTrue(beanProperty.isWritable());
-
- // the getter and setter methods should match the ones we gave
- // MOST IMPORTANT is that the is getter is selected
- assertTrue(beanProperty.getGetter() == simpleIsGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to a String
- assertEquals(Signature.SIG_BOOLEAN
- , beanProperty.getTypeSignature());
-
- // should be a boolean so no IType
- assertNull(beanProperty.getType());
- }
-
- // TODO: this test belongs in the bean introspector tests
- // /**
- // * The is accessor should not be used if it is not a boolean return type
- // */
- // public void testIsAccessorNotUsedIfNotBoolean()
- // {
- // JDTBeanPropertyWorkingCopy workingCopy =
- // new JDTBeanPropertyWorkingCopy(_testBean1Type);
- //
- // IMethod simpleIsGetter = _testBean1Type.getMethod("isNotBooleanIsProp1",
- // new String[0]);
- // IMethod simpleGetter = _testBean1Type.getMethod("getNotBooleanIsProp1",
- // new String[0]);
- // IMethod simpleSetter = _testBean1Type.getMethod("setNotBooleanIsProp1",
- // new String[] {Signature.SIG_BOOLEAN});
- //
- // workingCopy.setIsGetter(simpleIsGetter);
- // workingCopy.addSetter(simpleSetter);
- // workingCopy.setGetter(simpleGetter);
- //
- // JDTBeanProperty beanProperty = workingCopy.toValueObjects();
- // assertNotNull(beanProperty);
- //
- // // we provided both a get and set, so should be readable and writable
- // assertTrue(beanProperty.isReadable());
- // assertTrue(beanProperty.isWritable());
- //
- // // the getter and setter methods should match the ones we gave
- // // MOST IMPORTANT is that the is getter is NOT selected
- // assertTrue(beanProperty.getGetter() == simpleGetter);
- // assertTrue(beanProperty.getSetter() == simpleSetter);
- //
- // // the type should resolve to a String
- // assertTrue(Signature.SIG_BOOLEAN.equals(beanProperty.getTypeSignature()));
- //
- // // should be a boolean so no IType
- // assertNull(beanProperty.getType());
- //
- // }
-
- /**
- * A setter should be ignored if it doesn't match the getter's return type
- */
- public void testDoNotUseSetterIfDoesNotMatchGetterType()
- {
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getStringProperty2", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setStringProperty2", new String[]
- { Signature.SIG_INT });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.addSetter(simpleSetter);
- workingCopy.setGetter(simpleGetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // valid getter so readable
- assertTrue(beanProperty.isReadable());
- // setter should be ignored so not writable
- assertFalse(beanProperty.isWritable());
-
- // getter should match
- assertTrue(beanProperty.getGetter() == simpleGetter);
-
- // setter should be null since the one given is ignored
- assertNull(beanProperty.getSetter());
-
- // the type should resolve to a String
- assertEquals("Ljava.lang.String;", beanProperty.getTypeSignature());
-
- // should be an IType for a String
- assertNotNull(beanProperty.getType());
- }
-
- /**
- * test read-only bean properties
- */
- public void testReadonlyBeanProperty()
- {
- // readonly get
- JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getReadonlyStringProperty",
- new String[0]);
- assertNotNull(simpleGetter);
-
- workingCopy.addSetter(null);
- workingCopy.setGetter(simpleGetter);
-
- JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // valid getter so readable
- assertTrue(beanProperty.isReadable());
- // setter is null so should no be writable
- assertTrue(!beanProperty.isWritable());
-
- // getter should match
- assertTrue(beanProperty.getGetter() == simpleGetter);
-
- // setter should be null
- assertNull(beanProperty.getSetter());
-
- // the type should resolve to a String
- assertEquals("Ljava.lang.String;", beanProperty.getTypeSignature());
-
- // should be an IType for a String
- assertNotNull(beanProperty.getType());
-
- workingCopy = new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- // readonly is getter
- final IMethod isGetter =
- _testBean1Type.getMethod("isReadonlyBooleanProperty",
- new String[0]);
- assertNotNull(isGetter);
-
- workingCopy.addSetter(null);
- workingCopy.setGetter(isGetter);
-
- beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // valid getter so readable
- assertTrue(beanProperty.isReadable());
- // setter null so not writable
- assertFalse(beanProperty.isWritable());
-
- // getter should match the isGetter
- assertTrue(beanProperty.getGetter() == isGetter);
-
- // setter should be null
- assertNull(beanProperty.getSetter());
-
- // the type should resolve to a String
- assertEquals(Signature.SIG_BOOLEAN
- , beanProperty.getTypeSignature());
-
- // should not be an IType for a boolean
- assertNull(beanProperty.getType());
- }
-
- /**
- * Test a simple write-only bean
- */
- public void testWriteonlyBeanProperty()
- {
- // readonly get
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setWriteonlyStringProperty",
- new String[]
- { "QString;" });
- assertNotNull(simpleSetter);
-
- workingCopy.addSetter(simpleSetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // not readable
- assertFalse(beanProperty.isReadable());
- // writable
- assertTrue(beanProperty.isWritable());
-
- // setter should match
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // getter should be null
- assertNull(beanProperty.getGetter());
-
- // the type should resolve to a String
- assertEquals("Ljava.lang.String;", beanProperty.getTypeSignature());
-
- // should be an IType for a String
- assertNotNull(beanProperty.getType());
- }
-
- /**
- *
- */
- public void testStringArrayProperty()
- {
- // readonly get
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getStringArrayProperty",
- new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setStringArrayProperty", new String[]
- { "[QString;" });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.setGetter(simpleGetter);
- workingCopy.addSetter(simpleSetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // readable
- assertTrue(beanProperty.isReadable());
- // writable
- assertTrue(beanProperty.isWritable());
-
- // getter/setter should match
- assertTrue(beanProperty.getGetter() == simpleGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to a String[]
- assertEquals("[Ljava.lang.String;",
- beanProperty.getTypeSignature());
-
- // Should resolve to base type (String)
- assertNotNull(beanProperty.getType());
- }
-
- /**
- *
- */
- public void testCollectionProperty()
- {
- // readonly get
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type
- .getMethod("getCollectionProperty", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setCollectionProperty", new String[]
- { "QCollection;" });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.setGetter(simpleGetter);
- workingCopy.addSetter(simpleSetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // readable
- assertTrue(beanProperty.isReadable());
- // writable
- assertTrue(beanProperty.isWritable());
-
- // getter/setter should match
- assertTrue(beanProperty.getGetter() == simpleGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to java.util.Collection
- assertEquals("Ljava.util.Collection;", beanProperty
- .getTypeSignature());
-
- // should resolve a type
- assertNotNull(beanProperty.getType());
- }
-
- /**
- *
- */
- public void testMapProperty()
- {
- // readonly get
- final JDTBeanPropertyWorkingCopy workingCopy =
- new JDTBeanPropertyWorkingCopy(_testBean1Type);
-
- final IMethod simpleGetter =
- _testBean1Type.getMethod("getMapProperty", new String[0]);
- final IMethod simpleSetter =
- _testBean1Type.getMethod("setMapProperty", new String[]
- { "QMap;" });
- assertNotNull(simpleGetter);
- assertNotNull(simpleSetter);
-
- workingCopy.setGetter(simpleGetter);
- workingCopy.addSetter(simpleSetter);
-
- final JDTBeanProperty beanProperty = workingCopy.toValueObject();
- assertNotNull(beanProperty);
-
- // readable
- assertTrue(beanProperty.isReadable());
- // writable
- assertTrue(beanProperty.isWritable());
-
- // getter/setter should match
- assertTrue(beanProperty.getGetter() == simpleGetter);
- assertTrue(beanProperty.getSetter() == simpleSetter);
-
- // the type should resolve to java.util.Map
- assertEquals("Ljava.util.Map;", beanProperty.getTypeSignature());
-
- // should resolve a type
- assertNotNull(beanProperty.getType());
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJSFAppConfigUtils.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJSFAppConfigUtils.java
deleted file mode 100644
index 3f3cdf0..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJSFAppConfigUtils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.util;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-/**
- * Unit test for JSFAppConfigUtils
- *
- * @author cbateman
- *
- */
-public class TestJSFAppConfigUtils extends TestCase
-{
-
- protected void setUp() throws Exception {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
-
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
- }
-
- public void testIsJSFProject()
- {
- WebProjectTestEnvironment env = createTestEnv(IJSFCoreConstants.FACET_VERSION_1_1, getName());
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject()));
- }
-
- public void testIsNotJSFProject()
- {
- WebProjectTestEnvironment env = createTestEnv(null, getName());
- assertFalse(JSFAppConfigUtils.isValidJSFProject(env.getTestProject()));
- }
-
- public void testIsJSFProjectByVersion()
- {
- WebProjectTestEnvironment env = createTestEnv(IJSFCoreConstants.FACET_VERSION_1_1,getName()+"1");
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(),IJSFCoreConstants.JSF_VERSION_1_0));
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(),IJSFCoreConstants.JSF_VERSION_1_1));
- assertFalse(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(), IJSFCoreConstants.JSF_VERSION_1_2));
-
- env = createTestEnv(IJSFCoreConstants.FACET_VERSION_1_2, getName()+"2");
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(),IJSFCoreConstants.JSF_VERSION_1_0));
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(),IJSFCoreConstants.JSF_VERSION_1_1));
- assertTrue(JSFAppConfigUtils.isValidJSFProject(env.getTestProject(), IJSFCoreConstants.JSF_VERSION_1_2));
- }
-
- private WebProjectTestEnvironment createTestEnv(String facetVersion, String name)
- {
- WebProjectTestEnvironment testEnv =
- new WebProjectTestEnvironment(this.getClass().getName()+"_"+name);
- testEnv.createProject(true);
- assertNotNull(testEnv);
- assertNotNull(testEnv.getTestProject());
- assertTrue(testEnv.getTestProject().isAccessible());
-
- if (facetVersion != null)
- {
- JSFFacetedTestEnvironment jsfFacedEnv =
- new JSFFacetedTestEnvironment(testEnv);
-
- try
- {
- jsfFacedEnv.initialize(facetVersion);
- }
- catch (CoreException ce)
- {
- // propagate
- throw new RuntimeException(ce);
- } catch (ExecutionException e) {
- // propagate
- throw new RuntimeException(e);
- }
- }
-
- return testEnv;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestTypeUtil.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestTypeUtil.java
deleted file mode 100644
index 4b53ce7..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestTypeUtil.java
+++ /dev/null
@@ -1,444 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle Corporation.
- * 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:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-package org.eclipse.jst.jsf.core.tests.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
-import org.eclipse.jst.jsf.common.util.TypeUtil;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.TestFileResource;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-
-public class TestTypeUtil extends TestCase
-{
- private JDTTestEnvironment _jdtTestEnvironment;
- private IType _testBean1Type;
- private IType _testBeanSubclassType;
- private IType _testBeanGenericType;
- private IType _testEnum1Type;
- private IType _binaryType;
-
- // private Map<String, JDTBeanProperty> _properties;
- // private Map<String, JDTBeanProperty> _subClassProperties;
- // private Map<String, JDTBeanProperty> _genericTypeProperties;
-
- private final static String srcFolderName = "src";
- private final static String packageName1 = "com.test";
- private final static String testBeanName1 = "TestBean1";
- private final static String testBeanSubclassName1 = "TestBean1Subclass";
- private final static String testAnotherBeanName = "AnotherBean";
- private final static String testBeanGenericName = "TestBeanGeneric";
- private final static String testEnumName1 = "TestEnum1";
-
- // private final static String testEnumName2 = "TestEnum2";
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true,
- "www-proxy.us.oracle.com", "80");
-
- final WebProjectTestEnvironment projectTestEnvironment = new WebProjectTestEnvironment(
- "TestTypeUtil" + getClass().getName() + "_" + getName());
- projectTestEnvironment.createProject(true);
-
- _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
- TestFileResource codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1.java.data");
- String code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanName1, code);
-
- _testBean1Type = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanName1);
- assertNotNull(_testBean1Type);
-
- // load TestBean1Subclass
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBean1Subclass.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanSubclassName1, code);
-
- _testBeanSubclassType = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanSubclassName1);
- assertNotNull(_testBeanSubclassType);
- // sanity to make sure we don't somehow accidently get the same class
- assertNotSame(_testBean1Type, _testBeanSubclassType);
-
- // load anotherBean
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/AnotherBean.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testAnotherBeanName, code);
-
- assertNotNull(_jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testAnotherBeanName));
-
- // load TestBeanGeneric
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestBeanGeneric.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testBeanGenericName, code);
-
- _testBeanGenericType = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testBeanGenericName);
- assertNotNull(_testBeanGenericType);
-
- // load TestEnum1
- codeRes = new TestFileResource();
- codeRes.load(TestsPlugin.getDefault().getBundle(),
- "/testfiles/TestEnum1.java.data");
- code = codeRes.toString();
- _jdtTestEnvironment.addSourceFile(srcFolderName, packageName1,
- testEnumName1, code);
-
- _testEnum1Type = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + testEnumName1);
- assertNotNull(_testEnum1Type);
- assertTrue(_testEnum1Type.isEnum());
-
- final IClasspathEntry entry = _jdtTestEnvironment.addJarClasspathEntry(
- TestsPlugin.getDefault().getBundle(),
- "/testfiles/signatures.jar");
- assertNotNull(entry);
-
- _binaryType = _jdtTestEnvironment.getJavaProject().findType(
- packageName1 + "." + "BinaryType");
- assertNotNull(_binaryType);
- // 7 methods plus 1 implicit constructor
- assertEquals(7+1, _binaryType.getMethods().length);
-
- // introspect after classes loaded to ensure all dependencies
- // are in the project
- // JDTBeanIntrospector beanIntrospector =
- // new JDTBeanIntrospector(_testBean1Type);
- //
- // _properties = beanIntrospector.getProperties();
- //
- // beanIntrospector =
- // new JDTBeanIntrospector(_testBeanSubclassType);
- //
- // _subClassProperties = beanIntrospector.getProperties();
-
- // beanIntrospector =
- // new JDTBeanIntrospector(_testBeanGenericType);
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- /**
- * only simple tests required, mainly to assert that the eraseTypeParameters
- * is defaulted to true, since the method should be fully equivalent to
- * resolveTypeSignature(type, signature, true)
- */
- // public void testResolveTypeITypeString() {
- // fail("nbla");
- // }
- public void testResolveTypeSignatureITypeString()
- {
- // this one should be the same regardless of type erasure
- assertEquals(TypeConstants.TYPE_STRING, TypeUtil.resolveTypeSignature(
- _testBean1Type, "QString;", true));
- assertEquals(TypeConstants.TYPE_STRING, TypeUtil.resolveTypeSignature(
- _testBean1Type, "QString;", false));
-
- // no parameters are provided here, so we should see the same result
- assertEquals(TypeConstants.TYPE_COLLECTION, TypeUtil
- .resolveTypeSignature(_testBean1Type, "QCollection;", true));
- assertEquals(TypeConstants.TYPE_COLLECTION, TypeUtil
- .resolveTypeSignature(_testBean1Type, "QCollection;", false));
- assertEquals(TypeConstants.TYPE_MAP, TypeUtil.resolveTypeSignature(
- _testBean1Type, "QMap;", true));
- assertEquals(TypeConstants.TYPE_MAP, TypeUtil.resolveTypeSignature(
- _testBean1Type, "QMap;", false));
-
- // in this case, the provided signature has type erasure, so the answer
- // will different depending on typeErasure flag
- final String typeSigWithErasure = TypeUtil.resolveTypeSignature(
- _testBean1Type, "QMap<QString;QString;>;", true);
- assertEquals(TypeConstants.TYPE_MAP, typeSigWithErasure);
- final String typeSigNoErasure = TypeUtil.resolveTypeSignature(
- _testBean1Type, "QMap<QString;QString;>;", false);
- assertEquals("Ljava.util.Map<Ljava.lang.String;Ljava.lang.String;>;",
- typeSigNoErasure);
-
- // test resolution of type paramaters
- final IType mapType = TypeUtil.resolveType(_jdtTestEnvironment
- .getJavaProject(), "Ljava.util.Map;");
- assertNotNull(mapType);
- assertEquals(TypeConstants.TYPE_JAVAOBJECT, TypeUtil
- .resolveTypeSignature(mapType, "TV;", false));
-
- // unfound signature
- assertEquals("QSomeNotRealClass;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "QSomeNotRealClass;", false));
-
- // arrays
- assertEquals("[I", TypeUtil.resolveTypeSignature(_testBean1Type, "[I"));
-
- assertEquals("[Ljava.lang.String;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "[QString;"));
-
- assertEquals("[Ljava.util.Map;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "[QMap;"));
-
- assertEquals("[Ljava.util.Collection;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "[QCollection;"));
-
- // array of arrays
- assertEquals("[[[Ljava.lang.String;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "[[[QString;"));
-
- // cover cases where wildcards and/or capture are used. All should be
- // equivalent to the case for
- // the same signature without wildcards and capture
-
- // with type erasure
- runWildcardAndCapture(typeSigWithErasure, true);
- // and without type erasure
- runWildcardAndCapture(typeSigNoErasure, false);
- }
-
- private void runWildcardAndCapture(final String expected,
- final boolean typeErasure)
- {
- // extends
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<+QString;+QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<+QString;QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<QString;+QString;>;", typeErasure));
- // super
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<-QString;-QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<-QString;QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<QString;-QString;>;", typeErasure));
- // star
- // this one is distinct because * are converted to Object
- final String expected1 = "Ljava.util.Map"
- + (typeErasure ? ";"
- : "<Ljava.lang.Object;Ljava.lang.Object;>;");
- assertEquals(expected1, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<**>;", typeErasure));
- final String expected2 = "Ljava.util.Map"
- + (typeErasure ? ";"
- : "<Ljava.lang.Object;Ljava.lang.String;>;");
- assertEquals(expected2, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<*QString;>;", typeErasure));
- final String expected3 = "Ljava.util.Map"
- + (typeErasure ? ";"
- : "<Ljava.lang.String;Ljava.lang.Object;>;");
- assertEquals(expected3, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<QString;*>;", typeErasure));
- // capture extends
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<!+QString;!+QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<!+QString;QString;>;", typeErasure));
- assertEquals(expected, TypeUtil.resolveTypeSignature(_testBean1Type,
- "QMap<QString;!+QString;>;", typeErasure));
-
- assertEquals("Ljava.lang.String;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "!+QString;", typeErasure));
-
- // test regression on
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=197506
- assertEquals("Ljava.lang.Object;", TypeUtil.resolveTypeSignature(
- _testBean1Type, "*", typeErasure));
- }
-
- public void testCanNeverBeEqual()
- {
- // one of the arguments is the enum base
- assertFalse(TypeUtil.canNeverBeEqual(TypeConstants.TYPE_ENUM_BASE,
- "Lcom.test.SomeEnum;"));
- assertFalse(TypeUtil.canNeverBeEqual("Lcom.test.SomeEnum;",
- TypeConstants.TYPE_ENUM_BASE));
-
- assertTrue(TypeUtil.canNeverBeEqual("Lcom.test.SomeEnum1;",
- "Lcom.test.SomeEnum2;"));
- assertFalse(TypeUtil.canNeverBeEqual("Lcom.test.SomeEnum1;",
- "Lcom.test.SomeEnum1;"));
- }
-
- public void testIsEnumsCompareCompatible()
- {
- // one of the arguments is the enum base
- assertTrue(TypeUtil.isEnumsCompareCompatible(
- TypeConstants.TYPE_ENUM_BASE, "Lcom.test.SomeEnum;"));
- assertTrue(TypeUtil.isEnumsCompareCompatible("Lcom.test.SomeEnum;",
- TypeConstants.TYPE_ENUM_BASE));
-
- assertFalse(TypeUtil.isEnumsCompareCompatible("Lcom.test.SomeEnum1;",
- "Lcom.test.SomeEnum2;"));
- assertTrue(TypeUtil.isEnumsCompareCompatible("Lcom.test.SomeEnum1;",
- "Lcom.test.SomeEnum1;"));
- }
-
- // public void testResolveTypeSignatureITypeStringBoolean() {
- // fail("Not yet implemented");
- // }
- //
- public void testGetSignature()
- {
- assertEquals("Lcom.test.TestBean1;", TypeUtil
- .getSignature(_testBean1Type));
- }
-
- public void testResolveMethodSignature() throws Exception
- {
- assertEquals("()Ljava.lang.String;", TypeUtil.resolveMethodSignature(
- _testBean1Type, "()QString;"));
- assertEquals("(Ljava.lang.String;)V", TypeUtil.resolveMethodSignature(
- _testBean1Type, "(QString;)V"));
- assertEquals("(Ljava.lang.String;Z)V", TypeUtil.resolveMethodSignature(
- _testBean1Type, "(QString;Z)V"));
-
- IMethod method = _testBean1Type.getMethod("getStringProp1", null);
- assertEquals("()Ljava.lang.String;", TypeUtil.resolveMethodSignature(
- _testBean1Type, method.getSignature()));
-
- method = _testBean1Type.getMethod("setStringProperty2", new String[]
- { "I" });
- assertEquals("(I)V", TypeUtil.resolveMethodSignature(_testBean1Type,
- method.getSignature()));
-
- // test binary methods
- // the framework returns method signatures using "/" instead of "."
- // separators when the IType is BinaryType
-
- // sanity: _binaryType must a JDT BinaryType impl for this test to
- // be valid
- assertTrue(_binaryType.isBinary());
- assertEquals("()Ljava.lang.String;", TypeUtil.resolveMethodSignature(
- _binaryType, _binaryType.getMethod("getStringProperty", null)
- .getSignature()));
-
- assertEquals("(Ljava.lang.String;)V", TypeUtil.resolveMethodSignature(
- _binaryType, _binaryType.getMethod("setStringProperty",
- new String[]
- { "Ljava.lang.String;" }).getSignature()));
-
- assertEquals("()I", TypeUtil.resolveMethodSignature(_binaryType,
- _binaryType.getMethod("getIntegerProperty", null)
- .getSignature()));
-
- assertEquals("(I)V", TypeUtil.resolveMethodSignature(_binaryType,
- _binaryType.getMethod("setIntegerProperty", new String[]
- { "I" }).getSignature()));
-
- assertEquals("()Lcom.test.BinaryPropertyAndMethodType;", TypeUtil
- .resolveMethodSignature(_binaryType, _binaryType.getMethod(
- "getUserDefined", null).getSignature()));
-
- assertEquals("(Lcom.test.BinaryPropertyAndMethodType;)V", TypeUtil
- .resolveMethodSignature(_binaryType, _binaryType.getMethod(
- "setUserDefined", new String[]
- { "Lcom.test.BinaryPropertyAndMethodType;" })
- .getSignature()));
-
- assertEquals(
- "(Ljava.lang.String;Lcom.test.BinaryPropertyAndMethodType;I)I",
- TypeUtil
- .resolveMethodSignature(
- _binaryType,
- _binaryType
- .getMethod(
- "methodWithMultipleArgs",
- new String[]
- {
- "Ljava.lang.String;",
- "Lcom.test.BinaryPropertyAndMethodType;",
- "I" }).getSignature()));
- }
-
- // public void testGetFullyQualifiedName() {
- // fail("Not yet implemented");
- // }
- //
- public void testResolveTypeIJavaProjectString()
- {
- assertNotNull(TypeUtil.resolveType(
- _jdtTestEnvironment.getJavaProject(), "Ljava.lang.String;"));
- assertEquals(_testBean1Type, TypeUtil.resolveType(_jdtTestEnvironment
- .getJavaProject(), "Lcom.test.TestBean1;"));
- }
-
- public void testMatchTypeParameterToArgument() throws Exception
- {
- final IType mapType = TypeUtil.resolveType(_jdtTestEnvironment
- .getJavaProject(), "Ljava.util.Map;");
- assertNotNull(mapType);
-
- final List<String> args = new ArrayList<String>();
- args.add("Ljava.lang.String;");
- args.add("Lcom.test.TestBean1;");
-
- // TestBean1 is the "V" in Map<K,V>
- assertEquals("Lcom.test.TestBean1;", TypeUtil
- .matchTypeParameterToArgument(mapType, "TV;", args));
-
- // there is no "Q" type arg
- assertNull(TypeUtil.matchTypeParameterToArgument(mapType, "TQ;", args));
- // there is no "garbonzo" type arg
- assertNull(TypeUtil.matchTypeParameterToArgument(mapType, "Tgarbonzo;",
- args));
- }
-
- public void testIsEnumMember() throws Exception
- {
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "red"));
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "blue"));
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "green"));
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "yellow"));
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "purple"));
- assertTrue(TypeUtil.isEnumMember(_testEnum1Type, "orange"));
-
- assertFalse(TypeUtil.isEnumMember(_testEnum1Type, "mauve"));
- assertFalse(TypeUtil.isEnumMember(_testEnum1Type, "pink"));
-
- // test the enum base type.. all things may be members of it
- final IType type = _jdtTestEnvironment.getJavaProject().findType(
- "java.lang.Enum");
- assertNotNull(type);
- // assertTrue(type.isEnum());
- assertTrue(TypeUtil.isEnumMember(type, "red"));
- assertTrue(TypeUtil.isEnumMember(type, "pink"));
- assertTrue(TypeUtil.isEnumMember(type, "anything"));
- assertTrue(TypeUtil.isEnumMember(type, "deadbeef"));
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/UtilSuite.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/UtilSuite.java
deleted file mode 100644
index 6876e95..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/UtilSuite.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.util;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Runs all util package tests as a suite
- *
- * @author cbateman
- *
- */
-public class UtilSuite {
-
- /**
- * @return the test suite
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("Tests for org.eclipse.jst.jsf.core.tests.util");
- //$JUnit-BEGIN$
-
- suite.addTestSuite(TestJDTBeanPropertyWorkingCopy.class);
- suite.addTestSuite(TestJDTBeanIntrospector.class);
-
- suite.addTestSuite(TestCMUtil.class);
-
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIReporter.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIReporter.java
deleted file mode 100644
index 8559c84..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIReporter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-
-class MockIReporter implements IReporter
-{
- private List<IMessage> _messages = new ArrayList<IMessage>();
- private Map<Integer, List<IMessage>> _messagesByOffset =
- new TreeMap<Integer, List<IMessage>>();
-
- public void addMessage(final IValidator origin, final IMessage message)
- {
- _messages.add(message);
-
- // index the message by offset
- getMessageListForOffset(message.getOffset()).add(message);
- }
-
- public void displaySubtask(final IValidator validator, final IMessage message) {
- // do nothing, might eventually want to log this
- }
-
- public List<IMessage> getMessageListForOffset(final int offset)
- {
- List<IMessage> messages = _messagesByOffset.get(offset);
-
- if (messages == null)
- {
- messages = new ArrayList<IMessage>();
- _messagesByOffset.put(offset, messages);
- }
-
- return messages;
- }
-
- public List<IMessage> getMessages() {
- return _messages;
- }
-
- public boolean isCancelled() {
- // do nothing; unused.
- return false;
- }
-
- public void removeAllMessages(final IValidator origin)
- {
- throw new UnsupportedOperationException("This reporter is for specific test purposes only");
- }
-
- public void removeAllMessages(final IValidator origin, final Object object)
- {
- throw new UnsupportedOperationException("This reporter is for specific test purposes only");
- }
-
- public void removeMessageSubset(final IValidator validator, final Object obj,
- final String groupName)
- {
- throw new UnsupportedOperationException("This reporter is for specific test purposes only");
- }
-
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIValidationContext.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIValidationContext.java
deleted file mode 100644
index 8d35d34..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIValidationContext.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-
-public class MockIValidationContext implements IValidationContext
-{
- private final List<IFile> _files;
-
- public MockIValidationContext(final List<IFile> files)
- {
- _files = files;
- }
-
- public String[] getURIs()
- {
- final List<String> uris = new ArrayList<String>();
-
- for (final IFile file : _files)
- {
- uris.add(file.getFullPath().toString());
- }
- return uris.toArray(new String[uris.size()]);
- }
-
- public Object loadModel(String symbolicName)
- {
- throw new UnsupportedOperationException("currently not used in testing");
- }
-
- public Object loadModel(String symbolicName, Object[] parms)
- {
- throw new UnsupportedOperationException("currently not used in testing");
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockValidationReporter.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockValidationReporter.java
deleted file mode 100644
index a948679..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockValidationReporter.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import junit.framework.Assert;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.jst.jsf.validation.internal.IJSFViewValidator.ReporterAdapter;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class MockValidationReporter extends ReporterAdapter
-{
- private final List<ReportedProblem> _reportedProblems;
- private Map<Integer, List<ReportedProblem>> _messagesByOffset =
- new TreeMap<Integer, List<ReportedProblem>>();
-
- public MockValidationReporter()
- {
- _reportedProblems = new ArrayList<ReportedProblem>();
- }
-
- @Override
- public void report(Diagnostic diagnostic, int start, int length)
- {
- ReportedProblem problem = new ReportedProblem(diagnostic,start,length);
- _reportedProblems.add(problem);
-
- // index the message by offset
- getMessageListForOffset(start).add(problem);
- }
-
- @Override
- public void report(IMessage message)
- {
- final ReportedProblem problem = new ReportedProblem(message);
- _reportedProblems.add(problem);
-
- // index the message by offset
- getMessageListForOffset(message.getOffset()).add(problem);
- }
-
- public void reset()
- {
- _reportedProblems.clear();
- _messagesByOffset.clear();
- }
-
- public List<ReportedProblem> getReportedProblems()
- {
- return Collections.unmodifiableList(_reportedProblems);
- }
-
- public List<ReportedProblem> getMessageListForOffset(final int offset)
- {
- List<ReportedProblem> messages = _messagesByOffset.get(offset);
-
- if (messages == null || messages.size() == 0)
- {
- for (final Map.Entry<Integer, List<ReportedProblem>> entry : _messagesByOffset.entrySet())
- {
- int entryOffset = entry.getKey().intValue();
- // if the offset looked for is within +/-5 of an entry,
- // dump it to stderr for debugging slightly off offsets
- if (offset >= entryOffset - 5 && offset <= entryOffset+5)
- {
- System.err.printf("Offset %d requested not found but close is: %d", offset, entryOffset);
- }
- }
- messages = new ArrayList<ReportedProblem>();
- _messagesByOffset.put(offset, messages);
- }
-
- return messages;
- }
-
- public void assertExpectedMessage(
- final int offset, final int length, final int severity)
- {
- assertExpectedMessage(offset, length, severity, null);
- }
-
- public void assertExpectedMessage(
- final int offset, final int length, final int severity, final Integer code)
- {
- final List<ReportedProblem> reportedProblems = getMessageListForOffset(offset);
-
- Assert.assertTrue(reportedProblems.size() > 0);
-
- for (final ReportedProblem problem : reportedProblems)
- {
- if (problem.getLength() == length && problem.getSeverity() == severity)
- {
- if (code == null || code == Integer.valueOf(problem.getErrorCode()))
- {
- // we found the expected message
- return;
- }
- }
- }
-
- String failMessage = "";
-
- for (final ReportedProblem problem : reportedProblems)
- {
- failMessage +=
- String.format("\n at offset offset %d, code=%d, length=%d, message=%s", problem.getOffset(),
- problem.getErrorCode(), problem.getLength(), problem.getText());
- }
- Assert.fail(String.format(
- "Failed to find expected message at offset %d%s, length %d, found instead %s"
- , offset, length, (code == null ? "" : ", with errorCode "+code), failMessage));
-
- }
-
- public static class ReportedProblem
- {
- private final int _offset;
- private final int _length;
- private final int _severity;
- private final String _text;
- private final int _errorCode;
-
- public ReportedProblem(final Diagnostic problem, final int start, final int length)
- {
- _severity = convertSeverity(problem);
- _offset = start;
- _length = length;
- _text = problem.getMessage();
- _errorCode = problem.getCode();
- }
-
- private ReportedProblem(final IMessage message)
- {
- _severity = message.getSeverity();
- _offset = message.getOffset();
- _length = message.getLength();
- _text = message.getText();
- _errorCode = -1;
- }
-
- /**
- * @param severity
- * @return a Message severity equivilent to diagnostic.getSeverity()
- */
- private static int convertSeverity(final Diagnostic problem)
- {
- switch (problem.getSeverity())
- {
- case Diagnostic.ERROR:
- return IMessage.HIGH_SEVERITY;
- case Diagnostic.WARNING:
- return IMessage.NORMAL_SEVERITY;
- case Diagnostic.INFO:
- return IMessage.LOW_SEVERITY;
- case Diagnostic.OK:
- default:
- // no bits set
- return 0;
- }
- }
-
- public int getOffset()
- {
- return _offset;
- }
-
- public int getLength()
- {
- return _length;
- }
-
- public int getSeverity()
- {
- return _severity;
- }
-
- public String getText()
- {
- return _text;
- }
-
- public int getErrorCode()
- {
- return _errorCode;
- }
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticValidation_AttrValueConverter.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticValidation_AttrValueConverter.java
deleted file mode 100644
index aba04d9..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticValidation_AttrValueConverter.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * 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:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.zip.ZipFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsf.validation.internal.XMLViewDefnValidator;
-import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class TestJSPSemanticValidation_AttrValueConverter extends TestCase
-{
- private WebProjectTestEnvironment _webProject;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true,
- "www-proxy.uk.oracle.com", "80");
-
- final ZipFile zipFile = JSFTestUtil.createZipFile(TestsPlugin
- .getDefault().getBundle(),
- "/testfiles/testzips/valueHolderTest11.zip");
-
- _webProject = new WebProjectTestEnvironment(this,
- JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet(
- "jst.web").getVersion("2.4"));
- _webProject.createFromZip(zipFile, true);
-
- // initialize test case for faces 1.1
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(
- _webProject);
- // jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- JSFCoreUtilHelper.addJSFRuntimeJarsToClasspath(JSFVersion.V1_1,
- jsfFacedEnv);
- }
-
- public void testSanity() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path(
- "WebContent/Case1_NoExplicitConverter.jspx"));
- assertTrue(jspFile.isAccessible());
-
- IStructuredModel jspModel = null;
- try
- {
- jspModel = StructuredModelManager.getModelManager()
- .getModelForRead(jspFile);
- assert (jspModel instanceof DOMModelForJSP);
- }
- finally
- {
- if (jspModel != null)
- {
- jspModel.releaseFromRead();
- }
- }
- }
-
- public void testCase1_NoExplicitConverter() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path(
- "WebContent/Case1_NoExplicitConverter.jspx"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
- assertEquals(1, mockReporter.getReportedProblems().size());
-
- mockReporter.assertExpectedMessage(10683, 27, IMessage.NORMAL_SEVERITY);
- }
-
- public void testCase1a_NoExplicitConverterWithForClass() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path(
- "WebContent/Case1a_NoExplicitConverterWithForClass.jspx"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
- assertEquals(0, mockReporter.getReportedProblems().size());
- }
-
- public void testCase2_ExplicitConverterKnown() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path(
- "WebContent/Case2_ExplicitConverterKnown.jspx"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
- assertEquals(11, mockReporter.getReportedProblems().size());
-
- mockReporter.assertExpectedMessage(2410, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(2509, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(2612, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(2717, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(2832, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(2950, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(3060, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(3169, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(3282, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(3398, 29, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(3510, 29, IMessage.NORMAL_SEVERITY);
- }
-
- public void testCase2_ExplicitUnknownConverter() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path(
- "WebContent/Case3_ExplicitUnknownConverter.jspx"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
- assertEquals(1, mockReporter.getReportedProblems().size());
-
- mockReporter.assertExpectedMessage(804, 29, IMessage.NORMAL_SEVERITY);
- }
-
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_AttributeValues.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_AttributeValues.java
deleted file mode 100644
index 86bcab1..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_AttributeValues.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.zip.ZipFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.jsf.common.internal.types.TypeComparatorDiagnosticFactory;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsf.validation.internal.XMLViewDefnValidator;
-import org.eclipse.jst.jsf.validation.internal.strategy.ContainmentValidatingStrategy;
-import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class TestJSPSemanticsValidator_AttributeValues extends TestCase
-{
- private WebProjectTestEnvironment _webProject;
- private boolean _containmentValidationEnabled;
-
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JSFTestUtil.setValidationEnabled(false);
- JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
-
- /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=296496
- final ZipFile zipFile = JSFTestUtil.createZipFile(TestsPlugin.getDefault().getBundle()
- , "/testfiles/testzips/ValidationTestProject1.zip");
-
- _webProject = new WebProjectTestEnvironment(this, JavaFacetUtils.JAVA_50, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.4"));
- _webProject.createFromZip(zipFile, true);
- */
- final ZipFile zipFile = JSFTestUtil.createZipFile(
- TestsPlugin.getDefault().getBundle(),
- "/testfiles/testzips/ValidationTestProject2.zip");
- _webProject = new WebProjectTestEnvironment(
- this,
- JavaFacet.VERSION_1_5,
- ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.4"));
- _webProject.createFromZip2(zipFile, true);
- JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
- Job.getJobManager().beginRule(_webProject.getTestProject(), null);
- _containmentValidationEnabled = ContainmentValidatingStrategy.isEnabled();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- Job.getJobManager().endRule(_webProject.getTestProject());
- JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
- }
-
- public void testSanity() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path("WebContent/NonELValidation.jsp"));
- assertTrue(jspFile.isAccessible());
-
- IStructuredModel jspModel = null;
- try
- {
- jspModel = StructuredModelManager.getModelManager().getModelForRead(jspFile);
- assert(jspModel instanceof DOMModelForJSP);
- }
- finally
- {
- if (jspModel != null)
- {
- jspModel.releaseFromRead();
- }
- }
- }
-
- public void testNonELValidation() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path("WebContent/NonELValidation.jsp"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
-
- // there should only be 3, but because we don't want to have the jars
- // in the path, we trigger a containment warning on the loadBundle
- // since the f:view in the doc can't be fully resolved.
- assertEquals(_containmentValidationEnabled ? 4 : 3, mockReporter.getReportedProblems().size());
-
- mockReporter.assertExpectedMessage(591, 25, IMessage.HIGH_SEVERITY);
- mockReporter.assertExpectedMessage(936, 1, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(969, 9, IMessage.NORMAL_SEVERITY);
- }
-
- public void testELValidation() throws Exception
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path("WebContent/ELValidation.jsp"));
- assertTrue(jspFile.isAccessible());
-
- final MockValidationReporter mockReporter = new MockValidationReporter();
- final XMLViewDefnValidator validator = new XMLViewDefnValidator();
- validator.validateView(jspFile, mockReporter);
-
- // there should only be 5, but because we don't want to have the jars
- // in the path, we trigger a containment warning on the loadBundle
- // since the f:view in the doc can't be fully resolved.
- // at 845 we also get two, one for syntax error and one for missing bracket
- assertEquals(_containmentValidationEnabled ? 10 : 9, mockReporter.getReportedProblems().size());
-
- mockReporter.assertExpectedMessage(603, 2, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(648, 4, IMessage.NORMAL_SEVERITY);
- // the default severity for no var messages is now low.
- mockReporter.assertExpectedMessage(696, 5, IMessage.LOW_SEVERITY);
- mockReporter.assertExpectedMessage(753, 6, IMessage.NORMAL_SEVERITY);
- mockReporter.assertExpectedMessage(802, 4, IMessage.HIGH_SEVERITY);
-
- // two on this one: syntax error and missing bracket
- mockReporter.assertExpectedMessage(846, 5, IMessage.HIGH_SEVERITY);
- mockReporter.assertExpectedMessage(847, 3, IMessage.NORMAL_SEVERITY);
-
- mockReporter.assertExpectedMessage(946, 24, IMessage.NORMAL_SEVERITY, TypeComparatorDiagnosticFactory.PROPERTY_NOT_WRITABLE_ID);
-
- mockReporter.assertExpectedMessage(1015, 40, IMessage.HIGH_SEVERITY);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_Containment.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_Containment.java
deleted file mode 100644
index 4ae6ba8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_Containment.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
-import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-import org.eclipse.jst.jsf.core.internal.region.Region2ElementAdapter;
-import org.eclipse.jst.jsf.core.internal.tld.CMUtil;
-import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
-import org.eclipse.jst.jsf.designtime.DTAppManagerUtil;
-import org.eclipse.jst.jsf.designtime.internal.view.IDTViewHandler;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.jst.jsf.validation.internal.JSFValidationContext;
-import org.eclipse.jst.jsf.validation.internal.ValidationPreferences;
-import org.eclipse.jst.jsf.validation.internal.IJSFViewValidator.IValidationReporter;
-import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
-import org.eclipse.jst.jsf.validation.internal.strategy.ContainmentValidatingStrategy;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * White box testing that validation of tag containment skips JSP fragments
- * and only marks the first instance of a tag containment problem
- *
- * @author cbateman
- *
- */
-public class TestJSPSemanticsValidator_Containment extends TestCase
-{
- private WebProjectTestEnvironment _testEnv;
- private IFile _jspFile;
- private IFile _jspFragmentFile;
- private IStructuredModel _jspStructuredModel;
- private IStructuredDocument _jspStructuredDocument;
- private IStructuredModel _jspFragStructuredModel;
- private IStructuredDocument _jspFragStructuredDocument;
- private boolean _containmentValidationEnabled;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- _testEnv = new WebProjectTestEnvironment("ContainmentValidationTest"+this.getClass().getName()+"_"+getName());
- _testEnv.createProject(false);
- assertNotNull(_testEnv);
- assertNotNull(_testEnv.getTestProject());
- assertTrue(_testEnv.getTestProject().isAccessible());
-
- // load a dummy tld for core
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/jsf-core.tld.data", "META-INF/jsf-core.tld");
-
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/myfaces_html.tld.data", "META-INF/myfaces_html.tld");
-
- _jspFile = (IFile)
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/jsps/testContainment.jsp.data", "testContainment.jsp");
-
- _jspStructuredModel = StructuredModelManager.getModelManager().getModelForRead(_jspFile);
- _jspStructuredDocument = _jspStructuredModel.getStructuredDocument();
-
- _jspFragmentFile = (IFile)
- _testEnv.loadResourceInWebRoot(TestsPlugin.getDefault().getBundle()
- , "/testfiles/jsps/testContainment.jsp.data", "testContainment.jsf");
-
- _jspFragStructuredModel = StructuredModelManager.getModelManager().getModelForRead(_jspFile);
- _jspFragStructuredDocument = _jspFragStructuredModel.getStructuredDocument();
-
- // initialize test case for faces 1.1
- final JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
- jsfFacedEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
-
- _containmentValidationEnabled = ContainmentValidatingStrategy.isEnabled();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- if (_jspStructuredModel != null)
- {
- _jspStructuredModel.releaseFromRead();
- }
-
- if (_jspFragStructuredModel != null)
- {
- _jspFragStructuredModel.releaseFromRead();
- }
- }
-
- public void testContainmentInJSP() throws Exception
- {
- // instantiate the validator once since this is how it would
- // called against a single file. This is critical to test
- // that only the first instance of improper containment
- // gets flagged.
- final MockValidationReporter reporter = new MockValidationReporter();
- final ContainmentValidatingStrategy validator =
- createContainmentValidator(_jspFile, reporter);
-
- final IStructuredDocumentContext correctlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspStructuredDocument, 487);
- checkTag(correctlyNested, validator, reporter, 0);
- reporter.reset();
-
- final IStructuredDocumentContext firstIncorrectlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspStructuredDocument, 538);
- checkTag(firstIncorrectlyNested, validator, reporter, _containmentValidationEnabled ? 1 : 0);
- reporter.reset();
-
- final IStructuredDocumentContext secondIncorrectlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspStructuredDocument, 568);
- checkTag(secondIncorrectlyNested, validator, reporter, 0);
- reporter.reset();
- }
-
- public void testContainmentInJSPFrag() throws Exception
- {
- // instantiate the validator once since this is how it would
- // called against a single file. This is critical to test
- // that only the first instance of improper containment
- // gets flagged.
- final MockValidationReporter reporter = new MockValidationReporter();
- final ContainmentValidatingStrategy validator =
- createContainmentValidator(_jspFragmentFile, reporter);
-
- { // should all be zero, since no contain validation in jsp frags
- final IStructuredDocumentContext correctlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspFragStructuredDocument, 487);
- checkTag(correctlyNested, validator, reporter, 0);
- reporter.reset();
- }
-
- { // should all be zero, since no contain validation in jsp frags
- final IStructuredDocumentContext firstIncorrectlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspFragStructuredDocument, 538);
- checkTag(firstIncorrectlyNested, validator, reporter, 0);
- reporter.reset();
- }
-
- { // should all be zero, since no contain validation in jsp frags
- final IStructuredDocumentContext secondIncorrectlyNested =
- IStructuredDocumentContextFactory.INSTANCE
- .getContext(_jspFragStructuredDocument, 568);
- checkTag(secondIncorrectlyNested, validator, reporter, 0);
- reporter.reset();
- }
- }
-
- private void checkTag(final IStructuredDocumentContext context
- , final ContainmentValidatingStrategy validator
- , MockValidationReporter reporter
- , final int expectedCount) throws Exception
- {
- final IndexedRegion region = JSFTestUtil.getIndexedRegion
- ((IStructuredDocument) context.getStructuredDocument()
- , context.getDocumentPosition());
-
- final IDOMNode domNode = (IDOMNode) region;
- final Node node = (Node) region;
- assertTrue(node instanceof Element);
- final Element elem = (Element) node;
- assertEquals(IJSFConstants.TAG_INPUTTEXT, elem.getLocalName());
- System.out.println(CMUtil.getElementNamespaceURI(elem));
-
- validator.validate(
- new Region2ElementAdapter(domNode.getFirstStructuredDocumentRegion()));
-
- assertEquals(expectedCount, reporter.getReportedProblems().size());
- }
-
- private ContainmentValidatingStrategy createContainmentValidator(final IFile file,
- IValidationReporter reporter)
- {
- final ValidationPreferences prefs = new ValidationPreferences(
- JSFCorePlugin.getDefault().getPreferenceStore());
- prefs.load();
- final DiagnosticFactory diagnosticFactory = new DiagnosticFactory();
-
- final IDTViewHandler viewHandler = DTAppManagerUtil
- .getViewHandler(file.getProject());
-
- final JSFValidationContext validationContext =
- new JSFValidationContext(
- false, prefs, viewHandler,
- diagnosticFactory, file, reporter,
- null);
-
- return new ContainmentValidatingStrategy(validationContext);
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/XMLViewDefnValidatorTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/XMLViewDefnValidatorTests.java
deleted file mode 100644
index 5dba2d3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/XMLViewDefnValidatorTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 Oracle 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:
- * Oracle Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.core.tests.validation;
-
-import java.util.zip.ZipFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.jsf.core.tests.TestsPlugin;
-import org.eclipse.jst.jsf.test.util.JSFTestUtil;
-import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * General testing for the XMLViewDefnValidator.
- *
- * @author cbateman
- *
- */
-public class XMLViewDefnValidatorTests extends TestCase
-{
- private WebProjectTestEnvironment _webProject;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- final ZipFile zipFile = JSFTestUtil.createZipFile(TestsPlugin.getDefault().getBundle()
- , "/testfiles/testzips/ValidationTestProject1.zip");
-
- _webProject = new WebProjectTestEnvironment(this, JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.4"));
- _webProject.createFromZip(zipFile, true);
- }
-
- public void testSanity()
- {
- final IProject project = _webProject.getTestProject();
- assertNotNull(project);
- assertTrue(project.isAccessible());
-
- final IFile jspFile = project.getFile(new Path("WebContent/NonELValidation.jsp"));
- assertTrue(jspFile.isAccessible());
- }
-
- public void testUnzip()
- {
-
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/test.xml
deleted file mode 100644
index c1b2c7c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<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}\..\.."/> -->
- <echo message="basedir ${basedir}" />
- <echo message="eclipse place ${eclipse-home}" />
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.jst.jsf.core.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/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.eclipse.jst.jsf.core.tests.*xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="jsf-folder" value="${eclipse-home}/jsf_folder"/>
- <delete dir="${jsf-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jsf-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jst.jsf.core.tests.AllTests" />
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- </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.eclipse.jst.jsf.core.tests.*xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/AnotherBean.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/AnotherBean.java.data
deleted file mode 100644
index 0fc24ed..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/AnotherBean.java.data
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.test;
-
-public class AnotherBean
-{
- public String getProperty();
- {
- return "";
- }
-
- public void setProperty(String prop)
- {
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/IBeanInterface.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/IBeanInterface.java.data
deleted file mode 100644
index 3759441..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/IBeanInterface.java.data
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.test;
-
-public interface IBeanInterface
-{
- int getInheritedThroughInterface();
- void setInheritedThroughInterface(int value);
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-beanutils-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-beanutils-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-beanutils-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data
deleted file mode 100644
index 8a52566..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<jsflibreg:JSFLibraryRegistry xmlns:jsflibreg="http://www.eclipse.org/webtools/jsf/schema/jsflibraryregistry.xsd"/> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data
deleted file mode 100644
index c589157..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<jsflibreg:JSFLibraryRegistry xmlns:jsflibreg="http://www.eclipse.org/webtools/jsf/schema/jsflibraryregistry.xsd">
-<JSFLibraries ID="1173982473046" Name="ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-impl-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-beanutils-1.7.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-codec-1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-collections-3.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-digester-1.6.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-el-1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-lang-2.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-logging-1.0.4.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/jstl-1.1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-api-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries ID="1173982919437" Name="tomahawk" Deployed="false">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomahawk/tomahawk-1.1.3/lib/tomahawk-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries ID="1173984147125" Name="sun-ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jstl.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-beanutils.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-collections.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-digester.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-logging.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-api.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-impl.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
-</jsflibreg:JSFLibraryRegistry> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data
deleted file mode 100644
index b0277be..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<jsflibreg:JSFLibraryRegistry xmlns:jsflibreg="http://www.eclipse.org/webtools/jsf/schema/jsflibraryregistry.xsd">
- <JSFLibraries Name="ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-impl-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-beanutils-1.7.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-codec-1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-collections-3.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-digester-1.6.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-el-1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-lang-2.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-logging-1.0.4.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/jstl-1.1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-api-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries Name="tomahawk" Deployed="false">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomahawk/tomahawk-1.1.3/lib/tomahawk-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries Name="sun-ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jstl.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-beanutils.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-collections.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-digester.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-logging.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-api.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-impl.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
-</jsflibreg:JSFLibraryRegistry>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data
deleted file mode 100644
index 065ad6b..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<jsflibreg:JSFLibraryRegistry xmlns:jsflibreg="http://www.eclipse.org/webtools/jsf/schema/jsflibraryregistry.xsd" DefaultImplementationID="ri">
- <JSFLibraries Name="ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-impl-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-beanutils-1.7.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-codec-1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-collections-3.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-digester-1.6.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-el-1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-lang-2.1.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/commons-logging-1.0.4.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/jstl-1.1.0.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/myfaces/myfaces-core-1.1.3/lib/myfaces-api-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries Name="tomahawk" Deployed="false">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomahawk/tomahawk-1.1.3/lib/tomahawk-1.1.3.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
- <JSFLibraries Name="sun-ri" Deployed="false" Implementation="true">
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jstl.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-beanutils.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-collections.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-digester.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/commons-logging.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-api.jar" RelativeDestLocation="WEB-INF/lib"/>
- <ArchiveFiles RelativeToWorkspace="false" SourceLocation="C:/cam/tomcat/apache-tomcat-5.5.15/server/lib/jsf-impl.jar" RelativeDestLocation="WEB-INF/lib"/>
- </JSFLibraries>
-</jsflibreg:JSFLibraryRegistry> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/standard-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/standard-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/standard-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1.java.data
deleted file mode 100644
index e3a5304..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1.java.data
+++ /dev/null
@@ -1,141 +0,0 @@
-package com.test;
-
-import java.util.*;
-
-public class TestBean1
-{
-// simple bean properties
- public String getStringProp1()
- {
- return "";
- }
-
- public void setStringProp1(String prop)
- {
- }
-
-// simple boolean with is getter
- public boolean isBooleanIsProp1()
- {
- return true;
- }
-
- public void setBooleanIsProp1(boolean property)
- {
- }
-
-// boolean "is" takes precedence over get
- public boolean isBooleanIsProp2()
- {
- return true;
- }
-
- public boolean getBooleanIsProp2()
- {
- return false;
- }
-
- public void setBooleanIsProp2(boolean property)
- {
- }
-
-// don't use is getter when type is not boolean
- public String isNotBooleanIsProp1()
- {
- return "";
- }
-
- public boolean getNotBooleanIsProp1()
- {
- return true;
- }
-
- public void setNotBooleanIsProp1(boolean property)
- {
- }
-
-// don't use setter if parameter is not matching the getter
- public String getStringProperty2()
- {
- return "";
- }
-
- // incorrect parameter -- should be String
- public void setStringProperty2(int wrongParam)
- {
- }
-
- // readonly property -- no setter
- public String getReadonlyStringProperty()
- {
- return "readonly";
- }
-
- // readonly is property -- no setter
- public boolean isReadonlyBooleanProperty()
- {
- return true;
- }
-
- // write only property -- no getter
- public void setWriteonlyStringProperty(String val)
- {
- return "blah";
- }
-
-// bogus getter -- "" is not a bean name
- public String get()
- {
- return "";
- }
-
-// String array getter
- public String[] getStringArrayProperty()
- {
- }
-
- public void setStringArrayProperty(String[] arrayProp)
- {
-
- }
-
-// Collection property
- public Collection getCollectionProperty()
- {
- return new ArrayList();
- }
-
- public void setCollectionProperty(Collection prop)
- {
- }
-
-// Map property
- public Map getMapProperty()
- {
- return new HashMap();
- }
-
- public void setMapProperty(Map prop)
- {
- }
-
-// Another bean property
- public AnotherBean getAnotherBean()
- {
- return null;
- }
-
- public void setAnotherBean(AnotherBean anotherBean)
- {
- }
-// Int array property
- public int[] getIntArrayProperty()
- {
- return new int[] {0,1,2};
- }
-// array of array of string
- public String[][] getArrayOfArrayOfStringProperty()
- {
- return new String[3][];
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1Subclass.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1Subclass.java.data
deleted file mode 100644
index 8662033..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1Subclass.java.data
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.test;
-
-
-public class TestBean1Subclass extends TestBean1
-{
- public String getLocallyDefinedProperty()
- {
- return "";
- }
-} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBeanGeneric.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBeanGeneric.java.data
deleted file mode 100644
index ace0225..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBeanGeneric.java.data
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.test;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-
-public class TestBeanGeneric
-{
- public List<String> getListOfStrings()
- {
- return new ArrayList<String>();
- }
-
- public ArrayList<String> getArrayListOfStrings()
- {
- return new ArrayList<String>();
- }
-
- public List<List<String>> getListOfListOfStrings()
- {
- return new ArrayList<List<String>>();
- }
-
- public Map<String, String> getMapOfString_String()
- {
- return new HashMap<String, String>();
- }
-
- public List<?> getUnboundedList()
- {
- return new ArrayList<Object>();
- }
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestEnum1.java.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestEnum1.java.data
deleted file mode 100644
index 203499c..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestEnum1.java.data
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.eclipse.jst.jsf.core.tests.util;
-
-public enum TestEnum1
-{
- red, blue, green, yellow, orange, purple
-}
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2.jar
deleted file mode 100644
index 7e369c6..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jar
deleted file mode 100644
index 1f3a814..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jar
deleted file mode 100644
index 380fe7f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jar
deleted file mode 100644
index 2cf0da5..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jar
deleted file mode 100644
index de4b037..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_1.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_1.xml
deleted file mode 100644
index fbc7d0f..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_1.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-<faces-config>
-
-</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_2.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_2.xml
deleted file mode 100644
index ddd61c7..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_2.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<faces-config
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
- version="1.2">
-
-</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-2_0.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-2_0.xml
deleted file mode 100644
index f711d93..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-2_0.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<faces-config
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
- version="2.0">
-
-</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/jsflibrary-api-1.1.3.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/jsflibrary-api-1.1.3.jar
deleted file mode 100644
index f4fac81..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/jsflibrary-api-1.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/no-version-entry/jsflibrary-api-1.1.3.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/no-version-entry/jsflibrary-api-1.1.3.jar
deleted file mode 100644
index 5cff505..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/no-version-entry/jsflibrary-api-1.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/nonstandard_implementation_version/jsflibrary-api-1.1.3.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/nonstandard_implementation_version/jsflibrary-api-1.1.3.jar
deleted file mode 100644
index 4bc7917..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/nonstandard_implementation_version/jsflibrary-api-1.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data
deleted file mode 100644
index b54e2ea..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data
+++ /dev/null
@@ -1,30 +0,0 @@
-<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
- <tlib-version>1.0</tlib-version>
- <jsp-version>1.2</jsp-version>
- <short-name>f</short-name>
- <uri>http://java.sun.com/jsf/core</uri>
- <display-name>JSF core tag library.</display-name>
- <description>
- This tag library implements the standard JSF core tags.
- </description>
-
- <tag>
- <name>view</name>
- <tag-class>org.apache.myfaces.taglib.core.ViewTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Creates a JSF View, which is a container that holds all of the
- components that are part of the view.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>locale</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The locale of this view. Default: the default locale from the configuration file.</description>
- </attribute>
- </tag>
-
-
-</taglib>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/NonELAttributeValues.jsp.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/NonELAttributeValues.jsp.data
deleted file mode 100644
index e69de29..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/NonELAttributeValues.jsp.data
+++ /dev/null
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testContainment.jsp.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testContainment.jsp.data
deleted file mode 100644
index 810575e..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testContainment.jsp.data
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
- uri="http://java.sun.com/jsf/html" prefix="h"%><%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Insert title here</title>
-</head>
-<body>
-
-<f:view><h:form>
- <h:inputText></h:inputText>
- </h:form></f:view>
- <h:inputText></h:inputText>
- <h:inputText></h:inputText>
-</body>
-</html>
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testdata1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testdata1.jsp.data
deleted file mode 100644
index ad170d3..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testdata1.jsp.data
+++ /dev/null
@@ -1,40 +0,0 @@
-
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-<%--
-The taglib directive below imports the JSTL library. If you uncomment it,
-you must also add the JSTL library to the project. The Add Library... action
-on Libraries node in Projects view can be used to add the JSTL 1.1 library.
---%>
-
-<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<f:view>
- <f:loadBundle var="bundle" basename="resources.LoginPageBundle" />
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><h:outputText value="#{bundle['page.title']}"/></title>
- <link rel="stylesheet" href="style/style.css" media="screen"/>
- </head>
- <body>
- <h:form id="mainForm">
- <h1><h:outputText value="#{bundle['page.header']}"/></h1>
- <h:messages/>
- <h:panelGrid columns="2">
- <h:outputLabel for="userId" value="Username:"/>
- <h:inputText id="userId" value="#{loginRequest.id}"/>
- <h:outputLabel for="password" value="Password:"/>
- <h:inputSecret id="password" value="#{loginRequest.passwordPlainText}"/>
- </h:panelGrid>
- <h:commandButton action="#{appController.loginActions}" value="#{bundle['login.button.value']}"/>
- </h:form>
-
- </body>
-</html>
-</f:view> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/CaseInsensitive.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/CaseInsensitive.xml
deleted file mode 100644
index 606a584..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/CaseInsensitive.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<p:grammar-annotations
- xmlns:p="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema ../../../org.eclipse.jst.jsf.core/schema/grammar-annotations.xsd "
- caseSensitive="false">
- <cm-element name="Foo">
- <cm-attribute name="Value">
- <property name="Type">
- <value>String1</value>
- </property>
- </cm-attribute>
- <property name="Type">
- <value>String1</value>
- </property>
- </cm-element>
-</p:grammar-annotations>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileA.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileA.xml
deleted file mode 100644
index 54b9844..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileA.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<p:grammar-annotations xmlns:p="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema ../../../org.eclipse.jst.jsf.core/schema/grammar-annotations.xsd ">
- <cm-element name="Foo">
- <cm-attribute name="Value">
- <property name="Type">
- <value>String1</value>
- </property>
- </cm-attribute>
- <property name="Type">
- <value>String1</value>
- </property>
- </cm-element>
-</p:grammar-annotations>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileB.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileB.xml
deleted file mode 100644
index 60cf5fa..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileB.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<p:grammar-annotations xmlns:p="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.eclipse.jst.jsf.core/grammarAnnotationSchema ../../../org.eclipse.jst.jsf.core/schema/grammar-annotations.xsd ">
- <cm-element name="Foo">
- <cm-attribute name="Value">
- <property name="Type">
- <value>String2</value>
- </property>
- </cm-attribute>
- <property name="Type">
- <value>String2</value>
- </property>
- </cm-element>
-</p:grammar-annotations>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.properties b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.properties
deleted file mode 100644
index ea290ee..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Oracle Corporation.
-# 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:
-# Gerry Kessler - initial API and implementation
-###############################################################################
-NLS1=a day in the life
-NLS2=another string
-
-
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.xml
deleted file mode 100644
index 73c8ea8..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar-annotation
- xmlns="http://org.eclipse.jsf.core/grammarAnnotationSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://org.eclipse.jsf.core/grammarAnnotationSchema D:\\EclipseWTPLatest\\WTPWorkspace\\org.eclipse.jst.jsf.core\\schema\\grammar-annotations.xsd ">
- <cm-element name="validator">
- <cm-attribute name="validatorId">
- <property name="attr-val-content-assistant">
- <value>com.eclipse.jst.jsf.ui.internal.ValidatorAttrValueContentAssistant</value>
- </property>
- <property name="faces-datatype">
- <value>com.eclipse.jst.jsf.core.internal.model.datatype.Validator</value>
- </property>
- </cm-attribute>
- </cm-element>
- <cm-element name="nopropsOrAttrs">
- </cm-element>
- <cm-element name="noAttrs">
- <property name="A">
- <value>a</value>
- </property>
- <property name="B">
- <value>b</value>
- </property>
- </cm-element>
- <cm-element name="loaded">
- <cm-attribute name="att1">
- <property name="A1">
- <value>a1</value>
- </property>
- <property name="B1">
- <value>b1</value>
- </property>
- </cm-attribute>
- <cm-attribute name="att2">
- <property name="A2">
- <value>a2</value>
- </property>
- <property name="B2">
- <value>b2</value>
- </property>
- </cm-attribute>
- <cm-attribute name="att3">
- <property name="A3">
- <value>a3</value>
- </property>
- <property name="B3">
- <value>b3</value>
- </property>
- <property name="multival">
- <value>1</value>
- <value>2</value>
- <value>3</value>
- </property>
- </cm-attribute>
- <property name="A">
- <value>a</value>
- </property>
- <property name="B">
- <value>b</value>
- </property>
- <property name="multival">
- <value>1</value>
- <value>2</value>
- <value>3</value>
- </property>
- </cm-element>
- <cm-element name="NLS">
- <cm-attribute name="NLS">
- <property name="NLS1">
- <value>%NLS1</value>
- </property>
- <property name="NLS2">
- <value>%NLS2</value>
- </property>
- <property name="NLS3">
- <value>%NLS3</value>
- </property>
- <property name="multival">
- <value>%NLS1</value>
- <value>%NLS2</value>
- </property>
- </cm-attribute>
- <property name="NLS1">
- <value>%NLS1</value>
- </property>
- <property name="NLS2">
- <value>%NLS2</value>
- </property>
- <property name="NLS3">
- <value>%NLS3</value>
- </property>
- <property name="multival">
- <value>%NLS1</value>
- <value>%NLS2</value>
- </property>
- <property name="NullVal">
- <value></value>
- </property>
- </cm-element>
-</grammar-annotation>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test_en_US.properties b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test_en_US.properties
deleted file mode 100644
index 6491523..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test_en_US.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Oracle Corporation.
-# 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:
-# Gerry Kessler - initial API and implementation
-###############################################################################
-NLS1=a day in the life(en_US)
-NLS2=another string(en_US)
-
-
-
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_core.tld.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_core.tld.data
deleted file mode 100644
index 9e547d2..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_core.tld.data
+++ /dev/null
@@ -1,781 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Copyright 2004,2005,2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
- <tlib-version>1.0</tlib-version>
- <jsp-version>1.2</jsp-version>
- <short-name>f</short-name>
- <uri>http://java.sun.com/jsf/core</uri>
- <display-name>JSF core tag library.</display-name>
- <description>
- This tag library implements the standard JSF core tags.
- </description>
- <!--
-======================================================
- Listener, that does all the startup work (configuration, init).
-======================================================
--->
- <listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
- <!--
-======================================================
- actionListener
-======================================================
--->
- <tag>
- <name>actionListener</name>
- <tag-class>org.apache.myfaces.taglib.core.ActionListenerTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag creates an instance of the specified ActionListener, and
- associates it with the nearest parent UIComponent.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <attribute>
- <name>type</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The fully qualified class name of the ActionListener class.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- attribute
-======================================================
--->
- <tag>
- <name>attribute</name>
- <tag-class>javax.faces.webapp.AttributeTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag associates an attribute with the nearest parent
- UIComponent.
- &lt;p&gt;
- When the value is not an EL expression, this tag has the same effect
- as calling component.getAttributes.put(name, value). When the attribute
- name specified matches a standard property of the component, that
- property is set. However it is also valid to assign attributes
- to components using any arbitrary name; the component itself won't
- make any use of these but other objects such as custom renderers,
- validators or action listeners can later retrieve the attribute
- from the component by name.
- &lt;p&gt;
- When the value is an EL expression, this tag has the same effect
- as calling component.setValueBinding. A call to method
- component.getAttributes().get(name) will then cause that
- expression to be evaluated and the result of the expression is
- returned, not the original EL expression string.
- &lt;p&gt;
- See the javadoc for UIComponent.getAttributes for more details.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <attribute>
- <name>name</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The name of the attribute.</description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The attribute's value.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- converter
-======================================================
--->
- <tag>
- <name>convertDateTime</name>
- <tag-class>org.apache.myfaces.taglib.core.ConvertDateTimeTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag associates a date time converter with the nearest parent UIComponent.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>dateStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The style of the date. Values include: default, short, medium, long, and full.</description>
- </attribute>
- <attribute>
- <name>locale</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The name of the locale to be used, instead of the default.</description>
- </attribute>
- <attribute>
- <name>pattern</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat.</description>
- </attribute>
- <attribute>
- <name>timeStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The style of the time. Values include: default, short, medium, long, and full.</description>
- </attribute>
- <attribute>
- <name>timeZone</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The time zone to use instead of GMT (the default timezone). When
- this value is a value-binding to a TimeZone instance, that
- timezone is used. Otherwise this value is treated as a String
- containing a timezone id, ie as the ID parameter of method
- java.util.TimeZone.getTimeZone(String).
- </description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Specifies whether the date, time, or both should be
- parsed/formatted. Values include: date, time, and both.
- Default based on setting of timeStyle and dateStyle.
- </description>
- </attribute>
- </tag>
- <tag>
- <name>converter</name>
- <tag-class>javax.faces.webapp.ConverterTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag creates an instance of the specified Converter, and
- associates it with the nearest parent UIComponent.
- </description>
- <attribute>
- <name>converterId</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The converter's registered ID.</description>
- </attribute>
- </tag>
- <tag>
- <name>convertNumber</name>
- <tag-class>org.apache.myfaces.taglib.core.ConvertNumberTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag creates a number formatting converter and associates it
- with the nearest parent UIComponent.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>currencyCode</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>ISO 4217 currency code</description>
- </attribute>
- <attribute>
- <name>currencySymbol</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The currency symbol used to format a currency value. Defaults
- to the currency symbol for locale.
- </description>
- </attribute>
- <attribute>
- <name>groupingUsed</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Specifies whether output will contain grouping separators. Default: true.</description>
- </attribute>
- <attribute>
- <name>integerOnly</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Specifies whether only the integer part of the input will be parsed. Default: false.</description>
- </attribute>
- <attribute>
- <name>locale</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The name of the locale to be used, instead of the default as
- specified in the faces configuration file.
- </description>
- </attribute>
- <attribute>
- <name>maxFractionDigits</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The maximum number of digits in the fractional portion of the number.</description>
- </attribute>
- <attribute>
- <name>maxIntegerDigits</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The maximum number of digits in the integer portion of the number.</description>
- </attribute>
- <attribute>
- <name>minFractionDigits</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The minimum number of digits in the fractional portion of the number.</description>
- </attribute>
- <attribute>
- <name>minIntegerDigits</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The minimum number of digits in the integer portion of the number.</description>
- </attribute>
- <attribute>
- <name>pattern</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat.</description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The type of formatting/parsing to be performed. Values include:
- number, currency, and percent. Default: number.
- </description>
- </attribute>
- </tag>
- <!--
-======================================================
- facet
-======================================================
--->
- <tag>
- <name>facet</name>
- <tag-class>javax.faces.webapp.FacetTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This tag adds its child as a facet of the nearest parent UIComponent.
- A child consisting of multiple elements should be nested within a
- container component (i.e., within an h:panelGroup for HTML library
- components).
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>name</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The name of the facet to be created. This must be a static value.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- loadBundle
-======================================================
--->
- <tag>
- <name>loadBundle</name>
- <tag-class>org.apache.myfaces.taglib.core.LoadBundleTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Loads a resource bundle and saves it as a variable in the request scope.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>basename</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The base name of the resource bundle.</description>
- </attribute>
- <attribute>
- <name>var</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The name of the variable in request scope that the resources
- are saved to. This must be a static value.
- </description>
- </attribute>
- </tag>
- <!--
-======================================================
- param
-======================================================
--->
- <tag>
- <name>param</name>
- <tag-class>org.apache.myfaces.taglib.core.ParamTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag associates a parameter name-value pair with the nearest
- parent UIComponent. A UIComponent is created to represent this
- name-value pair, and stored as a child of the parent component; what
- effect this has depends upon the renderer of that parent component.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <!-- UIParameter attributes -->
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>name</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>A String containing the name of the parameter.</description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The value of this parameter.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- selectitem
-======================================================
--->
- <tag>
- <name>selectItem</name>
- <tag-class>org.apache.myfaces.taglib.core.SelectItemTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag associates a single SelectItem with the nearest
- parent UIComponent. The item represents a single option
- for a component such as an h:selectBooleanCheckbox or h:selectOneMenu.
- See also component selectItems.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <!-- UISelectItem attributes -->
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>itemDisabled</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- If true, this component will not be saved during state saving.
- </description>
- </attribute>
- <attribute>
- <name>itemDescription</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>An optional description for this item.</description>
- </attribute>
- <attribute>
- <name>itemLabel</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The locale-specific label that will be displayed to the user for this item.
- </description>
- </attribute>
- <attribute>
- <name>itemValue</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The value of this item, of the same type as the parent component's value.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An EL expression that refers to a javax.faces.model.SelectItem instance.
- </description>
- </attribute>
- </tag>
- <!--
-======================================================
- selectitems
-======================================================
--->
- <tag>
- <name>selectItems</name>
- <tag-class>org.apache.myfaces.taglib.core.SelectItemsTag</tag-class>
- <body-content>empty</body-content>
- <description>
- This tag associates a set of selection list items with the nearest
- parent UIComponent. The set of SelectItem objects is retrieved via
- a value-binding.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <!-- UISelectItems attributes -->
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An EL expression that specifies the contents of the selection list.
- The expression can refer to one of the following:
- &lt;ol&gt;
- &lt;li&gt;A single SelectItem&lt;/li&gt;
- &lt;li&gt;An array or Collection of SelectItem instances&lt;/li&gt;
- &lt;li&gt;A Map. The contents of the Map are used to create SelectItem
- instances, where the SelectItem's label is the map's key value,
- and the SelectItem's value is the map's value. When using a
- map, it is recommended that an ordered implementation such as
- java.util.TreeMap is used.&lt;/li&gt;
- &lt;/ol&gt;
- The value properties of each of the SelectItems must be of the same
- basic type as the parent component's value.
-
- </description>
- </attribute>
- </tag>
- <!--
-======================================================
- subview
-======================================================
--->
- <tag>
- <name>subview</name>
- <tag-class>org.apache.myfaces.taglib.core.SubviewTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This tag associates a set of UIComponents with the nearest parent
- UIComponent. It acts as a naming container to make the IDs of its
- component elements unique.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>id</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- </tag>
- <!--
-======================================================
- validators
-======================================================
--->
- <tag>
- <name>validateDoubleRange</name>
- <tag-class>org.apache.myfaces.taglib.core.ValidateDoubleRangeTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Creates a validator and associateds it with the nearest parent
- UIComponent. When invoked, the validator ensures that values are
- valid doubles that lie within the minimum and maximum values specified.
-
- Commonly associated with a h:inputText entity.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <!-- validator min/max attributes -->
- <attribute>
- <name>minimum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The smallest value that should be considered valid.</description>
- </attribute>
- <attribute>
- <name>maximum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The largest value that should be considered valid.</description>
- </attribute>
- </tag>
- <tag>
- <name>validateLength</name>
- <tag-class>org.apache.myfaces.taglib.core.ValidateLengthTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Creates a validator and associateds it with the nearest parent
- UIComponent. When invoked, the validator ensures that values are
- valid strings with a length that lies within the minimum and maximum
- values specified.
-
- Commonly associated with a h:inputText entity.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <!-- validator min/max attributes -->
- <attribute>
- <name>minimum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The smallest value that should be considered valid.</description>
- </attribute>
- <attribute>
- <name>maximum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The largest value that should be considered valid.</description>
- </attribute>
- </tag>
- <tag>
- <name>validateLongRange</name>
- <tag-class>org.apache.myfaces.taglib.core.ValidateLongRangeTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Creates a validator and associateds it with the nearest parent
- UIComponent. When invoked, the validator ensures that values
- are valid longs that lie within the minimum and maximum values specified.
-
- Commonly associated with a h:inputText entity.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <!-- validator min/max attributes -->
- <attribute>
- <name>minimum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The smallest value that should be considered valid.</description>
- </attribute>
- <attribute>
- <name>maximum</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The largest value that should be considered valid.</description>
- </attribute>
- </tag>
- <tag>
- <name>validator</name>
- <tag-class>javax.faces.webapp.ValidatorTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Creates a validator and associates it with the nearest parent
- UIComponent. During the validation phase (or the apply-request-values
- phase for immediate components), if the associated component has any
- submitted value and the conversion of that value to the required
- type has succeeded then the specified validator type is
- invoked to test the validity of the converted value.
- &lt;p&gt;
- Commonly associated with an h:inputText entity, but may be applied to
- any input component.
- &lt;p&gt;
- Some validators may allow the component to use attributes to define
- component-specific validation constraints; see the f:attribute tag.
- See also the "validator" attribute of all input components, which
- allows a component to specify an arbitrary validation &lt;i&gt;method&lt;/i&gt;
- (rather than a registered validation type, as this tag does).
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <attribute>
- <name>validatorId</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The registered ID of the desired Validator.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- valueChangeListener
-======================================================
--->
- <tag>
- <name>valueChangeListener</name>
- <tag-class>org.apache.myfaces.taglib.core.ValueChangeListenerTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Adds the specified ValueChangeListener to the nearest parent
- UIComponent (which is expected to be a UIInput component).
- Whenever the form containing the parent UIComponent is submitted,
- an instance of the specified type is created. If the submitted
- value from the component is different from the component's current
- value then a ValueChangeEvent is queued. When the ValueChangeEvent
- is processed (at end of the validate phase for non-immediate components,
- or at end of the apply-request-values phase for immediate components)
- the object's processValueChange method is invoked.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <attribute>
- <name>type</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The name of a Java class that implements ValueChangeListener.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- verbatim
-======================================================
--->
- <tag>
- <name>verbatim</name>
- <tag-class>org.apache.myfaces.taglib.core.VerbatimTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Outputs its body as verbatim text. No JSP tags within the verbatim
- tag (including JSF tags) are evaluated; the content is treated
- simply as literal text to be copied to the response.
- &lt;p&gt;
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <attribute>
- <name>escape</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>If true, generated markup is escaped. Default: false.</description>
- </attribute>
- </tag>
- <!--
-======================================================
- view
-======================================================
--->
- <tag>
- <name>view</name>
- <tag-class>org.apache.myfaces.taglib.core.ViewTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Creates a JSF View, which is a container that holds all of the
- components that are part of the view.
-
- Unless otherwise specified, all attributes accept static values or EL expressions.
- </description>
- <attribute>
- <name>locale</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The locale of this view. Default: the default locale from the configuration file.</description>
- </attribute>
- </tag>
-</taglib>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_html.tld.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_html.tld.data
deleted file mode 100644
index 386e895..0000000
--- a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_html.tld.data
+++ /dev/null
@@ -1,6200 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
- <tlib-version>1.0</tlib-version>
- <jsp-version>1.2</jsp-version>
- <short-name>h</short-name>
- <uri>http://java.sun.com/jsf/html</uri>
- <display-name>JSF HTML tag library.</display-name>
- <description>
- This tag library implements the standard JSF HTML tags.
- </description>
- <!--
-*************************************************************************************
-Start of revised 1.0 conforming tags (in alphabetical order)
-*************************************************************************************
--->
- <!-- column -->
- <tag>
- <name>column</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlColumnTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This tag is commonly used as a child of the dataTable tag, to
- represent a column of data. It can be decorated with "header" and
- "footer" facets to drive the output of header and footer rows.
- Row values are specified via its children.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- </tag>
- <!-- commandButton -->
- <tag>
- <name>commandButton</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlCommandButtonTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This tag renders as an HTML input element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the commandButton tag -->
- <!-- UICommand attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>action</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Specifies the action to take when this command is invoked.
-
- If the value is an expression, it is expected to be a method
- binding EL expression that identifies an action method. An action method
- accepts no parameters and has a String return value, called the action
- outcome, that identifies the next view displayed. The phase that this
- event is fired in can be controlled via the immediate attribute.
-
- If the value is a string literal, it is treated as a navigation outcome
- for the current view. This is functionally equivalent to a reference to
- an action method that returns the string literal.
- </description>
- </attribute>
- <attribute>
- <name>actionListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression that identifies an action listener method
- to be invoked if this component is activated by the user. An action
- listener method accepts a parameter of type javax.faces.event.ActionEvent
- and returns void. The phase that this event is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which action events
- should fire. During normal event processing, action methods and
- action listener methods are fired during the "invoke application"
- phase of request processing. If this attribute is set to "true",
- these methods are fired instead at the end of the "apply request
- values" phase.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 button attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>alt</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies alternative text that can be used by a browser that can't show this element.</description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: When true, this element cannot receive focus.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is selected.</description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is modified.</description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: A hint to the user agent about the content type of the linked resource.</description>
- </attribute>
- <attribute>
- <name>size</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial width of this control.</description>
- </attribute>
- <!-- HtmlCommandButton attributes -->
- <attribute>
- <name>image</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The URL of an image that renders in place of the button.</description>
- </attribute>
- </tag>
- <!-- commandLink -->
- <tag>
- <name>commandLink</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlCommandLinkTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This tag renders as an HTML a element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the commandLink tag -->
- <!-- UICommand attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>action</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Specifies the action to take when this command is invoked.
-
- If the value is an expression, it is expected to be a method
- binding EL expression that identifies an action method. An action method
- accepts no parameters and has a String return value, called the action
- outcome, that identifies the next view displayed. The phase that this
- event is fired in can be controlled via the immediate attribute.
-
- If the value is a string literal, it is treated as a navigation outcome
- for the current view. This is functionally equivalent to a reference to
- an action method that returns the string literal.
- </description>
- </attribute>
- <attribute>
- <name>actionListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression that identifies an action listener method
- to be invoked if this component is activated by the user. An action
- listener method accepts a parameter of type javax.faces.event.ActionEvent
- and returns void. The phase that this event is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which action events
- should fire. During normal event processing, action methods and
- action listener methods are fired during the "invoke application"
- phase of request processing. If this attribute is set to "true",
- these methods are fired instead at the end of the "apply request
- values" phase.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 anchor (=a) attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>charset</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the character encoding of the linked resource.</description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: A hint to the user agent about the content type of the linked resource.</description>
- </attribute>
- <attribute>
- <name>target</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Names the frame that should display content generated by invoking this action. </description>
- </attribute>
- <attribute>
- <name>coords</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The coordinates of regions within a client side image map.</description>
- </attribute>
- <!-- "href" is a special LinkRenderer attribute -->
- <attribute>
- <name>hreflang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The language of the linked resource.</description>
- </attribute>
- <!-- "name" cannot be set by user -->
- <attribute>
- <name>rel</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The relationship between the current document and
- the linked resource.
- </description>
- </attribute>
- <attribute>
- <name>rev</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The type(s) describing the reverse link for the linked
- resource.
- </description>
- </attribute>
- <attribute>
- <name>shape</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The shape of a region in a client side image map.
- </description>
- </attribute>
- </tag>
- <!-- data_table -->
- <tag>
- <name>dataTable</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlDataTableTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This component renders as an HTML table element. It has as its
- children h:column entities, which describe the columns of the table.
- It can be decorated with facets named "header" and "footer" to
- specify header and footer rows.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the dataTable tag -->
- <!-- UIPanel attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>columnClasses</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- A comma separated list of CSS class names to apply to td elements in
- each column.
- </description>
- </attribute>
- <attribute>
- <name>footerClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class to be applied to footer cells.</description>
- </attribute>
- <attribute>
- <name>headerClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class to be applied to header cells.</description>
- </attribute>
- <attribute>
- <name>rowClasses</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- A comma separated list of CSS class names to apply to td elements in
- each row.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 table attributes -->
- <attribute>
- <name>align</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>border</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the width of the border of this element, in pixels. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>bgcolor</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The background color of this element.</description>
- </attribute>
- <attribute>
- <name>datafld</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>datasrc</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>dataformatas</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>cellpadding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the amount of empty space between the cell border and
- its contents. It can be either a pixel length or a percentage.
- </description>
- </attribute>
- <attribute>
- <name>cellspacing</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the amount of space between the cells of the table.
- It can be either a pixel length or a percentage of available
- space.
- </description>
- </attribute>
- <attribute>
- <name>frame</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Controls what part of the frame that surrounds a table is
- visible. Values include: void, above, below, hsides, lhs,
- rhs, vsides, box, and border.
- </description>
- </attribute>
- <attribute>
- <name>rules</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Controls how rules are rendered between cells. Values include:
- none, groups, rows, cols, and all.
- </description>
- </attribute>
- <attribute>
- <name>summary</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Provides a summary of the contents of the table, for
- accessibility purposes.
- </description>
- </attribute>
- <attribute>
- <name>width</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the desired width of the table, as a pixel length or
- a percentage of available space.
- </description>
- </attribute>
- <!-- UIData attributes -->
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>An EL expression that specifies the data model that backs this table. The value can be of any type.
-
- A value of type DataModel is used directly. Array-like parameters of type java.util.List, array of Object,
- java.sql.ResultSet, or javax.servlet.jsp.jstl.sql.Result are wrapped in a DataModel.
-
- Other values are wrapped in a DataModel as a single row.</description>
- </attribute>
- <attribute>
- <name>var</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Defines the name of the request-scope variable that will hold the current row during iteration. This value must be a static value.</description>
- </attribute>
- <attribute>
- <name>rows</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The number of rows to be displayed. Specify zero for all remaining rows in the table.</description>
- </attribute>
- <attribute>
- <name>first</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The index of the first row to be displayed, where 0 is the first row.</description>
- </attribute>
- </tag>
- <!-- form -->
- <tag>
- <name>form</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlFormTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders an HTML form element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIForm attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 form attributes -->
- <attribute>
- <name>target</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Names the frame that should display content generated by invoking this action. </description>
- </attribute>
- <attribute>
- <name>accept</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Provides a comma-separated list of content types that the
- server processing this form can handle.
- </description>
- </attribute>
- <attribute>
- <name>acceptCharset</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: The list of character encodings accepted by the server for this
- form.
- </description>
- </attribute>
- <attribute>
- <name>enctype</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: The content type used to submit this form to the server.
- </description>
- </attribute>
- <attribute>
- <name>onreset</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when this form is reset.</description>
- </attribute>
- <attribute>
- <name>onsubmit</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when this form is submitted.</description>
- </attribute>
- </tag>
- <!-- graphic_image -->
- <tag>
- <name>graphicImage</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlGraphicImageTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders an HTML img element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIGraphic attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>url</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An alias for the "value" attribute.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The URL of the image. If the URL starts with a '/', it is relative
- to the context path of the web application.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- The subset of HTML 4.0 img attributes that are supported by the JSF 1.1 specification -->
- <attribute>
- <name>alt</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies alternative text that can be used by a browser that can't show this element.</description>
- </attribute>
- <attribute>
- <name>height</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Overrides the natural height of this image, by specifying height in pixels.</description>
- </attribute>
- <attribute>
- <name>ismap</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies server-side image map handling for this image.</description>
- </attribute>
- <attribute>
- <name>longdesc</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: A link to a long description of the image.</description>
- </attribute>
- <!-- "name" attribute cannot be set directly by user -->
- <!-- "src" attribute cannot be set directly, use "url" instead! -->
- <attribute>
- <name>usemap</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies an image map to use with this image.</description>
- </attribute>
- <attribute>
- <name>width</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Overrides the natural width of this image, by specifying width in pixels.</description>
- </attribute>
- </tag>
- <!-- input_hidden -->
- <tag>
- <name>inputHidden</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlInputHiddenTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders as an HTML input tag with its type set to "hidden".
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIInput attributes -->
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which value change
- events should fire. During normal event processing, value change
- events are fired during the "invoke application" phase of request
- processing. If this attribute is set to "true", these methods are
- fired instead at the end of the "apply request values" phase.
- </description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether an input value is required.
- If this value is true, and no input value is provided, the error
- message javax.faces.component.UIInput.REQUIRED is posted.
- </description>
- </attribute>
- <attribute>
- <name>validator</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting FacesContext, UIComponent,
- and Object parameters, and returning void, that validates the
- component's local value.
- </description>
- </attribute>
- <attribute>
- <name>valueChangeListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting a ValueChangeEvent parameter
- and returning void. The specified method is invoked if this component
- is modified. The phase that this handler is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- </tag>
- <!-- input_secret -->
- <tag>
- <name>inputSecret</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlInputSecretTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders as an HTML input tag with its type set to "password".
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- todo: not all html_input_attributes are used for input_secret
- in RI (e.g. datafld, datasrc, ...) -->
- <!-- UIInput attributes -->
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which value change
- events should fire. During normal event processing, value change
- events are fired during the "invoke application" phase of request
- processing. If this attribute is set to "true", these methods are
- fired instead at the end of the "apply request values" phase.
- </description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether an input value is required.
- If this value is true, and no input value is provided, the error
- message javax.faces.component.UIInput.REQUIRED is posted.
- </description>
- </attribute>
- <attribute>
- <name>validator</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting FacesContext, UIComponent,
- and Object parameters, and returning void, that validates the
- component's local value.
- </description>
- </attribute>
- <attribute>
- <name>valueChangeListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting a ValueChangeEvent parameter
- and returning void. The specified method is invoked if this component
- is modified. The phase that this handler is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- <!-- HTML 4.0 input attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>align</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>alt</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies alternative text that can be used by a browser that can't show this element.</description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: When true, this element cannot receive focus.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is modified.</description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is selected.</description>
- </attribute>
- <attribute>
- <name>readonly</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: When true, indicates that this component cannot be modified by the user.
- The element may receive focus unless it has also been disabled.
- </description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>maxlength</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The maximum number of characters allowed to be entered.</description>
- </attribute>
- <attribute>
- <name>size</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The initial width of this control, in characters.</description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- SecretRenderer attributes -->
- <attribute>
- <name>redisplay</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- If true, the value will be re-sent (in plaintext) when the form
- is rerendered (see JSF.7.4.4). Default is false.
- </description>
- </attribute>
- </tag>
- <!-- input_text -->
- <tag>
- <name>inputText</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlInputTextTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders a HTML input element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the inputText tag -->
- <!-- UIInput attributes -->
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which value change
- events should fire. During normal event processing, value change
- events are fired during the "invoke application" phase of request
- processing. If this attribute is set to "true", these methods are
- fired instead at the end of the "apply request values" phase.
- </description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether an input value is required.
- If this value is true, and no input value is provided, the error
- message javax.faces.component.UIInput.REQUIRED is posted.
- </description>
- </attribute>
- <attribute>
- <name>validator</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting FacesContext, UIComponent,
- and Object parameters, and returning void, that validates the
- component's local value.
- </description>
- </attribute>
- <attribute>
- <name>valueChangeListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting a ValueChangeEvent parameter
- and returning void. The specified method is invoked if this component
- is modified. The phase that this handler is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 input attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>align</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>alt</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies alternative text that can be used by a browser that can't show this element.</description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: When true, this element cannot receive focus.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is modified.</description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is selected.</description>
- </attribute>
- <attribute>
- <name>readonly</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: When true, indicates that this component cannot be modified by the user.
- The element may receive focus unless it has also been disabled.
- </description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>maxlength</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The maximum number of characters allowed to be entered.</description>
- </attribute>
- <attribute>
- <name>size</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The initial width of this control, in characters.</description>
- </attribute>
- </tag>
- <!-- input_textarea -->
- <tag>
- <name>inputTextarea</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlInputTextareaTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders a HTML textarea element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the inputTextarea tag -->
- <!-- UIInput attributes -->
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which value change
- events should fire. During normal event processing, value change
- events are fired during the "invoke application" phase of request
- processing. If this attribute is set to "true", these methods are
- fired instead at the end of the "apply request values" phase.
- </description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether an input value is required.
- If this value is true, and no input value is provided, the error
- message javax.faces.component.UIInput.REQUIRED is posted.
- </description>
- </attribute>
- <attribute>
- <name>validator</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting FacesContext, UIComponent,
- and Object parameters, and returning void, that validates the
- component's local value.
- </description>
- </attribute>
- <attribute>
- <name>valueChangeListener</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A method binding EL expression, accepting a ValueChangeEvent parameter
- and returning void. The specified method is invoked if this component
- is modified. The phase that this handler is fired in can be controlled
- via the immediate attribute.
- </description>
- </attribute>
- <!-- HTML 4.0 textarea attributes -->
- <attribute>
- <name>datafld</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>datasrc</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>dataformatas</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: When true, this element cannot receive focus.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is modified.</description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element is selected.</description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>readonly</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: When true, indicates that this component cannot be modified by the user.
- The element may receive focus unless it has also been disabled.
- </description>
- </attribute>
- <attribute>
- <name>cols</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The width of this element, in characters.</description>
- </attribute>
- <attribute>
- <name>rows</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The height of this element, in characters.</description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- </tag>
- <!-- message -->
- <tag>
- <name>message</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlMessageTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders the first FacesMessage that is assigned to the component
- referenced by the "for" attribute.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the message tag -->
- <!-- UIMessage attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>for</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An EL expression, returning a String, with the unique ID of the component
- for which messages should be displayed. This string has the same format
- as that accepted by the UIComponent.findComponent() method.
- </description>
- </attribute>
- <attribute>
- <name>showSummary</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An EL expression, returning a boolean, that controls whether the
- summary text of the associated messages is displayed. Default: true.
- </description>
- </attribute>
- <attribute>
- <name>showDetail</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An EL expression, returning a boolean, that controls whether the
- detail text of the associated messages is displayed. Default: false.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HtmlMessage attributes -->
- <attribute>
- <name>infoClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "INFO".</description>
- </attribute>
- <attribute>
- <name>infoStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "INFO".</description>
- </attribute>
- <attribute>
- <name>warnClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "WARN".</description>
- </attribute>
- <attribute>
- <name>warnStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "WARN".</description>
- </attribute>
- <attribute>
- <name>errorClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "ERROR".</description>
- </attribute>
- <attribute>
- <name>errorStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "ERROR".</description>
- </attribute>
- <attribute>
- <name>fatalClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "FATAL".</description>
- </attribute>
- <attribute>
- <name>fatalStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "FATAL".</description>
- </attribute>
- <attribute>
- <name>tooltip</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- If true, the message summary will be rendered as a tooltip (i.e. HTML title attribute).
- </description>
- </attribute>
- </tag>
- <!-- messages -->
- <tag>
- <name>messages</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlMessagesTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders all or some FacesMessages depending on the "for" and
- "globalOnly" attributes:&lt;br&gt;
- &lt;ul&gt;
- &lt;li&gt;If globalOnly = true, only global messages, that have no
- associated clientId, will be displayed.&lt;/li&gt;
- &lt;li&gt;else if there is a "for" attribute, only messages that are
- assigned to the component referenced by the "for" attribute
- are displayed.&lt;/li&gt;
- &lt;li&gt;else all messages are displayed.&lt;/li&gt;
- &lt;/ul&gt;
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
-
- </description>
- <!-- all standard attributes of the messages tag -->
- <!-- UIMessages attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>showSummary</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that controls whether the summary text of the
- associated messages is displayed. Default: true.
- </description>
- </attribute>
- <attribute>
- <name>showDetail</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that controls whether the detail text of the
- associated messages is displayed. Default: false.
- </description>
- </attribute>
- <attribute>
- <name>globalOnly</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that controls whether global messages (those without
- IDs) should be displayed. Default: true.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HtmlMessages attributes -->
- <attribute>
- <name>infoClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "INFO".</description>
- </attribute>
- <attribute>
- <name>infoStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "INFO".</description>
- </attribute>
- <attribute>
- <name>warnClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "WARN".</description>
- </attribute>
- <attribute>
- <name>warnStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "WARN".</description>
- </attribute>
- <attribute>
- <name>errorClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "ERROR".</description>
- </attribute>
- <attribute>
- <name>errorStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "ERROR".</description>
- </attribute>
- <attribute>
- <name>fatalClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS class to be used for messages with severity "FATAL".</description>
- </attribute>
- <attribute>
- <name>fatalStyle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>CSS style to be used for messages with severity "FATAL".</description>
- </attribute>
- <attribute>
- <name>layout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The layout: "table" or "list". Default: list</description>
- </attribute>
- <attribute>
- <name>tooltip</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- If true, the message summary will be rendered as a tooltip (i.e. HTML title attribute).
- </description>
- </attribute>
- </tag>
- <!-- outputLabel -->
- <tag>
- <name>outputLabel</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlOutputLabelTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders a HTML label element.
-
- In addition to the JSF specification, MyFaces allows it to directly
- give an output text via the "value" attribute.
-
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- all standard attributes of the outputLabel tag -->
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 label attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <!-- "for" is a specific LabelRenderer attribute -->
- <!-- LabelRenderer attributes -->
- <attribute>
- <name>for</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The client ID of the target input element of this label.</description>
- </attribute>
- </tag>
- <!-- output_link -->
- <tag>
- <name>outputLink</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlOutputLinkTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders a HTML a element. Child f:param elements are added to the href
- attribute as query parameters. Other children are rendered as the link text or image.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 anchor (=a) attributes -->
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Sets the access key for this element.</description>
- </attribute>
- <attribute>
- <name>charset</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the character encoding of the linked resource.</description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the position of this element within the tab order of the document.</description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element loses focus.</description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies a script to be invoked when the element receives focus.</description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: A hint to the user agent about the content type of the linked resource.</description>
- </attribute>
- <attribute>
- <name>target</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Names the frame that should display content generated by invoking this action. </description>
- </attribute>
- <attribute>
- <name>coords</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The coordinates of regions within a client side image map.</description>
- </attribute>
- <!-- "href" is a special LinkRenderer attribute -->
- <attribute>
- <name>hreflang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: The language of the linked resource.</description>
- </attribute>
- <!-- "name" cannot be set by user -->
- <attribute>
- <name>rel</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The relationship between the current document and
- the linked resource.
- </description>
- </attribute>
- <attribute>
- <name>rev</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The type(s) describing the reverse link for the linked
- resource.
- </description>
- </attribute>
- <attribute>
- <name>shape</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- HTML: The shape of a region in a client side image map.
- </description>
- </attribute>
- </tag>
- <!-- output_message -->
- <tag>
- <name>outputFormat</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlOutputFormatTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders as text, applying the child f:param values to the value
- attribute as a MessageFormat string. If this element has an ID
- or CSS style properties, the text is wrapped in a span element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <attribute>
- <name>escape</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Indicates whether rendered markup should be escaped.
- Default: true
- </description>
- </attribute>
- </tag>
- <!-- output_text -->
- <tag>
- <name>outputText</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlOutputTextTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Renders the value of the associated UIOutput component. If this
- element has an ID or CSS style properties, the text is wrapped in
- a span element.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIOutput attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>The initial value of this component.</description>
- </attribute>
- <attribute>
- <name>converter</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- An expression that specifies the Converter for this component.
- If the value binding expression is a String, the String is used
- as an ID to look up a Converter. If the value binding expression
- is a Converter, uses that instance as the converter.
-
- The value can either be a static value (ID case only) or an EL expression.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <attribute>
- <name>escape</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Indicates whether rendered markup should be escaped.
- Default: true
- </description>
- </attribute>
- </tag>
- <!-- panel_grid -->
- <tag>
- <name>panelGrid</name>
- <tag-class>org.apache.myfaces.taglib.html.HtmlPanelGridTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- This element renders as an HTML table with specified number of
- columns. Children of this element are rendered as cells in the
- table, filling rows from left to right. Facets named "header"
- and "footer" are optional and specify the content of the thead
- and tfoot rows, respectively.
-
- Unless otherwise specified, all attributes accept static values
- or EL expressions.
- </description>
- <!-- UIPanel attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- The developer-assigned ID of this component. The ID must be unique
- within the scope of the tag's enclosing naming container (e.g.
- h:form or f:subview). This value must be a static value.
- </description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Identifies a backing bean property (of type UIComponent or appropriate
- subclass) to bind to this component instance. This value must be an
- EL expression.
- </description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that indicates whether this component should be rendered.
- Default value: true.
- </description>
- </attribute>
- <!-- HTML 4.0 universal attributes -->
- <attribute>
- <name>dir</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
- </attribute>
- <attribute>
- <name>lang</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The base language of this document.</description>
- </attribute>
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: CSS styling instructions.</description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
- </attribute>
- <!-- HTML 4.0 event-handler attributes -->
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is clicked.</description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the element is double-clicked.</description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is released over this element.</description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved into this element.</description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed over this element.</description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is pressed down over this element.</description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Script to be invoked when a key is released over this element.</description>
- </attribute>
- <!-- HTML 4.0 table attributes -->
- <attribute>
- <name>align</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>border</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>HTML: Specifies the width of the border of this element, in pixels. Deprecated in HTML 4.01.</description>
- </attribute>
- <attribute>
- <name>bgcolor</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>HTML: The background color of this element.</description>
- </attribute>
- <attribute>
- <name>datafld</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>datasrc</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>dataformatas</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Reserved for future use.</description>
- </attribute>
- <attribute>
- <name>cellpadding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the amount of empty space between the cell border and
- its contents. It can be either a pixel length or a percentage.
- </description>
- </attribute>
- <attribute>
- <name>cellspacing</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the amount of space between the cells of the table.
- It can be either a pixel length or a percentage of available
- space.
- </description>
- </attribute>
- <attribute>
- <name>frame</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Controls what part of the frame that surrounds a table is
- visible. Values include: void, above, below, hsides, lhs,
- rhs, vsides, box, and border.
- </description>
- </attribute>
- <attribute>
- <name>rules</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Controls how rules are rendered between cells. Values include:
- none, groups, rows, cols, and all.
- </description>
- </attribute>
- <attribute>
- <name>summary</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Provides a summary of the contents of the table, for
- accessibility purposes.
- </description>
- </attribute>
- <attribute>
- <name>width</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- HTML: Specifies the desired width of the table, as a pixel length or
- a percentage of available space.
- </description>
- </attribute>
- <attribute>
- <name>columnClasses</name>
- <required>false</required>
- <rtexprvalue>false